diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2016-06-30 12:07:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-30 12:07:50 +0200 |
| commit | f8bf839e36ecd0addcc07b841a1dca66bf90dca9 (patch) | |
| tree | fb69fecd038e969526c768e2eeebe210aec85c9f /Source/Core | |
| parent | 8ff9b299fb9a73ea1e44b68b8595d8059bfa0972 (diff) | |
| parent | 61371f3a4fc7a5f10378bd9b03661c6a8447a897 (diff) | |
Merge pull request #3967 from JosJuice/remove-boomy
Remove Boomy
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Common/CommonPaths.h | 3 | ||||
| -rw-r--r-- | Source/Core/Common/FileUtil.cpp | 12 | ||||
| -rw-r--r-- | Source/Core/Core/ConfigManager.cpp | 2 |
3 files changed, 12 insertions, 5 deletions
diff --git a/Source/Core/Common/CommonPaths.h b/Source/Core/Common/CommonPaths.h index 7f799dbf4c..916e711764 100644 --- a/Source/Core/Common/CommonPaths.h +++ b/Source/Core/Common/CommonPaths.h @@ -78,6 +78,9 @@ // This one is only used to remove it if it was present #define SHADERCACHE_LEGACY_DIR "ShaderCache" +// The theme directory used by default +#define DEFAULT_THEME_DIR "Clean" + // Filenames // Files in the directory returned by GetUserPath(D_CONFIG_IDX) #define DOLPHIN_CONFIG "Dolphin.ini" diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 8317550297..564ab58d8f 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -866,12 +866,16 @@ void SetUserPath(unsigned int dir_index, const std::string& path) std::string GetThemeDir(const std::string& theme_name) { std::string dir = File::GetUserPath(D_THEMES_IDX) + theme_name + "/"; + if (File::Exists(dir)) + return dir; - // If theme does not exist in user's dir load from shared directory - if (!File::Exists(dir)) - dir = GetSysDirectory() + THEMES_DIR "/" + theme_name + "/"; + // If the theme doesn't exist in the user dir, load from shared directory + dir = GetSysDirectory() + THEMES_DIR "/" + theme_name + "/"; + if (File::Exists(dir)) + return dir; - return dir; + // If the theme doesn't exist at all, load the default theme + return GetSysDirectory() + THEMES_DIR "/" DEFAULT_THEME_DIR "/"; } bool WriteStringToFile(const std::string& str, const std::string& filename) diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index fa2ade2cef..b25bf02500 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -403,7 +403,7 @@ void SConfig::LoadInterfaceSettings(IniFile& ini) interface->Get("ShowLogWindow", &m_InterfaceLogWindow, false); interface->Get("ShowLogConfigWindow", &m_InterfaceLogConfigWindow, false); interface->Get("ExtendedFPSInfo", &m_InterfaceExtendedFPSInfo, false); - interface->Get("ThemeName40", &theme_name, "Clean"); + interface->Get("ThemeName40", &theme_name, DEFAULT_THEME_DIR); interface->Get("PauseOnFocusLost", &m_PauseOnFocusLost, false); } |
