aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/inter_v2.cpp4
-rw-r--r--engines/gob/util.cpp6
-rw-r--r--engines/gob/util.h1
3 files changed, 10 insertions, 1 deletions
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index 63c451dedc..f605b11720 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -2240,7 +2240,9 @@ void Inter_v2::o2_totSub(void) {
totFile[i] = 0;
}
- _vm->_util->longDelay(100);
+ // WORKAROUND: There is a race condition in the script when opening the notepad
+ if (!scumm_stricmp(totFile, "edit"))
+ _vm->_util->forceMouseUp();
flags = (byte) *_vm->_global->_inter_execPtr++;
_vm->_game->totSub(flags, totFile);
}
diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp
index 47a5ce076d..f7c5fa9202 100644
--- a/engines/gob/util.cpp
+++ b/engines/gob/util.cpp
@@ -488,4 +488,10 @@ void Util::waitMouseRelease(char drawMouse) {
}
void Util::keyboard_release(void) {;}
+
+void Util::forceMouseUp(void) {
+ _vm->_game->_mouseButtons = 0;
+ _mouseButtons = 0;
+}
+
} // End of namespace Gob
diff --git a/engines/gob/util.h b/engines/gob/util.h
index 1b9b40b72e..701d295f52 100644
--- a/engines/gob/util.h
+++ b/engines/gob/util.h
@@ -83,6 +83,7 @@ public:
static void deleteList(List * list);
static void prepareStr(char *str);
void waitMouseRelease(char drawMouse);
+ void forceMouseUp(void);
static const char trStr1[];
static const char trStr2[];