diff --git a/base/main.cpp b/base/main.cpp index dba2eeacb7f..cd118ade30d 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -314,6 +314,11 @@ static int runGame(GameDetector &detector, OSystem &system, const Common::String if (ConfMan.hasKey("extrapath", Common::ConfigManager::kApplicationDomain)) Common::File::addDefaultDirectoryRecursive(ConfMan.get("extrapath", Common::ConfigManager::kApplicationDomain)); + // Theme-related + if (ConfMan.hasKey("themepath")) { + Common::File::addDefaultDirectory(ConfMan.get("themepath")); + } + // As a last resort add current directory and lock further additions Common::File::addDefaultDirectory(".", true); diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp index ab4dfb3d532..93e5a7f563c 100644 --- a/engines/simon/simon.cpp +++ b/engines/simon/simon.cpp @@ -453,9 +453,6 @@ SimonEngine::SimonEngine(OSystem *syst) memcpy (_hebrew_char_widths, "\x5\x5\x4\x6\x5\x3\x4\x5\x6\x3\x5\x5\x4\x6\x5\x3\x4\x6\x5\x6\x6\x6\x5\x5\x5\x6\x5\x6\x6\x6\x6\x6", 32); -} - -int SimonEngine::init(GameDetector &detector) { // Add default file directories for Acorn version File::addDefaultDirectory(_gameDataPath + "execute/"); @@ -471,6 +468,9 @@ int SimonEngine::init(GameDetector &detector) { File::addDefaultDirectory(_gameDataPath + "SFX/"); File::addDefaultDirectory(_gameDataPath + "speech/"); File::addDefaultDirectory(_gameDataPath + "SPEECH/"); +} + +int SimonEngine::init(GameDetector &detector) { // Detect game if (!initGame()) { diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp index dc0bfc0e056..bb822d7e6fc 100644 --- a/gui/ThemeNew.cpp +++ b/gui/ThemeNew.cpp @@ -131,12 +131,6 @@ _lastUsedBitMask(0), _forceRedraw(false), _font(0), _imageHandles(0), _images(0) } } - if (ConfMan.hasKey("extrapath")) { - Common::File::addDefaultDirectory(ConfMan.get("extrapath")); - } - if (ConfMan.hasKey("themepath")) { - Common::File::addDefaultDirectory(ConfMan.get("themepath")); - } ImageMan.addArchive(stylefile + ".zip"); if (!_configFile.loadFromFile(stylefile + ".ini")) {