aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2008-03-28 01:03:54 +0000
committerJohannes Schickel2008-03-28 01:03:54 +0000
commitc5929561babc66df862e5b0b15b14b9430433e65 (patch)
tree826f196516b0de6ed6f6d54b09194ea4b9d33bfc /engines
parentb033c5f605559854e92bda06ffd54ec132a3c22c (diff)
downloadscummvm-rg350-c5929561babc66df862e5b0b15b14b9430433e65.tar.gz
scummvm-rg350-c5929561babc66df862e5b0b15b14b9430433e65.tar.bz2
scummvm-rg350-c5929561babc66df862e5b0b15b14b9430433e65.zip
- Clear input queue after loading game via hotkeys.
- Fixed bug which caused the need for clicking twice to change pages in spellbook. svn-id: r31282
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/gui_v2.cpp9
-rw-r--r--engines/kyra/kyra_v2.cpp7
2 files changed, 9 insertions, 7 deletions
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index 6b472a66ad..7afed9eb04 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -376,10 +376,8 @@ int KyraEngine_v2::processButtonList(Button *buttonList, uint16 inputFlag) {
// but did some other magic, which looks like it depends on how the handle
// key input... so we just enable 0x1000 and 0x4000 here to allow
// all GUI buttons to work (for now at least...)
- if (inFlags == 199 || inFlags == 198) {
+ if (inFlags == 199 || inFlags == 198)
temp = 0x1000 | 0x4000;
- removeInputTop();
- }
//if (inputFlag & 0x800)
// temp <<= 2;
@@ -555,9 +553,12 @@ int KyraEngine_v2::processButtonList(Button *buttonList, uint16 inputFlag) {
buttonList->flags2 &= 0xFF;
buttonList->flags2 |= flags;
- if (buttonList->buttonCallback)
+ if (buttonList->buttonCallback) {
+ removeInputTop();
if ((this->*buttonList->buttonCallback)(buttonList))
break;
+ }
+
if (buttonList->flags & 0x20)
break;
}
diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp
index 0d183d2c09..392ffc7406 100644
--- a/engines/kyra/kyra_v2.cpp
+++ b/engines/kyra/kyra_v2.cpp
@@ -781,14 +781,15 @@ int KyraEngine_v2::checkInput(Button *buttonList, bool mainLoop) {
(event.kbd.flags == Common::KBD_CTRL || event.kbd.flags == Common::KBD_ALT) && mainLoop) {
const char *saveLoadSlot = getSavegameFilename(event.kbd.keycode - '0');
- if (event.kbd.flags == Common::KBD_CTRL)
+ if (event.kbd.flags == Common::KBD_CTRL) {
loadGame(saveLoadSlot);
- else {
+ _eventList.clear();
+ breakLoop = true;
+ } else {
char savegameName[14];
sprintf(savegameName, "Quicksave %d", event.kbd.keycode - '0');
saveGame(saveLoadSlot, savegameName);
}
- breakLoop = true;
} else if (event.kbd.flags == Common::KBD_CTRL) {
if (event.kbd.keycode == 'd')
_debugger->attach();