mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
DolphinWX: Sync custom title changes on game list rescan
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user