Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Makes the "No banner" banner image theme-able. Current "sexy X" banne…
…r included as part of "Boomy" theme.

Fixes issue 6023.
  • Loading branch information
Jonathan Jones authored and RachelBryk committed Feb 22, 2013
1 parent d76ca57 commit ba97958
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 32 deletions.
Binary file added Data/User/Themes/Boomy/nobanner.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Source/Core/DolphinWX/Src/ConfigMain.cpp
Expand Up @@ -620,6 +620,7 @@ void CConfigMain::CreateGUIControls()
{
SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name = theme_selection->GetStringSelection();
main_frame->InitBitmaps();
main_frame->UpdateGameList();
}));

auto const scInterface = new wxBoxSizer(wxHORIZONTAL);
Expand Down
14 changes: 10 additions & 4 deletions Source/Core/DolphinWX/Src/ISOFile.cpp
Expand Up @@ -34,7 +34,7 @@
#include "FileSearch.h"
#include "CompressedBlob.h"
#include "ChunkFile.h"
#include "../resources/no_banner.cpp"
#include "ConfigManager.h"

#define CACHE_REVISION 0x10F

Expand Down Expand Up @@ -174,10 +174,16 @@ GameListItem::GameListItem(const std::string& _rFileName)
}
else
{
std::string theme = SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name + "/";
std::string dir = File::GetUserPath(D_THEMES_IDX) + theme;

#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;
#endif
// default banner
wxMemoryInputStream istream(no_banner_png, sizeof no_banner_png);
wxImage iNoBanner(istream, wxBITMAP_TYPE_PNG);
m_Image = iNoBanner;
m_Image = wxImage(dir + "nobanner.png", wxBITMAP_TYPE_PNG);
}
}

Expand Down
28 changes: 0 additions & 28 deletions Source/Core/DolphinWX/resources/no_banner.cpp

This file was deleted.

0 comments on commit ba97958

Please sign in to comment.