[Scummvm-git-logs] scummvm master -> ecfed7a954ededa8a38054210cadb694e46cabf5

eriktorbjorn noreply at scummvm.org
Tue Dec 14 11:41:54 UTC 2021


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:
ecfed7a954 SHERLOCK: Clear events after Scalpel window sliding animation


Commit: ecfed7a954ededa8a38054210cadb694e46cabf5
    https://github.com/scummvm/scummvm/commit/ecfed7a954ededa8a38054210cadb694e46cabf5
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-12-14T12:39:08+01:00

Commit Message:
SHERLOCK: Clear events after Scalpel window sliding animation

Before, the game would sometimes register the mouse release event right
as the mouse pointer passed over the Exit button, causing e.g the
conversation window to close right away. This was probably also what
caused it to sometimes select conversation topics seemingly at random
for me.

Changed paths:
    engines/sherlock/scalpel/scalpel_user_interface.cpp


diff --git a/engines/sherlock/scalpel/scalpel_user_interface.cpp b/engines/sherlock/scalpel/scalpel_user_interface.cpp
index 5d4a1bccc7..1469af040f 100644
--- a/engines/sherlock/scalpel/scalpel_user_interface.cpp
+++ b/engines/sherlock/scalpel/scalpel_user_interface.cpp
@@ -2106,6 +2106,8 @@ void ScalpelUserInterface::summonWindow(const Surface &bgSurface, bool slideUp)
 		}
 	}
 
+	events.clearEvents();
+
 	// Final display of the entire window
 	screen.getBackBuffer()->SHblitFrom(bgSurface, Common::Point(0, SHERLOCK_SCREEN_HEIGHT - bgSurface.height()),
 		Common::Rect(0, 0, bgSurface.width(), bgSurface.height()));
@@ -2189,6 +2191,8 @@ void ScalpelUserInterface::banishWindow(bool slideUp) {
 			screen.slamRect(Common::Rect(0, CONTROLS_Y1, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT));
 		}
 
+		events.clearEvents();
+
 		_infoFlag = false;
 		_windowOpen = false;
 	}




More information about the Scummvm-git-logs mailing list