aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2011-03-10 20:02:05 -0500
committerMatthew Hoops2011-03-10 20:02:05 -0500
commit9a4e433f88df01918c426ce92e903632730de7d9 (patch)
tree13487e3e9ae17409c209fa7b645d5cffa19536c6
parent2cbcc76789f72f693763661422e4bf30b2f3441d (diff)
downloadscummvm-rg350-9a4e433f88df01918c426ce92e903632730de7d9.tar.gz
scummvm-rg350-9a4e433f88df01918c426ce92e903632730de7d9.tar.bz2
scummvm-rg350-9a4e433f88df01918c426ce92e903632730de7d9.zip
SCI: Fix mouse positions in upscaled games
A regression from 463e475bd65
-rw-r--r--engines/sci/event.cpp7
1 files changed, 6 insertions, 1 deletions
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;