[Scummvm-cvs-logs] SF.net SVN: scummvm:[33182] scummvm/branches/gsoc2008-gui

Tanoku at users.sourceforge.net Tanoku at users.sourceforge.net
Mon Jul 21 23:23:23 CEST 2008


Revision: 33182
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33182&view=rev
Author:   Tanoku
Date:     2008-07-21 21:23:23 +0000 (Mon, 21 Jul 2008)

Log Message:
-----------
Fixed several segfaults and graphical glitches when drawing at low resolutions. Fixed dialog stack redrawing.

Modified Paths:
--------------
    scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp
    scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.h
    scummvm/branches/gsoc2008-gui/gui/newgui.cpp

Modified: scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp	2008-07-21 21:11:28 UTC (rev 33181)
+++ scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp	2008-07-21 21:23:23 UTC (rev 33182)
@@ -440,8 +440,8 @@
 		w <= 0 || h <= 0 || x < 0 || y < 0)
 		return;
 		
-	while ((r << 1) > w || (r << 1) > h)
-		r <<= 1;
+	if ((r << 1) > w || (r << 1) > h)
+		r = MIN(w >> 1, h >> 1);
 
 	if (Base::_fillMode != kFillDisabled && Base::_shadowOffset
 		&& x + w + Base::_shadowOffset < Base::_activeSurface->w

Modified: scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.h
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.h	2008-07-21 21:11:28 UTC (rev 33181)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.h	2008-07-21 21:23:23 UTC (rev 33182)
@@ -223,10 +223,7 @@
 
 	/** Since the rendering pipeline changes, closing all dialogs causes no effect 
 		TODO: remove this from the original GUI::Theme API */
-	void closeAllDialogs() {
-		memset(_backBuffer->pixels, 0, _backBuffer->w * _backBuffer->h * _backBuffer->bytesPerPixel);
-		
-	}
+	void closeAllDialogs() {}
 	
 	/** Drawing area has been removed: it was too hackish. A workaround is on the works.
 	 	TODO: finish the workaround for the credits dialog

Modified: scummvm/branches/gsoc2008-gui/gui/newgui.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/newgui.cpp	2008-07-21 21:11:28 UTC (rev 33181)
+++ scummvm/branches/gsoc2008-gui/gui/newgui.cpp	2008-07-21 21:23:23 UTC (rev 33182)
@@ -195,15 +195,17 @@
 		case kRedrawFull:
 		case kRedrawTopDialog:
 			_theme->clearAll();
-			_theme->closeAllDialogs();
+			_theme->openDialog(true);
 
 			for (i = 0; i < _dialogStack.size() - 1; i++) {
-				_dialogStack[i]->drawDialog();
+				_dialogStack[i]->drawDialog();	
 			}
 
+			_theme->finishBuffering();
+			_theme->updateScreen();
+
 		case kRedrawOpenDialog:
 			_theme->openDialog(true);
-			//_theme->startBuffering();
 			_dialogStack.top()->drawDialog();
 			_theme->finishBuffering();
 			break;


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