summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/ISOFile.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2017-06-26 22:19:51 +0200
committerJosJuice <josjuice@gmail.com>2017-06-27 08:29:48 +0200
commitd5bf6f1bbc89d9e7fad9a09c4c159906f2521e90 (patch)
tree2ee883163329a0c8cdc9f330e6cca26de3e33d95 /Source/Core/DolphinWX/ISOFile.cpp
parent7d60f03acb6efe99e5daecdf3cb410d3d6a8961e (diff)
DolphinWX: Sync custom title changes on game list rescan
Diffstat (limited to 'Source/Core/DolphinWX/ISOFile.cpp')
-rw-r--r--Source/Core/DolphinWX/ISOFile.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/Source/Core/DolphinWX/ISOFile.cpp b/Source/Core/DolphinWX/ISOFile.cpp
index 5f01889a29..48359e1485 100644
--- a/Source/Core/DolphinWX/ISOFile.cpp
+++ b/Source/Core/DolphinWX/ISOFile.cpp
@@ -61,7 +61,7 @@ static std::string GetLanguageString(DiscIO::Language language,
return "";
}
-GameListItem::GameListItem(const std::string& filename, const Core::TitleDatabase& title_database)
+GameListItem::GameListItem(const std::string& filename)
: m_file_name(filename), m_region(DiscIO::Region::UNKNOWN_REGION),
m_country(DiscIO::Country::COUNTRY_UNKNOWN)
{
@@ -100,14 +100,6 @@ GameListItem::GameListItem(const std::string& filename, const Core::TitleDatabas
if (m_company.empty() && m_game_id.size() >= 6)
m_company = DiscIO::GetCompanyFromID(m_game_id.substr(4, 2));
- if (IsValid())
- {
- const auto type = m_platform == DiscIO::Platform::WII_WAD ?
- Core::TitleDatabase::TitleType::Channel :
- Core::TitleDatabase::TitleType::Other;
- m_custom_name = title_database.GetTitleName(m_game_id, type);
- }
-
if (!IsValid() && IsElfOrDol())
{
m_valid = true;
@@ -147,6 +139,20 @@ bool GameListItem::IsValid() const
return true;
}
+bool GameListItem::CustomNameChanged(const Core::TitleDatabase& title_database)
+{
+ const auto type = m_platform == DiscIO::Platform::WII_WAD ?
+ Core::TitleDatabase::TitleType::Channel :
+ Core::TitleDatabase::TitleType::Other;
+ m_pending.custom_name = title_database.GetTitleName(m_game_id, type);
+ return m_custom_name != m_pending.custom_name;
+}
+
+void GameListItem::CustomNameCommit()
+{
+ m_custom_name = m_pending.custom_name;
+}
+
bool GameListItem::EmuStateChanged()
{
IniFile ini = SConfig::LoadGameIni(m_game_id, m_revision);