mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 08:22:32 +00:00
fixes crash due to having too many trophies
The game 'My Name is Mayo' has so many trophies in sequence that when overlapping them, the emulator ended up crashing, so if there is something on the screen and a new trophies are achieved, it will clear and show the new one.
This commit is contained in:
parent
cd70f33ee6
commit
a18c594b6c
@ -183,13 +183,20 @@ void AddTrophyToQueue(const std::filesystem::path& trophyIconPath, const std::st
|
||||
if (Config::getisTrophyPopupDisabled()) {
|
||||
return;
|
||||
} else if (current_trophy_ui.has_value()) {
|
||||
current_trophy_ui.reset();
|
||||
}
|
||||
|
||||
TrophyInfo new_trophy;
|
||||
new_trophy.trophy_icon_path = trophyIconPath;
|
||||
new_trophy.trophy_name = trophyName;
|
||||
new_trophy.trophy_type = rarity;
|
||||
trophy_queue.push(new_trophy);
|
||||
} else {
|
||||
current_trophy_ui.emplace(trophyIconPath, trophyName, rarity);
|
||||
|
||||
if (!current_trophy_ui.has_value()) {
|
||||
TrophyInfo next_trophy = trophy_queue.front();
|
||||
trophy_queue.pop();
|
||||
current_trophy_ui.emplace(next_trophy.trophy_icon_path, next_trophy.trophy_name,
|
||||
next_trophy.trophy_type);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user