aboutsummaryrefslogtreecommitdiff
path: root/backends/keymapper
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-30 01:15:06 +0200
committerFilippos Karapetis2011-12-30 01:15:06 +0200
commitd55ce3626800cfa316bb90a1e2fcc0b3d5dbe203 (patch)
tree26d502583af94db9940f7b2238539598d29d4bcd /backends/keymapper
parent1d3ff353730c26a3adba3599db70334630c1da94 (diff)
downloadscummvm-rg350-d55ce3626800cfa316bb90a1e2fcc0b3d5dbe203.tar.gz
scummvm-rg350-d55ce3626800cfa316bb90a1e2fcc0b3d5dbe203.tar.bz2
scummvm-rg350-d55ce3626800cfa316bb90a1e2fcc0b3d5dbe203.zip
KEYMAPPER: Use hasFlags() in findHardwareKey()
Diffstat (limited to 'backends/keymapper')
-rw-r--r--backends/keymapper/hardware-key.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/backends/keymapper/hardware-key.h b/backends/keymapper/hardware-key.h
index 014e73a11e..daa853df08 100644
--- a/backends/keymapper/hardware-key.h
+++ b/backends/keymapper/hardware-key.h
@@ -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;
}