DolphinWX: Sync custom title changes on game list rescan

This commit is contained in:
JosJuice
2017-06-26 22:19:51 +02:00
parent 7d60f03acb
commit d5bf6f1bbc
3 changed files with 25 additions and 13 deletions

View File

@ -421,7 +421,7 @@ void GameListCtrl::RefreshList()
std::unique_lock<std::mutex> lk(m_title_database_mutex);
for (const auto& drive : cdio_get_devices())
{
auto file = std::make_shared<GameListItem>(drive, m_title_database);
auto file = std::make_shared<GameListItem>(drive);
if (file->IsValid())
m_shown_files.push_back(file);
}
@ -780,7 +780,7 @@ void GameListCtrl::RescanList()
}
for (const auto& path : new_paths)
{
auto file = std::make_shared<GameListItem>(path, m_title_database);
auto file = std::make_shared<GameListItem>(path);
if (file->IsValid())
{
cache_changed = true;
@ -804,7 +804,8 @@ void GameListCtrl::RescanList()
{
bool emu_state_changed = file->EmuStateChanged();
bool banner_changed = file->BannerChanged();
if (emu_state_changed || banner_changed)
bool custom_title_changed = file->CustomNameChanged(m_title_database);
if (emu_state_changed || banner_changed || custom_title_changed)
{
cache_changed = refresh_needed = true;
auto copy = std::make_shared<GameListItem>(*file);
@ -812,6 +813,8 @@ void GameListCtrl::RescanList()
copy->EmuStateCommit();
if (banner_changed)
copy->BannerCommit();
if (custom_title_changed)
copy->CustomNameCommit();
file = std::move(copy);
}
}