[Scummvm-cvs-logs] SF.net SVN: scummvm: [25255] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Mon Jan 29 18:59:29 CET 2007


Revision: 25255
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25255&view=rev
Author:   drmccoy
Date:     2007-01-29 09:59:28 -0800 (Mon, 29 Jan 2007)

Log Message:
-----------
Added a proper workaround for the race condition in the script when opening the notepad, which was apparently causing bug #1621089

Modified Paths:
--------------
    scummvm/trunk/engines/gob/inter_v2.cpp
    scummvm/trunk/engines/gob/util.cpp
    scummvm/trunk/engines/gob/util.h

Modified: scummvm/trunk/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v2.cpp	2007-01-29 17:18:25 UTC (rev 25254)
+++ scummvm/trunk/engines/gob/inter_v2.cpp	2007-01-29 17:59:28 UTC (rev 25255)
@@ -2240,7 +2240,9 @@
 		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);
 }

Modified: scummvm/trunk/engines/gob/util.cpp
===================================================================
--- scummvm/trunk/engines/gob/util.cpp	2007-01-29 17:18:25 UTC (rev 25254)
+++ scummvm/trunk/engines/gob/util.cpp	2007-01-29 17:59:28 UTC (rev 25255)
@@ -488,4 +488,10 @@
 }
 
 void Util::keyboard_release(void) {;}
+
+void Util::forceMouseUp(void) {
+	_vm->_game->_mouseButtons = 0;
+	_mouseButtons = 0;
+}
+
 } // End of namespace Gob

Modified: scummvm/trunk/engines/gob/util.h
===================================================================
--- scummvm/trunk/engines/gob/util.h	2007-01-29 17:18:25 UTC (rev 25254)
+++ scummvm/trunk/engines/gob/util.h	2007-01-29 17:59:28 UTC (rev 25255)
@@ -83,6 +83,7 @@
 	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[];


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list