[Scummvm-cvs-logs] SF.net SVN: scummvm: [24933] scummvm/trunk

sev at users.sourceforge.net sev at users.sourceforge.net
Wed Dec 27 01:47:58 CET 2006


Revision: 24933
          http://scummvm.svn.sourceforge.net/scummvm/?rev=24933&view=rev
Author:   sev
Date:     2006-12-26 16:47:57 -0800 (Tue, 26 Dec 2006)

Log Message:
-----------
Fix bug #1595627: "SCUMM: F5 crashes game (640x480)". This partially
reverts commit r24656 for fixing bug #1590596 and effectively fixes both.

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/scumm.cpp
    scummvm/trunk/gui/dialog.cpp
    scummvm/trunk/gui/theme.h

Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp	2006-12-27 00:25:01 UTC (rev 24932)
+++ scummvm/trunk/engines/scumm/scumm.cpp	2006-12-27 00:47:57 UTC (rev 24933)
@@ -1025,16 +1025,6 @@
 		initCommonGFX(defaultTo1XScaler);
 	_system->endGFXTransaction();
 
-	// It may happen that we have 3x scaler in launcher (960xY) and then 640x480
-	// game will be forced to 1x. At this stage GUI will not be aware of
-	// resolution change, so widgets will be off screen. This forces it to
-	// recompute
-	//
-	// Fixes bug #1590596: "HE: When 3x graphics are choosen, F5 crashes game"
-	if (defaultTo1XScaler) {
-		g_gui.screenChange();
-	}
-
 	setupScumm();
 
 	readIndexFile();

Modified: scummvm/trunk/gui/dialog.cpp
===================================================================
--- scummvm/trunk/gui/dialog.cpp	2006-12-27 00:25:01 UTC (rev 24932)
+++ scummvm/trunk/gui/dialog.cpp	2006-12-27 00:47:57 UTC (rev 24933)
@@ -51,6 +51,18 @@
 	  _mouseWidget(0), _focusedWidget(0), _dragWidget(0), _visible(false), _drawingHints(0),
 	  _dimsInactive(dimsInactive_) {
 	_drawingHints = THEME_HINT_FIRST_DRAW | THEME_HINT_SAVE_BACKGROUND;
+
+	// It may happen that we have 3x scaler in launcher (960xY) and then 640x480
+	// game will be forced to 1x. At this stage GUI will not be aware of
+	// resolution change, so widgets will be off screen. This forces it to
+	// recompute
+	//
+	// Fixes bug #1590596: "HE: When 3x graphics are choosen, F5 crashes game"
+	// and bug #1595627: "SCUMM: F5 crashes game (640x480)"
+	if (g_gui.theme()->needThemeReload()) {
+		debug(2, "Theme forced to reload");
+		g_gui.screenChange();
+	}
 }
 
 Dialog::~Dialog() {

Modified: scummvm/trunk/gui/theme.h
===================================================================
--- scummvm/trunk/gui/theme.h	2006-12-27 00:25:01 UTC (rev 24932)
+++ scummvm/trunk/gui/theme.h	2006-12-27 00:47:57 UTC (rev 24933)
@@ -240,6 +240,10 @@
 	Common::ConfigFile _configFile;
 	Common::ConfigFile _defaultConfig;
 
+public:
+	bool needThemeReload() { return ((_loadedThemeX != g_system->getOverlayWidth()) ||
+									 (_loadedThemeY != g_system->getOverlayHeight())); }
+
 private:
 	static const char *_defaultConfigINI;
 	int _loadedThemeX, _loadedThemeY;


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