[Scummvm-cvs-logs] scummvm master -> 20afbe95e64b4368d1380a533598fea8aa90dbd5

bluegr bluegr at gmail.com
Tue Nov 6 11:10:20 CET 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
20afbe95e6 DREAMWEB: Fix bug #3582582 - "GUI: "Grid View" Loader Triggers Immediately in Dreamweb"


Commit: 20afbe95e64b4368d1380a533598fea8aa90dbd5
    https://github.com/scummvm/scummvm/commit/20afbe95e64b4368d1380a533598fea8aa90dbd5
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2012-11-06T02:08:55-08:00

Commit Message:
DREAMWEB: Fix bug #3582582 - "GUI: "Grid View" Loader Triggers Immediately in Dreamweb"

Changed paths:
    engines/dreamweb/saveload.cpp



diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index ea9cdc0..162ad53 100644
--- a/engines/dreamweb/saveload.cpp
+++ b/engines/dreamweb/saveload.cpp
@@ -156,8 +156,16 @@ void DreamWebEngine::doLoad(int savegameId) {
 	} else {
 
 		if (savegameId == -1) {
-			// Open dialog to get savegameId
+			// Wait till both mouse buttons are up. We should wait till the user
+			// releases the mouse button, otherwise the follow-up mouseup event
+			// will trigger a load of the save slot under the mouse cursor. Fixes
+			// bug #3582582.
+			while (_oldMouseState > 0) {
+				readMouse();
+				g_system->delayMillis(10);
+			}
 
+			// Open dialog to get savegameId
 			GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
 			savegameId = dialog->runModalWithCurrentTarget();
 			delete dialog;
@@ -241,6 +249,15 @@ void DreamWebEngine::saveGame() {
 		}
 		return;
 	} else {
+		// Wait till both mouse buttons are up. We should wait till the user
+		// releases the mouse button, otherwise the follow-up mouseup event
+		// will trigger a save into the save slot under the mouse cursor. Fixes
+		// bug #3582582.
+		while (_oldMouseState > 0) {
+			readMouse();
+			g_system->delayMillis(10);
+		}
+
 		GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
 		int savegameId = dialog->runModalWithCurrentTarget();
 		Common::String game_description = dialog->getResultString();






More information about the Scummvm-git-logs mailing list