summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/ISOFile.cpp
diff options
context:
space:
mode:
authorAnthony <Helios747@users.noreply.github.com>2017-05-21 10:17:34 -0700
committerGitHub <noreply@github.com>2017-05-21 10:17:34 -0700
commit7e4954a1fe7535fa61510da9ee9c98468dc16174 (patch)
tree23581e0dacc3d4c62c01a2a4c6b707682ca570d9 /Source/Core/DolphinWX/ISOFile.cpp
parentae9dabed1e0003e6119429057e05777f19e907e2 (diff)
parent964f546e6903758375401988ad2871f1a82b4045 (diff)
Merge pull request #5429 from leoetlino/show-active-title
Add an option to show the active title in the title
Diffstat (limited to 'Source/Core/DolphinWX/ISOFile.cpp')
-rw-r--r--Source/Core/DolphinWX/ISOFile.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/Source/Core/DolphinWX/ISOFile.cpp b/Source/Core/DolphinWX/ISOFile.cpp
index 0169d67d98..276a5da882 100644
--- a/Source/Core/DolphinWX/ISOFile.cpp
+++ b/Source/Core/DolphinWX/ISOFile.cpp
@@ -29,6 +29,7 @@
#include "Core/Boot/Boot.h"
#include "Core/ConfigManager.h"
#include "Core/IOS/ES/Formats.h"
+#include "Core/TitleDatabase.h"
#include "DiscIO/Blob.h"
#include "DiscIO/Enums.h"
@@ -62,8 +63,7 @@ static std::string GetLanguageString(DiscIO::Language language,
return "";
}
-GameListItem::GameListItem(const std::string& _rFileName,
- const std::unordered_map<std::string, std::string>& custom_titles)
+GameListItem::GameListItem(const std::string& _rFileName, const Core::TitleDatabase& title_database)
: m_FileName(_rFileName), m_title_id(0), m_emu_state(0), m_FileSize(0),
m_region(DiscIO::Region::UNKNOWN_REGION), m_Country(DiscIO::Country::COUNTRY_UNKNOWN),
m_Revision(0), m_Valid(false), m_ImageWidth(0), m_ImageHeight(0), m_disc_number(0),
@@ -125,18 +125,10 @@ GameListItem::GameListItem(const std::string& _rFileName,
if (IsValid())
{
- std::string short_game_id = m_game_id;
-
- // Ignore publisher ID for WAD files
- if (m_Platform == DiscIO::Platform::WII_WAD && short_game_id.size() > 4)
- short_game_id.erase(4);
-
- auto it = custom_titles.find(short_game_id);
- if (it != custom_titles.end())
- {
- m_custom_name_titles_txt = it->second;
- }
-
+ const auto type = m_Platform == DiscIO::Platform::WII_WAD ?
+ Core::TitleDatabase::TitleType::Channel :
+ Core::TitleDatabase::TitleType::Other;
+ m_custom_name_titles_txt = title_database.GetTitleName(m_game_id, type);
ReloadINI();
}