mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-04 05:04:33 +00:00
System: Add missing game list lock
This commit is contained in:
@@ -380,7 +380,7 @@ bool MemoryCard::SaveIfChanged(bool display_osd_message)
|
||||
|
||||
if (display_osd_message)
|
||||
{
|
||||
std::string icon_path = System::GetGameIconPath();
|
||||
std::string icon_path = System::GetGameIconPath(false);
|
||||
if (icon_path.empty())
|
||||
icon_path = ICON_PF_MEMORY_CARD;
|
||||
|
||||
|
||||
@@ -806,12 +806,20 @@ System::BootMode System::GetBootMode()
|
||||
return s_state.boot_mode;
|
||||
}
|
||||
|
||||
std::string System::GetGameIconPath()
|
||||
std::string System::GetGameIconPath(bool allow_achievements_badge)
|
||||
{
|
||||
u32 achievements_game_id = 0;
|
||||
if (allow_achievements_badge)
|
||||
{
|
||||
const auto lock = Achievements::GetLock();
|
||||
achievements_game_id = Achievements::GetGameID();
|
||||
}
|
||||
|
||||
const auto lock = GameList::GetLock();
|
||||
return GameList::GetGameIconPath((s_state.running_game_custom_title || !s_state.running_game_entry) ?
|
||||
std::string_view(s_state.running_game_title) :
|
||||
std::string_view(),
|
||||
s_state.running_game_serial, s_state.running_game_path, Achievements::GetGameID());
|
||||
s_state.running_game_serial, s_state.running_game_path, achievements_game_id);
|
||||
}
|
||||
|
||||
bool System::IsUsingKnownPS1BIOS()
|
||||
|
||||
@@ -238,7 +238,7 @@ bool IsUsingKnownPS1BIOS();
|
||||
BootMode GetBootMode();
|
||||
|
||||
/// Returns a path to the game icon, if any.
|
||||
std::string GetGameIconPath();
|
||||
std::string GetGameIconPath(bool allow_achievements_badge);
|
||||
|
||||
/// Returns the time elapsed in the current play session.
|
||||
u64 GetSessionPlayedTime();
|
||||
|
||||
Reference in New Issue
Block a user