aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl
diff options
context:
space:
mode:
authorMartin Kiewitz2010-06-15 16:58:03 +0000
committerMartin Kiewitz2010-06-15 16:58:03 +0000
commit831e626ccd488df9e8c3d534bf129c48e66f18e0 (patch)
tree84e964232e2738f8d03f28f63a9ef45226713d82 /backends/platform/sdl
parentcf38303497e00744fbd7c95bbd711d25cac1c6c4 (diff)
downloadscummvm-rg350-831e626ccd488df9e8c3d534bf129c48e66f18e0.tar.gz
scummvm-rg350-831e626ccd488df9e8c3d534bf129c48e66f18e0.tar.bz2
scummvm-rg350-831e626ccd488df9e8c3d534bf129c48e66f18e0.zip
SDL: only change mouse cursor, when mouse is currently within our window, also enable mouse position changing again for SCI
svn-id: r49866
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r--backends/platform/sdl/graphics.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp
index 83a256f568..721cc54c90 100644
--- a/backends/platform/sdl/graphics.cpp
+++ b/backends/platform/sdl/graphics.cpp
@@ -1377,6 +1377,10 @@ void OSystem_SDL::setMousePos(int x, int y) {
void OSystem_SDL::warpMouse(int x, int y) {
int y1 = y;
+ // Don't change mouse position, when mouse is outside of our window (in case of windowed mode)
+ if (!(SDL_GetAppState( ) & SDL_APPMOUSEFOCUS))
+ return;
+
if (_videoMode.aspectRatioCorrection && !_overlayVisible)
y1 = real2Aspect(y);