From ba979582e2d0b4961f1087b76eef659856eb23bb Mon Sep 17 00:00:00 2001 From: Jonathan Jones Date: Fri, 22 Feb 2013 15:27:28 -0500 Subject: [PATCH] Makes the "No banner" banner image theme-able. Current "sexy X" banner included as part of "Boomy" theme. Fixes issue 6023. --- Data/User/Themes/Boomy/nobanner.png | Bin 0 -> 2484 bytes Source/Core/DolphinWX/Src/ConfigMain.cpp | 1 + Source/Core/DolphinWX/Src/ISOFile.cpp | 14 ++++++--- Source/Core/DolphinWX/resources/no_banner.cpp | 28 ------------------ 4 files changed, 11 insertions(+), 32 deletions(-) create mode 100644 Data/User/Themes/Boomy/nobanner.png delete mode 100644 Source/Core/DolphinWX/resources/no_banner.cpp diff --git a/Data/User/Themes/Boomy/nobanner.png b/Data/User/Themes/Boomy/nobanner.png new file mode 100644 index 0000000000000000000000000000000000000000..4d34be77626c7f9d77659f8766109b9017baa619 GIT binary patch literal 2484 zcmV;l2}|~gP)WFU8GbZ8()Nlj2>E@cM*00|gLL_t(&-p!hAbKloBF>s^;&fX(Gmm_Z|S}9000{tr#Q2F!1#Bg!i6d7^td>VHoh*_Jsw#kde_Q2wMC9VVa}E(<7zR$K6VK1jytjmejt5-uBv~^m z_)zok@Ico#)OAf7C!FZ~r)hpR^+Y@=DKKLa$B9t6jHQoIF6_)(=_3|XPTz`fF`u6s_@?DhfgVGkVFLM93cc&s}<8U&4-LJgY3P> zdr#l@d9Q)C+wC|Wj~QHBc7MA^`I&)l0Q7y&uV25owW_+oxqy(UgX5uD@zAdERUpO@ zClRj`#A#L(h2#M52&;;^5`=-ON=(Cv@pOa~nWiZ#u$}XCI#I7y48wo}Sg+T4L#g>8 z1gfga!ZASWx@H&#LI^nLvY<-sv}ODM{`+s*w!Juz32hul+O{Ren1xfOYEK;;>pB!l5fJgH3U$3E#yI0QP174GnHH;RKD=3hs%9D~KR1&% z?KAo*ule)mPk#LP!8ne2k6F<$44H~dpeB&R;lSy1Vw$E4z^_?@Da+w-;N|6oVHmQt zeIx)S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6T97xzVCCR-*SX&{pGI~Kv}1sE~Ah#G1~2R02hrG1E{Rmmm`snkB@X+ckz805m^Bb$QiWFqb`NI zoO`mlBb)ZSRx$k(VR%V#&N+fjYyI2KSUCZ9O>+#0ID8V?tbh0M22PF_ZxQsYvHq7HP4!&4n&GHiU37p=}3jnuhImd(m`XCQRjP88NkOi>h)w y9&c)})u7BVmzGdAd;ZsD5!q_B$^*zLCH@1LNII_TaD>hP0000GetStringSelection(); main_frame->InitBitmaps(); + main_frame->UpdateGameList(); })); auto const scInterface = new wxBoxSizer(wxHORIZONTAL); diff --git a/Source/Core/DolphinWX/Src/ISOFile.cpp b/Source/Core/DolphinWX/Src/ISOFile.cpp index 1e4164b7aa..833268ad63 100644 --- a/Source/Core/DolphinWX/Src/ISOFile.cpp +++ b/Source/Core/DolphinWX/Src/ISOFile.cpp @@ -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 @@ -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); } } diff --git a/Source/Core/DolphinWX/resources/no_banner.cpp b/Source/Core/DolphinWX/resources/no_banner.cpp deleted file mode 100644 index df8d51d737..0000000000 --- a/Source/Core/DolphinWX/resources/no_banner.cpp +++ /dev/null @@ -1,28 +0,0 @@ -static const unsigned char no_banner_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, - 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x20, 0x04, 0x03, - 0x00, 0x00, 0x00, 0x1f, 0xee, 0x60, 0x67, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, - 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13, 0x01, 0x00, 0x9a, - 0x9c, 0x18, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, 0x45, 0x07, 0xdd, 0x02, - 0x09, 0x16, 0x39, 0x17, 0xf0, 0x40, 0x6e, 0x04, 0x00, 0x00, 0x00, 0x15, 0x50, - 0x4c, 0x54, 0x45, 0x66, 0x66, 0x66, 0x6a, 0x6a, 0x6a, 0x6b, 0x6b, 0x6b, 0x6d, - 0x6d, 0x6d, 0x70, 0x70, 0x70, 0x73, 0x73, 0x73, 0x80, 0x80, 0x80, 0xd1, 0x7d, - 0x40, 0x35, 0x00, 0x00, 0x00, 0xc6, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0x8d, - 0xd4, 0x31, 0x0e, 0xc3, 0x20, 0x10, 0x44, 0xd1, 0x51, 0x64, 0xfa, 0x1c, 0x25, - 0x47, 0x48, 0x45, 0xed, 0xca, 0x07, 0xb0, 0x80, 0xfb, 0x1f, 0x21, 0x05, 0x60, - 0xd6, 0x30, 0xe3, 0xac, 0xbb, 0x95, 0xf8, 0x7a, 0xb2, 0x01, 0xa3, 0x98, 0x27, - 0x01, 0x00, 0x10, 0xfa, 0x9c, 0xeb, 0xbc, 0xd9, 0x35, 0xb0, 0x43, 0xf9, 0xd6, - 0x15, 0x47, 0x1b, 0xf7, 0x3a, 0x46, 0x1d, 0xdc, 0x09, 0x06, 0x4c, 0xc1, 0x9d, - 0x60, 0xc0, 0x1c, 0x58, 0x82, 0x02, 0x73, 0x60, 0x09, 0x0a, 0x2c, 0xc1, 0x20, - 0x38, 0xb0, 0x04, 0x83, 0xe0, 0xc0, 0x1a, 0x74, 0x42, 0x00, 0x6b, 0xd0, 0x89, - 0x0f, 0x07, 0x48, 0xd0, 0x08, 0x01, 0x90, 0xa0, 0x13, 0x1c, 0x60, 0x41, 0x7a, - 0x02, 0x58, 0x60, 0x88, 0xe8, 0x0b, 0xd2, 0x03, 0x40, 0x83, 0x8b, 0x88, 0xde, - 0xe0, 0xac, 0xeb, 0x5f, 0xc5, 0x1b, 0xb4, 0x4d, 0xbe, 0xee, 0xc5, 0xbf, 0x20, - 0xf7, 0x77, 0x08, 0xce, 0x60, 0xbf, 0xbe, 0xd2, 0xe1, 0x0a, 0xf2, 0xd8, 0x87, - 0xe0, 0x0a, 0x76, 0xb3, 0xd3, 0x87, 0x23, 0xc8, 0xf6, 0x2c, 0x05, 0x47, 0xd0, - 0x80, 0xb7, 0x20, 0x20, 0x80, 0x2d, 0x09, 0x02, 0x02, 0x88, 0xf3, 0x3f, 0x4a, - 0x05, 0xe3, 0xa2, 0x09, 0x02, 0x0a, 0x28, 0x82, 0x80, 0x02, 0x14, 0x01, 0x09, - 0x08, 0x02, 0x12, 0x10, 0x04, 0x34, 0xc0, 0x89, 0x1f, 0xe2, 0x9a, 0xca, 0x1c, - 0x5f, 0x12, 0x62, 0x57, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, - 0x42, 0x60, 0x82 -};