[Scummvm-git-logs] scummvm master -> 85a34350d28ee7e0836dbad15a15cf086c8f99a4

AndywinXp noreply at scummvm.org
Wed Oct 4 22:02:11 UTC 2023


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:
85a34350d2 SWORD1: Properly init virtual mouse coordinates


Commit: 85a34350d28ee7e0836dbad15a15cf086c8f99a4
    https://github.com/scummvm/scummvm/commit/85a34350d28ee7e0836dbad15a15cf086c8f99a4
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-10-05T00:02:04+02:00

Commit Message:
SWORD1: Properly init virtual mouse coordinates

This ensures that when loading a savegame the top menu bar
doesn't enter in its open state by mistake because the mouse
coordinates are wrongly set as (0,0).

Changed paths:
    engines/sword1/sword1.cpp


diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 063b1de5301..bcbb3cf9cf9 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -108,6 +108,10 @@ Common::Error SwordEngine::init() {
 	_mouse->useLogicAndMenu(_logic, _menu);
 	_mouse->useScreenMutex(&_screen->_screenAccessMutex);
 
+	// Init the virtual mouse coordinates to be at the center of the screen
+	_mouseCoord.x = SCREEN_WIDTH / 2;
+	_mouseCoord.y = SCREEN_FULL_DEPTH / 2;
+
 	syncSoundSettings();
 
 	_systemVars.justRestoredGame = 0;




More information about the Scummvm-git-logs mailing list