aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2009-05-21 17:49:51 +0000
committerJohannes Schickel2009-05-21 17:49:51 +0000
commit25980bc29cd158bf059a1b88106ac9eeebca8eff (patch)
tree8f61f6375f1f21222049da49225c793d3d74aca6 /engines
parentdfffea1bf4cd4eceb28933f4fc2f1cc76477f0ea (diff)
downloadscummvm-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')
-rw-r--r--engines/kyra/gui_lol.cpp3
-rw-r--r--engines/kyra/kyra_v1.cpp10
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() {