diff options
author | Sven Hesse | 2007-01-29 17:59:28 +0000 |
---|---|---|
committer | Sven Hesse | 2007-01-29 17:59:28 +0000 |
commit | 0058049e3224b10d1d8a074d70eb092a9a780fd3 (patch) | |
tree | 765660d78c751f74e86297cbed2b271497e16278 /engines/gob | |
parent | 36a54218b16cef112909bb5362f5d85615368fab (diff) | |
download | scummvm-rg350-0058049e3224b10d1d8a074d70eb092a9a780fd3.tar.gz scummvm-rg350-0058049e3224b10d1d8a074d70eb092a9a780fd3.tar.bz2 scummvm-rg350-0058049e3224b10d1d8a074d70eb092a9a780fd3.zip |
Added a proper workaround for the race condition in the script when opening the notepad, which was apparently causing bug #1621089
svn-id: r25255
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/inter_v2.cpp | 4 | ||||
-rw-r--r-- | engines/gob/util.cpp | 6 | ||||
-rw-r--r-- | engines/gob/util.h | 1 |
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[]; |