diff options
author | Johannes Schickel | 2014-02-14 18:21:57 +0100 |
---|---|---|
committer | Johannes Schickel | 2014-02-14 18:21:57 +0100 |
commit | f5a77e1380db73b8d4a898e30a4e2b80366f5894 (patch) | |
tree | ca9f3f19c4bae062da035caa7a6746ca2cabfcb4 | |
parent | 616d9959f38c1facc2a0362173104dabe1ab1292 (diff) | |
download | scummvm-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.cpp | 2 |
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) { |