[Scummvm-cvs-logs] SF.net SVN: scummvm: [20915] scummvm/trunk/backends/sdl/graphics.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sun Feb 26 06:32:09 CET 2006


Revision: 20915
Author:   eriktorbjorn
Date:     2006-02-26 06:31:44 -0800 (Sun, 26 Feb 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm?rev=20915&view=rev

Log Message:
-----------
The warpMouse() function needs to compensate for aspect-ratio correction, or
the Lure popup menus won't work.

Modified Paths:
--------------
    scummvm/trunk/backends/sdl/graphics.cpp
Modified: scummvm/trunk/backends/sdl/graphics.cpp
===================================================================
--- scummvm/trunk/backends/sdl/graphics.cpp	2006-02-26 13:43:50 UTC (rev 20914)
+++ scummvm/trunk/backends/sdl/graphics.cpp	2006-02-26 14:31:44 UTC (rev 20915)
@@ -1129,9 +1129,6 @@
 	x = _mouseCurState.x * _overlayScale;
 	y = _mouseCurState.y * _overlayScale;
 
-	if (_adjustAspectRatio)
-		y = real2Aspect(y);
-
 	warpMouse(x, y);
 
 	clearOverlay();
@@ -1152,9 +1149,6 @@
 	x = _mouseCurState.x / _overlayScale;
 	y = _mouseCurState.y / _overlayScale;
 
-	if (_adjustAspectRatio)
-		y = real2Aspect(y);
-
 	warpMouse(x, y);
 
 	clearOverlay();
@@ -1296,6 +1290,9 @@
 }
 
 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);







More information about the Scummvm-git-logs mailing list