From 9a4e433f88df01918c426ce92e903632730de7d9 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 10 Mar 2011 20:02:05 -0500 Subject: SCI: Fix mouse positions in upscaled games A regression from 463e475bd65 --- engines/sci/event.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp index dce776a1a6..50244919c9 100644 --- a/engines/sci/event.cpp +++ b/engines/sci/event.cpp @@ -32,6 +32,7 @@ #include "sci/console.h" #include "sci/engine/state.h" #include "sci/engine/kernel.h" +#include "sci/graphics/screen.h" namespace Sci { @@ -156,7 +157,11 @@ SciEvent EventManager::getScummVMEvent() { // This should be safe, since the mouse position in the event manager should // only be updated when a mouse related event has been taken from the queue // via pollEvent. - noEvent.mousePos = input.mousePos = em->getMousePos(); + // We also adjust the position based on the scaling of the screen. + Common::Point mousePos = em->getMousePos(); + g_sci->_gfxScreen->adjustBackUpscaledCoordinates(mousePos.y, mousePos.x); + + noEvent.mousePos = input.mousePos = mousePos; if (!found || ev.type == Common::EVENT_MOUSEMOVE) return noEvent; -- cgit v1.2.3