diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp index 683f592867..ada083a74c 100644 --- a/rpcs3/rpcs3qt/game_list_frame.cpp +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -423,8 +423,10 @@ void game_list_frame::Refresh(const bool fromDrive, const bool scrollAfter) path_list.back().resize(path_list.back().find_last_not_of('/') + 1); } - // std::set is used to remove duplicates from the list - for (const auto& dir : std::set(std::make_move_iterator(path_list.begin()), std::make_move_iterator(path_list.end()))) { try + // Used to remove duplications from the list (serial -> set of cats) + std::map> serial_cat; + + for (const auto& dir : path_list) { try { const std::string sfb = dir + "/PS3_DISC.SFB"; const std::string sfo = dir + (fs::is_file(sfb) ? "/PS3_GAME/PARAM.SFO" : "/PARAM.SFO"); @@ -448,6 +450,12 @@ void game_list_frame::Refresh(const bool fromDrive, const bool scrollAfter) game.resolution = psf::get_integer(psf, "RESOLUTION"); game.sound_format = psf::get_integer(psf, "SOUND_FORMAT"); + // Detect duplication + if (!serial_cat[game.serial].emplace(game.category).second) + { + continue; + } + bool bootable = false; auto cat = category::cat_boot.find(game.category); if (cat != category::cat_boot.end())