aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2014-02-14 18:21:57 +0100
committerJohannes Schickel2014-02-14 18:21:57 +0100
commitf5a77e1380db73b8d4a898e30a4e2b80366f5894 (patch)
treeca9f3f19c4bae062da035caa7a6746ca2cabfcb4
parent616d9959f38c1facc2a0362173104dabe1ab1292 (diff)
downloadscummvm-rg350-f5a77e1380db73b8d4a898e30a4e2b80366f5894.tar.gz
scummvm-rg350-f5a77e1380db73b8d4a898e30a4e2b80366f5894.tar.bz2
scummvm-rg350-f5a77e1380db73b8d4a898e30a4e2b80366f5894.zip
TOON: Do not use KeyState::hasFlags when only presence of any flag should be checked.
hasFlags has the semantics to check whether *all* of the supplied flags are active. Toon looks like it rather wants to know whether any modifier is active and thus not use hasFlags.
-rw-r--r--engines/toon/toon.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 7b1456b05c..d7895b5378 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -184,7 +184,7 @@ void ToonEngine::parseInput() {
Common::Event event;
while (_event->pollEvent(event)) {
- bool hasModifier = event.kbd.hasFlags(Common::KBD_ALT|Common::KBD_CTRL|Common::KBD_SHIFT);
+ const bool hasModifier = (event.kbd.flags & (Common::KBD_ALT|Common::KBD_CTRL|Common::KBD_SHIFT)) != 0;
switch (event.type) {
case Common::EVENT_KEYDOWN:
if ((event.kbd.ascii == 27 || event.kbd.ascii == 32) && !hasModifier) {