aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorFilippos Karapetis2012-11-06 12:08:55 +0200
committerFilippos Karapetis2012-11-06 12:08:55 +0200
commit20afbe95e64b4368d1380a533598fea8aa90dbd5 (patch)
treef4ab6563e3271ebb459ce8463ca116619bfe01ba /engines/dreamweb
parent06a2ac495de588103f4c42bb03597d965965e8cf (diff)
downloadscummvm-rg350-20afbe95e64b4368d1380a533598fea8aa90dbd5.tar.gz
scummvm-rg350-20afbe95e64b4368d1380a533598fea8aa90dbd5.tar.bz2
scummvm-rg350-20afbe95e64b4368d1380a533598fea8aa90dbd5.zip
DREAMWEB: Fix bug #3582582 - "GUI: "Grid View" Loader Triggers Immediately in Dreamweb"
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/saveload.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index ea9cdc0249..162ad53cde 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();