diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index 12be1f1a21..ab58cb3f98 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -19,7 +19,6 @@ #include "CommonPaths.h" #include "FileUtil.h" #include "StringUtil.h" -#include "../../Core/Src/ConfigManager.h" #ifdef _WIN32 #include @@ -743,15 +742,14 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string &new return paths[DirIDX]; } -std::string GetThemeDir() +std::string GetThemeDir(const std::string& theme_name) { - std::string theme = SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name + "/"; - std::string dir = File::GetUserPath(D_THEMES_IDX) + theme; + std::string dir = File::GetUserPath(D_THEMES_IDX) + theme_name + "/"; #if !defined(_WIN32) // If theme does not exist in user's dir load from shared directory if (!File::Exists(dir)) - dir = SHARED_USER_DIR THEMES_DIR "/" + theme; + dir = SHARED_USER_DIR THEMES_DIR "/" + theme_name + "/"; #endif return dir; diff --git a/Source/Core/Common/Src/FileUtil.h b/Source/Core/Common/Src/FileUtil.h index 9376f272c8..1a401a24d1 100644 --- a/Source/Core/Common/Src/FileUtil.h +++ b/Source/Core/Common/Src/FileUtil.h @@ -135,7 +135,7 @@ bool SetCurrentDir(const std::string &directory); const std::string& GetUserPath(const unsigned int DirIDX, const std::string &newPath=""); // probably doesn't belong here -std::string GetThemeDir(); +std::string GetThemeDir(const std::string& theme_name); // Returns the path to where the sys file are std::string GetSysDirectory(); diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index 8c33575fc4..634bcc4d32 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -509,7 +509,7 @@ void CFrame::RecreateToolbar() void CFrame::InitBitmaps() { - auto const dir = StrToWxStr(File::GetThemeDir()); + auto const dir = StrToWxStr(File::GetThemeDir(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name)); m_Bitmaps[Toolbar_FileOpen].LoadFile(dir + "open.png", wxBITMAP_TYPE_PNG); m_Bitmaps[Toolbar_Refresh].LoadFile(dir + "refresh.png", wxBITMAP_TYPE_PNG); diff --git a/Source/Core/DolphinWX/Src/ISOFile.cpp b/Source/Core/DolphinWX/Src/ISOFile.cpp index 584e35d0d9..8246f4dda4 100644 --- a/Source/Core/DolphinWX/Src/ISOFile.cpp +++ b/Source/Core/DolphinWX/Src/ISOFile.cpp @@ -138,7 +138,7 @@ GameListItem::GameListItem(const std::string& _rFileName) else { // default banner - m_Image = wxImage(StrToWxStr(File::GetThemeDir()) + "nobanner.png", wxBITMAP_TYPE_PNG); + m_Image = wxImage(StrToWxStr(File::GetThemeDir(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name)) + "nobanner.png", wxBITMAP_TYPE_PNG); } }