[Scummvm-cvs-logs] CVS: scummvm/common scaler.cpp,1.26,1.27

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Sun Jun 22 07:42:02 CEST 2003


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv11116

Modified Files:
	scaler.cpp 
Log Message:
Fix some graphics glitches that would sometimes be visible around the mouse
cursor in aspect-ratio correction mode.


Index: scaler.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scaler.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- scaler.cpp	22 Jun 2003 14:36:12 -0000	1.26
+++ scaler.cpp	22 Jun 2003 14:41:09 -0000	1.27
@@ -697,19 +697,20 @@
 	for (y = maxDstY; y >= srcY; y--) {
 		uint8 *srcPtr = buf + srcX * 2 + (aspect2Real(y) + off) * pitch;
 
-		if (srcPtr == dstPtr)
-			break;
-		
 #if 0
 		// Don't use bilinear filtering, rather just duplicate pixel lines:
 		// a little bit faster, but looks ugly
+		if (srcPtr == dstPtr)
+			break;
+		
 		memcpy(dstPtr, srcPtr, width * 2);
 #else
 		// Bilinear filter
 		switch (y % 6) {
 		case 0:
 		case 5:
-			memcpy(dstPtr, srcPtr, width * 2);
+			if (srcPtr != dstPtr)
+				memcpy(dstPtr, srcPtr, width * 2);
 			break;
 		case 1:
 		case 4:





More information about the Scummvm-git-logs mailing list