From f5a77e1380db73b8d4a898e30a4e2b80366f5894 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 14 Feb 2014 18:21:57 +0100 Subject: 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. --- engines/toon/toon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/toon') 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) { -- cgit v1.2.3