aboutsummaryrefslogtreecommitdiff
path: root/backends/sdl
diff options
context:
space:
mode:
authorPaweł Kołodziejski2003-03-29 09:56:51 +0000
committerPaweł Kołodziejski2003-03-29 09:56:51 +0000
commit848c566d507968f80b42a99f68b881c3d471fd27 (patch)
treec0d33d398246e06ffd92ce23263a9631ceacea4d /backends/sdl
parentc13452c7b627afcb8ff5462ef30c8a23e504dcde (diff)
downloadscummvm-rg350-848c566d507968f80b42a99f68b881c3d471fd27.tar.gz
scummvm-rg350-848c566d507968f80b42a99f68b881c3d471fd27.tar.bz2
scummvm-rg350-848c566d507968f80b42a99f68b881c3d471fd27.zip
fix for wrong(or rather unset) mouse 0,0 (x,y) position when joystick is plugged
when code handle joystick motion and mapping to mouse motion, it should also set mouse x,y position svn-id: r6880
Diffstat (limited to 'backends/sdl')
-rw-r--r--backends/sdl/sdl-common.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/sdl/sdl-common.cpp b/backends/sdl/sdl-common.cpp
index 14ef88b4e7..c5905da384 100644
--- a/backends/sdl/sdl-common.cpp
+++ b/backends/sdl/sdl-common.cpp
@@ -780,6 +780,10 @@ bool OSystem_SDL_Common::poll_event(Event *event) {
}
#endif
}
+ event->mouse.x = km.x;
+ event->mouse.y = km.y;
+ event->mouse.x /= _scaleFactor;
+ event->mouse.y /= _scaleFactor;
return true;
case SDL_VIDEOEXPOSE: