diff options
author | Johannes Schickel | 2009-05-21 17:49:51 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-05-21 17:49:51 +0000 |
commit | 25980bc29cd158bf059a1b88106ac9eeebca8eff (patch) | |
tree | 8f61f6375f1f21222049da49225c793d3d74aca6 /engines/kyra | |
parent | dfffea1bf4cd4eceb28933f4fc2f1cc76477f0ea (diff) | |
download | scummvm-rg350-25980bc29cd158bf059a1b88106ac9eeebca8eff.tar.gz scummvm-rg350-25980bc29cd158bf059a1b88106ac9eeebca8eff.tar.bz2 scummvm-rg350-25980bc29cd158bf059a1b88106ac9eeebca8eff.zip |
Changed code to closer match original input handling.
svn-id: r40770
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/gui_lol.cpp | 3 | ||||
-rw-r--r-- | engines/kyra/kyra_v1.cpp | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp index bedc1a2d39..356b08e740 100644 --- a/engines/kyra/gui_lol.cpp +++ b/engines/kyra/gui_lol.cpp @@ -905,7 +905,7 @@ void LoLEngine::gui_initMagicSubmenu(int charNum) { void LoLEngine::gui_initButton(int index, int x, int y, int val) { Button *b = new Button; - memset (b, 0, sizeof(Button)); + memset(b, 0, sizeof(Button)); int cnt = 1; @@ -919,7 +919,6 @@ void LoLEngine::gui_initButton(int index, int x, int y, int val) { } n->nextButton = b; - } else { _activeButtons = b; } diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 4615a0a5fc..6106efdf9c 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -370,10 +370,14 @@ int KyraEngine_v1::checkInput(Button *buttonList, bool mainLoop) { } GUI *guiInstance = gui(); - if (guiInstance && keys) - return guiInstance->processButtonList(buttonList, keys | 0x8000, mouseWheel); - else + if (guiInstance) { + if (keys) + return guiInstance->processButtonList(buttonList, keys | 0x8000, mouseWheel); + else + return guiInstance->processButtonList(buttonList, 0, mouseWheel); + } else { return keys; + } } void KyraEngine_v1::updateInput() { |