From b7147fda30ad4ed5be4fdc79bd17387d05ebae8d Mon Sep 17 00:00:00 2001 From: athrxx Date: Tue, 2 Jul 2024 22:08:48 +0200 Subject: [PATCH] SCI: fix bug no. 15242 (regression from PR 5877) --- engines/sci/event.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp index f8f7b041447..87ba1fddfba 100644 --- a/engines/sci/event.cpp +++ b/engines/sci/event.cpp @@ -206,10 +206,11 @@ SciEvent EventManager::getScummVMEvent() { found = em->pollEvent(ev); } while (found && ev.type == Common::EVENT_MOUSEMOVE); - Common::Point mousePos = g_sci->_gfxScreen->gfxDriver()->getMousePos(); + Common::Point mousePos; #if ENABLE_SCI32 if (getSciVersion() >= SCI_VERSION_2) { + mousePos = em->getMousePos(); const GfxFrameout *gfxFrameout = g_sci->_gfxFrameout; // This will clamp `mousePos` according to the restricted zone, @@ -226,6 +227,7 @@ SciEvent EventManager::getScummVMEvent() { } } else { #endif + mousePos = g_sci->_gfxScreen->gfxDriver()->getMousePos(); g_sci->_gfxScreen->adjustBackUpscaledCoordinates(mousePos.y, mousePos.x); #if ENABLE_SCI32 }