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/kyra | |
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/kyra')
-rw-r--r-- | engines/kyra/gui.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/kyra_v1.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp index d976c3463d..ac14a408a9 100644 --- a/engines/kyra/gui.cpp +++ b/engines/kyra/gui.cpp @@ -421,7 +421,7 @@ void GUI::checkTextfieldInput() { while (_vm->_eventMan->pollEvent(event) && running) { switch (event.type) { case Common::EVENT_KEYDOWN: - if (event.kbd.keycode == Common::KEYCODE_q && event.kbd.flags == Common::KBD_CTRL) + if (event.kbd.keycode == Common::KEYCODE_q && event.kbd.hasFlags(Common::KBD_CTRL)) _vm->quitGame(); else _keyPressed = event.kbd; diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index eebb493e38..b9894af98f 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -262,10 +262,10 @@ int KyraEngine_v1::checkInput(Button *buttonList, bool mainLoop, int eventFlag) switch (event.type) { case Common::EVENT_KEYDOWN: if (event.kbd.keycode >= Common::KEYCODE_1 && event.kbd.keycode <= Common::KEYCODE_9 && - (event.kbd.flags == Common::KBD_CTRL || event.kbd.flags == Common::KBD_ALT) && mainLoop) { + (event.kbd.hasFlags(Common::KBD_CTRL) || event.kbd.hasFlags(Common::KBD_ALT)) && mainLoop) { int saveLoadSlot = 9 - (event.kbd.keycode - Common::KEYCODE_0) + 990; - if (event.kbd.flags == Common::KBD_CTRL) { + if (event.kbd.hasFlags(Common::KBD_CTRL)) { if (saveFileLoadable(saveLoadSlot)) loadGameStateCheck(saveLoadSlot); _eventList.clear(); @@ -275,7 +275,7 @@ int KyraEngine_v1::checkInput(Button *buttonList, bool mainLoop, int eventFlag) sprintf(savegameName, "Quicksave %d", event.kbd.keycode - Common::KEYCODE_0); saveGameState(saveLoadSlot, savegameName, 0); } - } else if (event.kbd.flags == Common::KBD_CTRL) { + } else if (event.kbd.hasFlags(Common::KBD_CTRL)) { if (event.kbd.keycode == Common::KEYCODE_d) { if (_debugger) _debugger->attach(); @@ -385,7 +385,7 @@ void KyraEngine_v1::updateInput() { event.kbd.keycode == Common::KEYCODE_UP || event.kbd.keycode == Common::KEYCODE_RIGHT || event.kbd.keycode == Common::KEYCODE_DOWN || event.kbd.keycode == Common::KEYCODE_LEFT) _eventList.push_back(Event(event, true)); - else if (event.kbd.keycode == Common::KEYCODE_q && event.kbd.flags == Common::KBD_CTRL) + else if (event.kbd.keycode == Common::KEYCODE_q && event.kbd.hasFlags(Common::KBD_CTRL)) quitGame(); else _eventList.push_back(event); |