aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Augereau2006-10-25 20:18:16 +0000
committerBertrand Augereau2006-10-25 20:18:16 +0000
commit312f4747d5967259a428b5a7e9b89f1681bb0dd7 (patch)
tree88e7dc424897444dd5f84f841c9172e5bc7f7400
parent018c2c6949f67f4f5937822751adb68079c3fb78 (diff)
downloadscummvm-rg350-312f4747d5967259a428b5a7e9b89f1681bb0dd7.tar.gz
scummvm-rg350-312f4747d5967259a428b5a7e9b89f1681bb0dd7.tar.bz2
scummvm-rg350-312f4747d5967259a428b5a7e9b89f1681bb0dd7.zip
Compile fix when DISABLE_FANCY_THEMES is #defined
svn-id: r24510
-rw-r--r--gui/newgui.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 516bd0d1ab..d8c3037397 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -97,7 +97,10 @@ NewGui::NewGui() : _needRedraw(false),
// 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 @@ NewGui::NewGui() : _needRedraw(false),
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()) {