diff options
author | Filippos Karapetis | 2011-12-30 13:59:05 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-30 13:59:55 +0200 |
commit | a473934abd2dc4d402963c6f43cec4147ab71e82 (patch) | |
tree | 09379ce18975b206f6941ce52e437fbd41126aaa /backends/keymapper | |
parent | adb53422471386b4eb3551fe15a489bcd88b6571 (diff) | |
download | scummvm-rg350-a473934abd2dc4d402963c6f43cec4147ab71e82.tar.gz scummvm-rg350-a473934abd2dc4d402963c6f43cec4147ab71e82.tar.bz2 scummvm-rg350-a473934abd2dc4d402963c6f43cec4147ab71e82.zip |
COMMON: Perform some keymapper-related changes to the KeyState struct
The == operator in KeyState should not be checking for sticky modifier
keys. This allows the keymapper's defined actions to function correctly
in desktop platforms, when sticky modifier keys such as caps lock and
num lock are turned on. Also, added some sanity checks to hasFlags()
and enums for sticky and non-sticky keys
Diffstat (limited to 'backends/keymapper')
-rw-r--r-- | backends/keymapper/hardware-key.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backends/keymapper/hardware-key.h b/backends/keymapper/hardware-key.h index daa853df08..32df042525 100644 --- a/backends/keymapper/hardware-key.h +++ b/backends/keymapper/hardware-key.h @@ -97,7 +97,7 @@ public: List<const HardwareKey*>::const_iterator it; for (it = _keys.begin(); it != _keys.end(); it++) { - if (keystate.keycode == (*it)->key.keycode && keystate.hasFlags((*it)->key.flags)) + if ((*it)->key == keystate) return (*it); } return 0; |