mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 16:03:05 +00:00
KEYMAPPER: Use hasFlags() in findHardwareKey()
This commit is contained in:
parent
1d3ff35373
commit
d55ce36268
@ -97,12 +97,8 @@ public:
|
||||
List<const HardwareKey*>::const_iterator it;
|
||||
|
||||
for (it = _keys.begin(); it != _keys.end(); it++) {
|
||||
if ((*it)->key.keycode == keystate.keycode) {
|
||||
// Only check for control/alt/shift modifiers, not for sticky
|
||||
// modifiers like num lock/caps lock/scroll lock
|
||||
if ((*it)->key.flags == (keystate.flags & 7))
|
||||
return (*it);
|
||||
}
|
||||
if (keystate.keycode == (*it)->key.keycode && keystate.hasFlags((*it)->key.flags))
|
||||
return (*it);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user