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

sev at users.sourceforge.net sev at users.sourceforge.net
Fri Jul 23 18:38:31 CEST 2010


Revision: 51212
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51212&view=rev
Author:   sev
Date:     2010-07-23 16:38:31 +0000 (Fri, 23 Jul 2010)

Log Message:
-----------
SDL: Fix bug #3025258

Bug #3025258: "Cursor Leaves Trail in GUI when Screen is Shaking". Based
on patch provided by eriktorbjorn but extended with another edge case.

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

Modified: scummvm/trunk/backends/platform/sdl/graphics.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/graphics.cpp	2010-07-23 16:38:06 UTC (rev 51211)
+++ scummvm/trunk/backends/platform/sdl/graphics.cpp	2010-07-23 16:38:31 UTC (rev 51212)
@@ -783,7 +783,8 @@
 #endif
 
 	// If the shake position changed, fill the dirty area with blackness
-	if (_currentShakePos != _newShakePos) {
+	if (_currentShakePos != _newShakePos || 
+		(_mouseNeedsRedraw && _mouseBackup.y <= _currentShakePos)) {
 		SDL_Rect blackrect = {0, 0, _videoMode.screenWidth * _videoMode.scaleFactor, _newShakePos * _videoMode.scaleFactor};
 
 		if (_videoMode.aspectRatioCorrection && !_overlayVisible)
@@ -1681,7 +1682,7 @@
 		return;
 
 	if (_mouseBackup.w != 0 && _mouseBackup.h != 0)
-		addDirtyRect(x, y, _mouseBackup.w, _mouseBackup.h);
+		addDirtyRect(x, y - _currentShakePos, _mouseBackup.w, _mouseBackup.h);
 }
 
 void OSystem_SDL::drawMouse() {


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