[Scummvm-cvs-logs] SF.net SVN: scummvm:[54407] scummvm/trunk/engines/sci/event.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Nov 21 12:04:53 CET 2010


Revision: 54407
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54407&view=rev
Author:   thebluegr
Date:     2010-11-21 11:04:52 +0000 (Sun, 21 Nov 2010)

Log Message:
-----------
SCI: Fix for bug #3037996 - "QFG2: Crash during import dialog after time (import works)"

Modified Paths:
--------------
    scummvm/trunk/engines/sci/event.cpp

Modified: scummvm/trunk/engines/sci/event.cpp
===================================================================
--- scummvm/trunk/engines/sci/event.cpp	2010-11-21 10:31:02 UTC (rev 54406)
+++ scummvm/trunk/engines/sci/event.cpp	2010-11-21 11:04:52 UTC (rev 54407)
@@ -346,6 +346,20 @@
 			break;
 		}
 	}
+	
+	// WORKAROUND: In the QFG2 character screen, if the user right clicks and
+	// then left clicks on something, an invalid reference is passed to kStrAt.
+	// This is a script bug, as only left mouse clicks should be processed by
+	// the game in that screen. Therefore, we work around it here by filtering
+	// out all right and middle mouse button clicks. Fixes bug #3037996.
+	if (g_sci->getGameId() == GID_QFG2 && g_sci->getEngineState()->currentRoomNumber() == 805) {
+		if ((input.type == SCI_EVENT_MOUSE_PRESS || input.type == SCI_EVENT_MOUSE_RELEASE) && input.data > 1) {
+			input.type = SCI_EVENT_NONE;
+			input.character = 0;
+			input.data = 0;
+			input.modifiers = 0;
+		}
+	}
 
 	return input;
 }


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