aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp')
-rw-r--r--backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
index 390b27e5a5..dbedb2e1a7 100644
--- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
+++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
@@ -474,16 +474,21 @@ void LinuxmotoSdlGraphicsManager::warpMouse(int x, int y) {
SdlGraphicsManager::warpMouse(x, y);
}
-void LinuxmotoSdlGraphicsManager::adjustMouseEvent(Common::Event &event) {
- if (!_overlayVisible) {
- if (_videoMode.mode == GFX_HALF) {
- event.mouse.x *= 2;
- event.mouse.y *= 2;
+void LinuxmotoSdlGraphicsManager::adjustMouseEvent(const Common::Event &event) {
+ if (!event.synthetic) {
+ Common::Event newEvent(event);
+ newEvent.synthetic = true;
+ if (!_overlayVisible) {
+ if (_videoMode.mode == GFX_HALF) {
+ event.mouse.x *= 2;
+ event.mouse.y *= 2;
+ }
+ newEvent.mouse.x /= _videoMode.scaleFactor;
+ newEvent.mouse.y /= _videoMode.scaleFactor;
+ if (_videoMode.aspectRatioCorrection)
+ newEvent.mouse.y = aspect2Real(newEvent.mouse.y);
}
- event.mouse.x /= _videoMode.scaleFactor;
- event.mouse.y /= _videoMode.scaleFactor;
- if (_videoMode.aspectRatioCorrection)
- event.mouse.y = aspect2Real(event.mouse.y);
+ g_system->getEventManager()->pushEvent(newEvent);
}
}