diff options
| author | Paul Gilbert | 2018-04-07 11:02:09 -0400 |
|---|---|---|
| committer | Paul Gilbert | 2018-04-07 11:02:09 -0400 |
| commit | 6a3251649010e0488046c5c994b600b5c831a209 (patch) | |
| tree | 6d26cdd40c3604d001397d952f04d88de82c594e /engines/xeen/worldofxeen | |
| parent | 28a3faa1785293df6aa94917c3e846e2f8e6258e (diff) | |
| download | scummvm-rg350-6a3251649010e0488046c5c994b600b5c831a209.tar.gz scummvm-rg350-6a3251649010e0488046c5c994b600b5c831a209.tar.bz2 scummvm-rg350-6a3251649010e0488046c5c994b600b5c831a209.zip | |
XEEN: Cache mouse clicks as well as keyboard in EventsManager
This allows the well open door/gate, shoot at enemies, then close
to work with the mouse as well as the keyboard. The pending event
queue has also been limited to 5 pending events. Trust me, you
don't want to spent time spamming Shoot at a high level monster
that can't reach you, only for when it's killed to have to wait
several minutes whilst your party keeps shooting.
Diffstat (limited to 'engines/xeen/worldofxeen')
| -rw-r--r-- | engines/xeen/worldofxeen/worldofxeen_menu.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/xeen/worldofxeen/worldofxeen_menu.cpp b/engines/xeen/worldofxeen/worldofxeen_menu.cpp index 8356794ef7..a4a4b0277b 100644 --- a/engines/xeen/worldofxeen/worldofxeen_menu.cpp +++ b/engines/xeen/worldofxeen/worldofxeen_menu.cpp @@ -110,11 +110,9 @@ void MainMenuContainer::execute() { } else { // No active dialog. If Escape pressed, exit game entirely. Otherwise, // open up the main menu dialog - if (events.isKeyPending()) { - Common::KeyState key; - if (events.getKey(key) && key.keycode == Common::KEYCODE_ESCAPE) - g_vm->_gameMode = GMODE_QUIT; - } + PendingEvent pe; + if (events.getEvent(pe) && pe._keyState.keycode == Common::KEYCODE_ESCAPE) + g_vm->_gameMode = GMODE_QUIT; events.clearEvents(); showMenuDialog(); |
