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.
This commit is contained in:
Johannes Schickel 2014-02-14 18:21:57 +01:00
parent 616d9959f3
commit f5a77e1380

View File

@ -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) {