mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-11 10:41:41 +00:00
GUI: fix recent entry duplication
This commit is contained in:
parent
3cd4256b9e
commit
f7472d59aa
3 changed files with 11 additions and 5 deletions
|
@ -210,6 +210,11 @@ public:
|
||||||
return m_elf_path;
|
return m_elf_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::string& GetBoot() const
|
||||||
|
{
|
||||||
|
return m_path;
|
||||||
|
}
|
||||||
|
|
||||||
const std::string& GetTitleID() const
|
const std::string& GetTitleID() const
|
||||||
{
|
{
|
||||||
return m_title_id;
|
return m_title_id;
|
||||||
|
|
|
@ -376,6 +376,7 @@ void game_list_frame::Refresh(bool fromDrive)
|
||||||
for (auto pair : YAML::Load(fs::file{fs::get_config_dir() + "/games.yml", fs::read + fs::create}.to_string()))
|
for (auto pair : YAML::Load(fs::file{fs::get_config_dir() + "/games.yml", fs::read + fs::create}.to_string()))
|
||||||
{
|
{
|
||||||
path_list.push_back(pair.second.Scalar());
|
path_list.push_back(pair.second.Scalar());
|
||||||
|
path_list.back().resize(path_list.back().find_last_not_of('/') + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// std::set is used to remove duplicates from the list
|
// std::set is used to remove duplicates from the list
|
||||||
|
@ -563,7 +564,7 @@ void game_list_frame::doubleClickedSlot(const QModelIndex& index)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG_SUCCESS(LOADER, "Boot from gamelist per doubleclick: done");
|
LOG_SUCCESS(LOADER, "Boot from gamelist per doubleclick: done");
|
||||||
RequestAddRecentGame(q_string_pair(qstr(m_game_data[i].info.path), qstr("[" + m_game_data[i].info.serial + "] " + m_game_data[i].info.name)));
|
RequestAddRecentGame(q_string_pair(qstr(Emu.GetBoot()), qstr("[" + m_game_data[i].info.serial + "] " + m_game_data[i].info.name)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -696,7 +697,7 @@ void game_list_frame::Boot(int row)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG_SUCCESS(LOADER, "Boot from gamelist per Boot: done");
|
LOG_SUCCESS(LOADER, "Boot from gamelist per Boot: done");
|
||||||
RequestAddRecentGame(q_string_pair(qstr(m_game_data[row].info.path), qstr("[" + m_game_data[row].info.serial + "] " + m_game_data[row].info.name)));
|
RequestAddRecentGame(q_string_pair(qstr(Emu.GetBoot()), qstr("[" + m_game_data[row].info.serial + "] " + m_game_data[row].info.name)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -239,7 +239,7 @@ void main_window::BootElf()
|
||||||
LOG_SUCCESS(LOADER, "(S)ELF: boot done.");
|
LOG_SUCCESS(LOADER, "(S)ELF: boot done.");
|
||||||
|
|
||||||
const std::string serial = Emu.GetTitleID().empty() ? "" : "[" + Emu.GetTitleID() + "] ";
|
const std::string serial = Emu.GetTitleID().empty() ? "" : "[" + Emu.GetTitleID() + "] ";
|
||||||
AddRecentAction(q_string_pair(qstr(path), qstr(serial + Emu.GetTitle())));
|
AddRecentAction(q_string_pair(qstr(Emu.GetBoot()), qstr(serial + Emu.GetTitle())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ void main_window::BootGame()
|
||||||
LOG_SUCCESS(LOADER, "Boot Game: boot done.");
|
LOG_SUCCESS(LOADER, "Boot Game: boot done.");
|
||||||
|
|
||||||
const std::string serial = Emu.GetTitleID().empty() ? "" : "[" + Emu.GetTitleID() + "] ";
|
const std::string serial = Emu.GetTitleID().empty() ? "" : "[" + Emu.GetTitleID() + "] ";
|
||||||
AddRecentAction(q_string_pair(qstr(path), qstr(serial + Emu.GetTitle())));
|
AddRecentAction(q_string_pair(qstr(Emu.GetBoot()), qstr(serial + Emu.GetTitle())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -790,7 +790,7 @@ void main_window::BootRecentAction(const QAction* act)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG_SUCCESS(LOADER, "Boot from Recent List: done");
|
LOG_SUCCESS(LOADER, "Boot from Recent List: done");
|
||||||
AddRecentAction(q_string_pair(pth, nam));
|
AddRecentAction(q_string_pair(qstr(Emu.GetBoot()), nam));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue