From 8acefe1804cb369c9d15f50b1e63b216bae502a9 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 26 Feb 2006 14:31:44 +0000 Subject: The warpMouse() function needs to compensate for aspect-ratio correction, or the Lure popup menus won't work. svn-id: r20915 --- backends/sdl/graphics.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'backends/sdl') diff --git a/backends/sdl/graphics.cpp b/backends/sdl/graphics.cpp index 138e70d279..fb93a6a322 100644 --- a/backends/sdl/graphics.cpp +++ b/backends/sdl/graphics.cpp @@ -1129,9 +1129,6 @@ void OSystem_SDL::showOverlay() { x = _mouseCurState.x * _overlayScale; y = _mouseCurState.y * _overlayScale; - if (_adjustAspectRatio) - y = real2Aspect(y); - warpMouse(x, y); clearOverlay(); @@ -1152,9 +1149,6 @@ void OSystem_SDL::hideOverlay() { x = _mouseCurState.x / _overlayScale; y = _mouseCurState.y / _overlayScale; - if (_adjustAspectRatio) - y = real2Aspect(y); - warpMouse(x, y); clearOverlay(); @@ -1296,6 +1290,9 @@ void OSystem_SDL::setMousePos(int x, int y) { } void OSystem_SDL::warpMouse(int x, int y) { + if (_adjustAspectRatio) + y = real2Aspect(y); + if (_mouseCurState.x != x || _mouseCurState.y != y) { if (_overlayVisible) SDL_WarpMouse(x * _scaleFactor / _overlayScale, y * _scaleFactor / _overlayScale); -- cgit v1.2.3