aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
diff options
context:
space:
mode:
authorPaul Gilbert2009-03-03 11:08:03 +0000
committerPaul Gilbert2009-03-03 11:08:03 +0000
commiteb610d66bdff66a6a768ab9fc7409a17959b17ab (patch)
treedcd3a8d2a66a0e7dd7656654a92894c78bed3020 /engines/cruise
parentf3a9274a4590b9310b10a9999f242f6f8a5eea38 (diff)
downloadscummvm-rg350-eb610d66bdff66a6a768ab9fc7409a17959b17ab.tar.gz
scummvm-rg350-eb610d66bdff66a6a768ab9fc7409a17959b17ab.tar.bz2
scummvm-rg350-eb610d66bdff66a6a768ab9fc7409a17959b17ab.zip
Corrected click handling when a text message is displaying to properly dismiss the text, rather than trying to immediately perform another action
svn-id: r39088
Diffstat (limited to 'engines/cruise')
-rw-r--r--engines/cruise/cruise_main.cpp32
1 files changed, 21 insertions, 11 deletions
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index 8f6736a34e..8d8ae71713 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -1262,6 +1262,22 @@ void closeAllMenu(void) {
linkedRelation = NULL;
}
+bool checkInput(int16 *buttonPtr) {
+ int16 handle, button;
+ Common::Point pt;
+
+ getMouseStatus(&handle, &pt.x, &button, &pt.y);
+
+ if (!button)
+ buttonDown = 0;
+ else if (!buttonDown && button) {
+ *buttonPtr = button;
+ buttonDown = 1;
+ }
+
+ return false;
+}
+
int processInput(void) {
int16 mouseX = 0;
int16 mouseY = 0;
@@ -1796,13 +1812,8 @@ void mainLoop(void) {
}
if (userWait) {
- int16 mouseButton;
- int16 mouseX;
- int16 mouseY;
-
- do {
- getMouseStatus(&main10, &mouseX, &mouseButton, &mouseY);
- } while (mouseButton);
+ int16 mouseButton = 0;
+ checkInput(&mouseButton);
while (!mouseButton) {
manageScripts(&relHead);
@@ -1813,13 +1824,12 @@ void mainLoop(void) {
processAnimation();
+ flip();
+
// not exactly this
manageEvents();
- int16 mouseVar;
- getMouseStatus(&mouseVar, &mouseX, &mouseButton, &mouseY);
-
- flip();
+ checkInput(&mouseButton);
}
changeScriptParamInList(-1, -1, &procHead, 9999, 0);