KEYMAPPER: Use hasFlags() in findHardwareKey()

This commit is contained in:
Filippos Karapetis 2011-12-30 01:15:06 +02:00
parent 1d3ff35373
commit d55ce36268

View File

@ -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;
}