diff options
author | Yotam Barnoy | 2010-02-21 04:04:13 +0000 |
---|---|---|
committer | Yotam Barnoy | 2010-02-21 04:04:13 +0000 |
commit | ef330ed9b4e5d6252134ed137b042593f79d02a9 (patch) | |
tree | 919c4ae91efca10102936a1833251b48323b8983 /engines/agos | |
parent | cebb052e2cfd963b95d7357b7c21dc8c437e058a (diff) | |
download | scummvm-rg350-ef330ed9b4e5d6252134ed137b042593f79d02a9.tar.gz scummvm-rg350-ef330ed9b4e5d6252134ed137b042593f79d02a9.tar.bz2 scummvm-rg350-ef330ed9b4e5d6252134ed137b042593f79d02a9.zip |
Patch for bug 2943361 by littleboy, adding full kb modifier support to all engines + GUI and proper keypad handling
svn-id: r48101
Diffstat (limited to 'engines/agos')
-rw-r--r-- | engines/agos/event.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp index 360fa4bf8c..f22a2e69e9 100644 --- a/engines/agos/event.cpp +++ b/engines/agos/event.cpp @@ -459,8 +459,8 @@ void AGOSEngine::delay(uint amount) { switch (event.type) { case Common::EVENT_KEYDOWN: if (event.kbd.keycode >= Common::KEYCODE_0 && event.kbd.keycode <= Common::KEYCODE_9 - && (event.kbd.flags == Common::KBD_ALT || - event.kbd.flags == Common::KBD_CTRL)) { + && (event.kbd.hasFlags(Common::KBD_ALT) || + event.kbd.hasFlags(Common::KBD_CTRL))) { _saveLoadSlot = event.kbd.keycode - Common::KEYCODE_0; // There is no save slot 0 @@ -469,13 +469,13 @@ void AGOSEngine::delay(uint amount) { memset(_saveLoadName, 0, sizeof(_saveLoadName)); sprintf(_saveLoadName, "Quick %d", _saveLoadSlot); - _saveLoadType = (event.kbd.flags == Common::KBD_ALT) ? 1 : 2; + _saveLoadType = (event.kbd.hasFlags(Common::KBD_ALT)) ? 1 : 2; // We should only allow a load or save when it was possible in original // This stops load/save during copy protection, conversations and cut scenes if (!_mouseHideCount && !_showPreposition) quickLoadOrSave(); - } else if (event.kbd.flags == Common::KBD_CTRL) { + } else if (event.kbd.hasFlags(Common::KBD_CTRL)) { if (event.kbd.keycode == Common::KEYCODE_a) { GUI::Dialog *_aboutDialog; _aboutDialog = new GUI::AboutDialog(); @@ -492,7 +492,7 @@ void AGOSEngine::delay(uint amount) { } if (getGameType() == GType_PP) { - if (event.kbd.flags == Common::KBD_SHIFT) + if (event.kbd.hasFlags(Common::KBD_SHIFT)) _variableArray[41] = 0; else _variableArray[41] = 1; |