Qt: Allow for duplications in game list

This fixes app versions when multiple game data directories were found.
We only removed duplications because we didn't wanna see multiple disc games from different locations
This commit is contained in:
Megamouse 2020-02-15 10:29:51 +01:00
parent 1cb1d14d0c
commit e645627b78

View File

@ -533,9 +533,6 @@ void game_list_frame::Refresh(const bool fromDrive, const bool scrollAfter)
}
}
// Used to remove duplications from the list (serial -> set of cat names)
std::map<std::string, std::set<std::string>> serial_cat_name;
QSet<QString> serials;
QMutex mutex_cat;
@ -580,13 +577,6 @@ void game_list_frame::Refresh(const bool fromDrive, const bool scrollAfter)
mutex_cat.lock();
// Detect duplication
if (!serial_cat_name[game.serial].emplace(game.category + game.name).second)
{
mutex_cat.unlock();
return;
}
const QString serial = qstr(game.serial);
const QString note = m_gui_settings->GetValue(gui::notes, serial, "").toString();
const QString title = m_gui_settings->GetValue(gui::titles, serial, "").toString().simplified();
@ -711,13 +701,6 @@ void game_list_frame::Refresh(const bool fromDrive, const bool scrollAfter)
{
game_list_log.error("Failed to update the displayed version numbers for title ID %s\n%s thrown: %s", entry->info.serial, typeid(e).name(), e.what());
}
const std::string key = "GD" + other->info.name;
serial_cat_name[other->info.serial].erase(key);
if (!serial_cat_name[other->info.serial].count(key))
{
break;
}
}
}
}