Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
real buildfix
  • Loading branch information
jordan-woyak committed Apr 2, 2013
1 parent c65473d commit d951c4c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions Source/Core/Common/Src/FileUtil.cpp
Expand Up @@ -19,7 +19,6 @@
#include "CommonPaths.h"
#include "FileUtil.h"
#include "StringUtil.h"
#include "../../Core/Src/ConfigManager.h"

#ifdef _WIN32
#include <windows.h>
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/Src/FileUtil.h
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinWX/Src/FrameTools.cpp
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinWX/Src/ISOFile.cpp
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit d951c4c

Please sign in to comment.