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

Tramboi at users.sourceforge.net Tramboi at users.sourceforge.net
Wed Oct 25 22:18:21 CEST 2006


Revision: 24510
          http://svn.sourceforge.net/scummvm/?rev=24510&view=rev
Author:   Tramboi
Date:     2006-10-25 13:18:16 -0700 (Wed, 25 Oct 2006)

Log Message:
-----------
Compile fix when DISABLE_FANCY_THEMES is #defined

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

Modified: scummvm/trunk/gui/newgui.cpp
===================================================================
--- scummvm/trunk/gui/newgui.cpp	2006-10-25 20:12:52 UTC (rev 24509)
+++ scummvm/trunk/gui/newgui.cpp	2006-10-25 20:18:16 UTC (rev 24510)
@@ -97,7 +97,10 @@
 	// Reset key repeat
 	_currentKeyDown.keycode = 0;
 
-#ifndef DISABLE_FANCY_THEMES
+	bool loadClassicTheme;
+#ifdef DISABLE_FANCY_THEMES
+	loadClassicTheme = true;
+#else
 	ConfMan.registerDefault("gui_theme", "default");
 	Common::String style(ConfMan.get("gui_theme"));
 	// The default theme for now is the 'modern' theme.
@@ -106,11 +109,17 @@
 
 	Common::String styleType;
 	Common::ConfigFile cfg;
+	if (loadNewTheme(style))
+	   loadClassicTheme = false;
+	else
+	{
+	   loadClassicTheme = true;
+	   warning("falling back to classic style");
+	}
 
 #endif
 	
-	if (!loadNewTheme(style)) {
-		warning("falling back to classic style");
+	if (loadClassicTheme) {
 		_theme = new ThemeClassic(_system);
 		assert(_theme);
 		if (!_theme->init()) {


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