[Scummvm-cvs-logs] CVS: scummvm/backends/sdl graphics.cpp,1.53,1.54

Eugene Sandulenko sev at users.sourceforge.net
Sun Aug 14 18:24:09 CEST 2005


Update of /cvsroot/scummvm/scummvm/backends/sdl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6916

Modified Files:
	graphics.cpp 
Log Message:
Apply bug/patch #1258912 "GUI: SDL mouse dirty rects too big"


Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/graphics.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- graphics.cpp	30 Jul 2005 21:10:55 -0000	1.53
+++ graphics.cpp	15 Aug 2005 01:23:41 -0000	1.54
@@ -1523,6 +1523,24 @@
 	src.w = dst.w;
 	src.h = dst.h;
 
+	// Patch #1258912 "GUI: SDL mouse dirty rects too big"
+	//
+	// At this point, dst.w and dst.h appear to be the correct values to
+	// assign to src.w and src.h above, but they are NOT the actual
+	// width and height of the mouse in virtual coordinates required for
+	// the dirty rects.  If left uncorrected, the w and h values are 1.5x
+	// too large for 3x scalers when the overlay is visible, and 2x/3x too
+	// large for 2x/3x scalers when the overlay is not visible, resulting
+	// in dirty rects that are from 2.25x to 9x too large depending on the
+	// combination of scales.
+	if (!_overlayVisible) {
+		dst.w = _mouseCurState.w;
+		dst.h = _mouseCurState.h;
+	} else {
+		dst.w = _mouseCurState.w * _overlayScale;
+		dst.h = _mouseCurState.h * _overlayScale;
+	}
+
 	if (_adjustAspectRatio)
 		dst.y = real2Aspect(dst.y);
 





More information about the Scummvm-git-logs mailing list