[Scummvm-cvs-logs] scummvm master -> 9a4e433f88df01918c426ce92e903632730de7d9
clone2727
clone2727 at gmail.com
Fri Mar 11 02:05:46 CET 2011
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:
9a4e433f88 SCI: Fix mouse positions in upscaled games
Commit: 9a4e433f88df01918c426ce92e903632730de7d9
https://github.com/scummvm/scummvm/commit/9a4e433f88df01918c426ce92e903632730de7d9
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2011-03-10T17:02:05-08:00
Commit Message:
SCI: Fix mouse positions in upscaled games
A regression from 463e475bd65
Changed paths:
engines/sci/event.cpp
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index dce776a..5024491 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;
More information about the Scummvm-git-logs
mailing list