[Scummvm-cvs-logs] SF.net SVN: scummvm:[35686] scummvm/trunk/gui/dialog.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Fri Jan 2 23:10:01 CET 2009


Revision: 35686
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35686&view=rev
Author:   lordhoto
Date:     2009-01-02 22:10:00 +0000 (Fri, 02 Jan 2009)

Log Message:
-----------
Fixed crash when returning to launcher from a 640x480 game running with a non 1x scaler.

Modified Paths:
--------------
    scummvm/trunk/gui/dialog.cpp

Modified: scummvm/trunk/gui/dialog.cpp
===================================================================
--- scummvm/trunk/gui/dialog.cpp	2009-01-02 21:52:32 UTC (rev 35685)
+++ scummvm/trunk/gui/dialog.cpp	2009-01-02 22:10:00 UTC (rev 35686)
@@ -45,7 +45,14 @@
 Dialog::Dialog(int x, int y, int w, int h)
 	: GuiObject(x, y, w, h),
 	  _mouseWidget(0), _focusedWidget(0), _dragWidget(0), _visible(false),
-	_backgroundType(GUI::ThemeEngine::kDialogBackgroundDefault) {}
+	_backgroundType(GUI::ThemeEngine::kDialogBackgroundDefault) {
+	// Some dialogs like LauncherDialog use internally a fixed size, even though
+	// their widgets rely on the layout to be initialized correctly by the theme.
+	// Thus we need to catch screen changes here too. If we do not do that, it
+	// will for example crash after returning to the launcher when the user
+	// started a 640x480 game with a non 1x scaler.
+	g_gui.checkScreenChange();
+}
 
 Dialog::Dialog(const Common::String &name)
 	: GuiObject(name),


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