aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-02-26 14:31:44 +0000
committerTorbjörn Andersson2006-02-26 14:31:44 +0000
commit8acefe1804cb369c9d15f50b1e63b216bae502a9 (patch)
tree50184f2bc836c72c20d544e43965910336667a16 /backends
parentf13d294ae5e12a5906cf6088f5bc309d51192a9c (diff)
downloadscummvm-rg350-8acefe1804cb369c9d15f50b1e63b216bae502a9.tar.gz
scummvm-rg350-8acefe1804cb369c9d15f50b1e63b216bae502a9.tar.bz2
scummvm-rg350-8acefe1804cb369c9d15f50b1e63b216bae502a9.zip
The warpMouse() function needs to compensate for aspect-ratio correction, or
the Lure popup menus won't work. svn-id: r20915
Diffstat (limited to 'backends')
-rw-r--r--backends/sdl/graphics.cpp9
1 files changed, 3 insertions, 6 deletions
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);