summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2015-10-30 10:04:54 +0100
committerJosJuice <josjuice@gmail.com>2015-11-27 11:09:20 +0100
commit9b2fe62bc99221678bce66ab4694f06296ec2fdb (patch)
tree95a6a5ff739773a11a39e3fd8b9dbfc05d0dd4f1 /Source/Core
parentf33a9ed439ee133f88ca12b6954177bddc8ecc04 (diff)
Move nobanner and fileplatform from Themes to Resources
fileplatform is moved so it's in the same place as the other platform icons, and nobanner is moved just because it fits better in Resources. Both of them were identical in all of Dolphin's themes.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/CommonPaths.h1
-rw-r--r--Source/Core/DolphinQt/Utils/Resources.cpp10
-rw-r--r--Source/Core/DolphinQt2/Resources.cpp12
-rw-r--r--Source/Core/DolphinWX/GameListCtrl.cpp2
-rw-r--r--Source/Core/DolphinWX/ISOFile.cpp2
5 files changed, 14 insertions, 13 deletions
diff --git a/Source/Core/Common/CommonPaths.h b/Source/Core/Common/CommonPaths.h
index 81bddc328f..2233f0efd8 100644
--- a/Source/Core/Common/CommonPaths.h
+++ b/Source/Core/Common/CommonPaths.h
@@ -69,6 +69,7 @@
#define SHADERS_DIR "Shaders"
#define WII_SYSCONF_DIR "shared2" DIR_SEP "sys"
#define WII_WC24CONF_DIR "shared2" DIR_SEP "wc24"
+#define RESOURCES_DIR "Resources"
#define THEMES_DIR "Themes"
#define ANAGLYPH_DIR "Anaglyph"
#define PIPES_DIR "Pipes"
diff --git a/Source/Core/DolphinQt/Utils/Resources.cpp b/Source/Core/DolphinQt/Utils/Resources.cpp
index dc3c44e559..f0f8784316 100644
--- a/Source/Core/DolphinQt/Utils/Resources.cpp
+++ b/Source/Core/DolphinQt/Utils/Resources.cpp
@@ -5,6 +5,7 @@
#include <QApplication>
#include <QFile>
+#include "Common/CommonPaths.h"
#include "Common/FileUtil.h"
#include "Core/ConfigManager.h"
@@ -17,7 +18,7 @@ QVector<QPixmap> Resources::m_pixmaps;
void Resources::Init()
{
- QString dir = QString::fromStdString(File::GetSysDirectory() + "Resources/");
+ QString dir = QString::fromStdString(File::GetSysDirectory() + RESOURCES_DIR + DIR_SEP);
m_regions.resize(DiscIO::IVolume::NUMBER_OF_COUNTRIES);
m_regions[DiscIO::IVolume::COUNTRY_JAPAN].load(GetImageFilename("Flag_Japan", dir));
@@ -40,6 +41,7 @@ void Resources::Init()
m_platforms[0].load(GetImageFilename("Platform_Gamecube", dir));
m_platforms[1].load(GetImageFilename("Platform_Wii", dir));
m_platforms[2].load(GetImageFilename("Platform_Wad", dir));
+ m_platforms[3].load(GetImageFilename("Platform_File", dir));
m_ratings.resize(6);
m_ratings[0].load(GetImageFilename("rating0", dir));
@@ -52,6 +54,7 @@ void Resources::Init()
m_pixmaps.resize(NUM_ICONS);
m_pixmaps[DOLPHIN_LOGO].load(GetImageFilename("Dolphin", dir));
m_pixmaps[DOLPHIN_LOGO_LARGE].load(GetImageFilename("dolphin_logo", dir));
+ m_pixmaps[BANNER_MISSING].load(GetImageFilename("nobanner", dir));
UpdatePixmaps();
}
@@ -69,12 +72,9 @@ void Resources::UpdatePixmaps()
m_pixmaps[TOOLBAR_CONFIGURE].load(GetImageFilename("config", dir));
m_pixmaps[TOOLBAR_GRAPHICS].load(GetImageFilename("graphics", dir));
m_pixmaps[TOOLBAR_CONTROLLERS].load(GetImageFilename("classic", dir));
- m_pixmaps[TOOLBAR_HELP].load(GetImageFilename("nobanner", dir)); // TODO
+ m_pixmaps[TOOLBAR_HELP].load(GetImageFilename("config", dir)); // TODO
// TODO: toolbar[MEMCARD];
// TODO: toolbar[HOTKEYS];
- m_pixmaps[BANNER_MISSING].load(GetImageFilename("nobanner", dir));
- // TODO: Make this consistent with the other files
- m_platforms[3].load(GetImageFilename("fileplatform", dir));
}
QString Resources::GetImageFilename(const char* name, QString dir)
diff --git a/Source/Core/DolphinQt2/Resources.cpp b/Source/Core/DolphinQt2/Resources.cpp
index 05b1014252..70666d4b25 100644
--- a/Source/Core/DolphinQt2/Resources.cpp
+++ b/Source/Core/DolphinQt2/Resources.cpp
@@ -4,6 +4,7 @@
#include <QStringList>
+#include "Common/CommonPaths.h"
#include "Common/FileUtil.h"
#include "Core/ConfigManager.h"
#include "DolphinQt2/Resources.h"
@@ -15,13 +16,13 @@ QList<QPixmap> Resources::m_misc;
void Resources::Init()
{
- QString sys_dir = QString::fromStdString(File::GetSysDirectory() + "Resources/");
+ QString sys_dir = QString::fromStdString(File::GetSysDirectory() + RESOURCES_DIR + DIR_SEP);
QStringList platforms{
QStringLiteral("Platform_Gamecube.png"),
QStringLiteral("Platform_Wii.png"),
QStringLiteral("Platform_Wad.png"),
- QStringLiteral("Platform_Wii.png")
+ QStringLiteral("Platform_File.png")
};
for (QString platform : platforms)
m_platforms.append(QPixmap(platform.prepend(sys_dir)));
@@ -56,10 +57,9 @@ void Resources::Init()
for (QString rating : ratings)
m_ratings.append(QPixmap(rating.prepend(sys_dir)));
- QString theme_dir = QString::fromStdString(File::GetThemeDir(SConfig::GetInstance().theme_name));
- m_misc.append(QPixmap(QStringLiteral("nobanner.png").prepend(theme_dir)));
- m_misc.append(QPixmap(QStringLiteral("dolphin_logo.png").prepend(theme_dir)));
- m_misc.append(QPixmap(QStringLiteral("Dolphin.png").prepend(theme_dir)));
+ m_misc.append(QPixmap(QStringLiteral("nobanner.png").prepend(sys_dir)));
+ m_misc.append(QPixmap(QStringLiteral("dolphin_logo.png").prepend(sys_dir)));
+ m_misc.append(QPixmap(QStringLiteral("Dolphin.png").prepend(sys_dir)));
}
QPixmap Resources::GetPlatform(int platform)
diff --git a/Source/Core/DolphinWX/GameListCtrl.cpp b/Source/Core/DolphinWX/GameListCtrl.cpp
index 25ae8b4ce6..30864cac54 100644
--- a/Source/Core/DolphinWX/GameListCtrl.cpp
+++ b/Source/Core/DolphinWX/GameListCtrl.cpp
@@ -197,7 +197,7 @@ void CGameListCtrl::InitBitmaps()
m_PlatformImageIndex[0] = m_imageListSmall->Add(wxBitmap(Platform_Gamecube_xpm));
m_PlatformImageIndex[1] = m_imageListSmall->Add(wxBitmap(Platform_Wii_xpm));
m_PlatformImageIndex[2] = m_imageListSmall->Add(wxBitmap(Platform_Wad_xpm));
- m_PlatformImageIndex[3] = m_imageListSmall->Add(wxBitmap(StrToWxStr(File::GetThemeDir(SConfig::GetInstance().theme_name) + "fileplatform.png"), wxBITMAP_TYPE_PNG));
+ m_PlatformImageIndex[3] = m_imageListSmall->Add(wxBitmap(StrToWxStr(File::GetSysDirectory() + RESOURCES_DIR + DIR_SEP + "Platform_File.png"), wxBITMAP_TYPE_PNG));
m_EmuStateImageIndex.resize(6);
m_EmuStateImageIndex[0] = m_imageListSmall->Add(wxBitmap(rating_0));
diff --git a/Source/Core/DolphinWX/ISOFile.cpp b/Source/Core/DolphinWX/ISOFile.cpp
index 58d7b71ad7..ca278e1c73 100644
--- a/Source/Core/DolphinWX/ISOFile.cpp
+++ b/Source/Core/DolphinWX/ISOFile.cpp
@@ -176,7 +176,7 @@ GameListItem::GameListItem(const std::string& _rFileName, const std::unordered_m
}
// Fallback in case no banner is available.
- ReadPNGBanner(File::GetThemeDir(SConfig::GetInstance().theme_name) + "nobanner.png");
+ ReadPNGBanner(File::GetSysDirectory() + RESOURCES_DIR + DIR_SEP + "nobanner.png");
}
GameListItem::~GameListItem()