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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Thu Feb 26 03:04:30 CET 2009


Revision: 38890
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38890&view=rev
Author:   lordhoto
Date:     2009-02-26 02:04:30 +0000 (Thu, 26 Feb 2009)

Log Message:
-----------
- Fix cursor drawing bug on (cursor) palette change
- Fix cursor drawing when it was hidden before and no dirty rects are present
- Diese und die folgenden Zeilen werden ignoriert --

M    sdl/graphics.cpp

Modified Paths:
--------------
    scummvm/trunk/backends/platform/sdl/graphics.cpp

Modified: scummvm/trunk/backends/platform/sdl/graphics.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/graphics.cpp	2009-02-25 23:50:16 UTC (rev 38889)
+++ scummvm/trunk/backends/platform/sdl/graphics.cpp	2009-02-26 02:04:30 UTC (rev 38890)
@@ -667,8 +667,7 @@
 	}
 
 	// Only draw anything if necessary
-	if (_numDirtyRects > 0) {
-
+	if (_numDirtyRects > 0 || _mouseNeedsRedraw) {
 		SDL_Rect *r;
 		SDL_Rect dst;
 		uint32 srcPitch, dstPitch;
@@ -744,7 +743,6 @@
 
 	_numDirtyRects = 0;
 	_forceFull = false;
-	_mouseNeedsRedraw = false;
 }
 
 bool OSystem_SDL::saveScreenshot(const char *filename) {
@@ -1315,7 +1313,6 @@
 	if (w == 0 || h == 0)
 		return;
 
-	_mouseNeedsRedraw = true;
 	_mouseCurState.hotX = hotspot_x;
 	_mouseCurState.hotY = hotspot_y;
 
@@ -1361,6 +1358,8 @@
 	if (!_mouseOrigSurface || !_mouseData)
 		return;
 
+	_mouseNeedsRedraw = true;
+
 	w = _mouseCurState.w;
 	h = _mouseCurState.h;
 
@@ -1531,9 +1530,8 @@
 
 	// When we switch bigger overlay off mouse jumps. Argh!
 	// This is intended to prevent undrawing offscreen mouse
-	if (!_overlayVisible && (x >= _videoMode.screenWidth || y >= _videoMode.screenHeight)) {
+	if (!_overlayVisible && (x >= _videoMode.screenWidth || y >= _videoMode.screenHeight))
 		return;
-	}
 
 	if (_mouseBackup.w != 0 && _mouseBackup.h != 0)
 		addDirtyRect(x, y, _mouseBackup.w, _mouseBackup.h);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list