aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/event.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2010-11-21 11:04:52 +0000
committerFilippos Karapetis2010-11-21 11:04:52 +0000
commit8045c4f87a0d2ff7bf446c74a0dfd31aa9db69e2 (patch)
treed8cc46565286aaab6d40d2dbdd18de01858d4d26 /engines/sci/event.cpp
parent788598a6899d7252164b1727ccaf1f7eb2d2b1c4 (diff)
downloadscummvm-rg350-8045c4f87a0d2ff7bf446c74a0dfd31aa9db69e2.tar.gz
scummvm-rg350-8045c4f87a0d2ff7bf446c74a0dfd31aa9db69e2.tar.bz2
scummvm-rg350-8045c4f87a0d2ff7bf446c74a0dfd31aa9db69e2.zip
SCI: Fix for bug #3037996 - "QFG2: Crash during import dialog after time (import works)"
svn-id: r54407
Diffstat (limited to 'engines/sci/event.cpp')
-rw-r--r--engines/sci/event.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index 86cf44b505..5d8f6a8a28 100644
--- a/engines/sci/event.cpp
+++ b/engines/sci/event.cpp
@@ -346,6 +346,20 @@ SciEvent EventManager::getScummVMEvent() {
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;
}