[Scummvm-cvs-logs] CVS: scummvm/backends/wince wince.cpp,1.16,1.17

Nicolas Bacca arisme at users.sourceforge.net
Mon Jul 21 05:51:14 CEST 2003


Update of /cvsroot/scummvm/scummvm/backends/wince
In directory sc8-pr-cvs1:/tmp/cvs-serv6334

Modified Files:
	wince.cpp 
Log Message:
Fix 774982

Index: wince.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/wince.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- wince.cpp	20 Jul 2003 23:47:39 -0000	1.16
+++ wince.cpp	21 Jul 2003 12:50:20 -0000	1.17
@@ -1445,6 +1445,26 @@
 	if (!hide_cursor && _mouse_drawn)
 		undraw_mouse();
 
+	/* Clip */
+	if (x < 0) {
+		w += x;
+		buf -= x;
+		x = 0;
+	}
+	if (y < 0) {
+		h += y;
+		buf -= y * pitch;
+		y = 0;
+	}
+	if (w > _screenWidth - x)
+		w = _screenWidth - x;
+
+	if (h > _screenHeight - y)
+		h = _screenHeight - y;
+
+	if (w <= 0 || h <= 0)
+		return;
+
 	AddDirtyRect(x, y, w, h);
 
 	if (x == 0 && y == 0 && w == _screenWidth && h == _screenHeight) {





More information about the Scummvm-git-logs mailing list