diff options
author | Matthew Hoops | 2011-08-08 21:36:50 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-08-08 21:36:50 -0400 |
commit | 677aa783707c566feea50608e2f0ba669037888b (patch) | |
tree | 8bed08790a96c7c25a5355a20fe00e7be30aed69 /backends/graphics/linuxmotosdl | |
parent | 9c52724ce56c16c7fe1e9fdd3532d7e14b53c238 (diff) | |
parent | dbceb0a77d64d6e16b0186417ab92c425eddb173 (diff) | |
download | scummvm-rg350-677aa783707c566feea50608e2f0ba669037888b.tar.gz scummvm-rg350-677aa783707c566feea50608e2f0ba669037888b.tar.bz2 scummvm-rg350-677aa783707c566feea50608e2f0ba669037888b.zip |
Merge remote branch 'upstream/master' into soccer
Diffstat (limited to 'backends/graphics/linuxmotosdl')
-rw-r--r-- | backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp | 22 | ||||
-rw-r--r-- | backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h | 3 |
2 files changed, 10 insertions, 15 deletions
diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp index 732074b7e2..e59d3f975b 100644 --- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp +++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp @@ -478,21 +478,17 @@ void LinuxmotoSdlGraphicsManager::warpMouse(int x, int y) { SurfaceSdlGraphicsManager::warpMouse(x, y); } -void LinuxmotoSdlGraphicsManager::adjustMouseEvent(const Common::Event &event) { - if (!event.synthetic) { - Common::Event newEvent(event); - newEvent.synthetic = true; - if (!_overlayVisible) { - if (_videoMode.mode == GFX_HALF) { - newEvent.mouse.x *= 2; - newEvent.mouse.y *= 2; - } - newEvent.mouse.x /= _videoMode.scaleFactor; - newEvent.mouse.y /= _videoMode.scaleFactor; - if (_videoMode.aspectRatioCorrection) - newEvent.mouse.y = aspect2Real(newEvent.mouse.y); +void LinuxmotoSdlGraphicsManager::transformMouseCoordinates(Common::Point &point) { + if (!_overlayVisible) { + if (_videoMode.mode == GFX_HALF) { + point.x *= 2; + point.y *= 2; } g_system->getEventManager()->pushEvent(newEvent); + point.x /= _videoMode.scaleFactor; + point.y /= _videoMode.scaleFactor; + if (_videoMode.aspectRatioCorrection) + point.y = aspect2Real(point.y); } } diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h index 938512f323..ee2a566d71 100644 --- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h +++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h @@ -42,8 +42,7 @@ public: virtual void hideOverlay(); virtual void warpMouse(int x, int y); -protected: - virtual void adjustMouseEvent(const Common::Event &event); + virtual void transformMouseCoordinates(Common::Point &point); }; #endif |