mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 16:35:20 +00:00
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:
parent
616d9959f3
commit
f5a77e1380
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user