aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen
diff options
context:
space:
mode:
authorPaul Gilbert2018-04-06 22:30:29 -0400
committerPaul Gilbert2018-04-06 22:30:29 -0400
commitfa00855a109e6ba11aad663c2d41d8a503f7d31d (patch)
tree8735be3f09015ac81ebdaf254fea2314091b320d /engines/xeen
parent9d94d97cc60006eac16808c14efdff85fd17f910 (diff)
downloadscummvm-rg350-fa00855a109e6ba11aad663c2d41d8a503f7d31d.tar.gz
scummvm-rg350-fa00855a109e6ba11aad663c2d41d8a503f7d31d.tar.bz2
scummvm-rg350-fa00855a109e6ba11aad663c2d41d8a503f7d31d.zip
XEEN: Don't set a _buttonValue when Ctrl or Alt is pressed
This avoids a problem where holding down Ctrl for the GMM was passing multiple turns.. very noticeable if there were monsters nearby, or the party is standing on a trap tile
Diffstat (limited to 'engines/xeen')
-rw-r--r--engines/xeen/dialogs/dialogs.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/engines/xeen/dialogs/dialogs.cpp b/engines/xeen/dialogs/dialogs.cpp
index 3e777ba232..f404996b56 100644
--- a/engines/xeen/dialogs/dialogs.cpp
+++ b/engines/xeen/dialogs/dialogs.cpp
@@ -99,15 +99,18 @@ bool ButtonContainer::checkEvents(XeenEngine *vm) {
Common::KeyState keyState;
events.getKey(keyState);
- _buttonValue = keyState.keycode;
- if (_buttonValue == Common::KEYCODE_KP8)
+ if (keyState.keycode == Common::KEYCODE_KP8)
_buttonValue = Common::KEYCODE_UP;
- else if (_buttonValue == Common::KEYCODE_KP2)
+ else if (keyState.keycode == Common::KEYCODE_KP2)
_buttonValue = Common::KEYCODE_DOWN;
- else if (_buttonValue == Common::KEYCODE_KP_ENTER)
+ else if (keyState.keycode == Common::KEYCODE_KP_ENTER)
_buttonValue = Common::KEYCODE_RETURN;
+ else if (keyState.keycode != Common::KEYCODE_LCTRL && keyState.keycode != Common::KEYCODE_RCTRL
+ && keyState.keycode != Common::KEYCODE_LALT && keyState.keycode != Common::KEYCODE_RALT)
+ _buttonValue = keyState.keycode;
- _buttonValue |= (keyState.flags & ~Common::KBD_STICKY) << 16;
+ if (_buttonValue)
+ _buttonValue |= (keyState.flags & ~Common::KBD_STICKY) << 16;
}
if (_buttonValue) {