mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 22:05:38 +00:00
System: Don't unconditionally refresh save state UI
This commit is contained in:
parent
38777439c5
commit
6328d08c14
|
@ -688,6 +688,11 @@ static ImAnimatedFloat s_background_animated;
|
|||
static bool s_open = false;
|
||||
} // namespace SaveStateSelectorUI
|
||||
|
||||
bool SaveStateSelectorUI::IsOpen()
|
||||
{
|
||||
return s_open;
|
||||
}
|
||||
|
||||
void SaveStateSelectorUI::Open(float open_time /* = DEFAULT_OPEN_TIME */)
|
||||
{
|
||||
s_open_time = 0.0f;
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace SaveStateSelectorUI {
|
|||
|
||||
static constexpr float DEFAULT_OPEN_TIME = 5.0f;
|
||||
|
||||
bool IsOpen();
|
||||
void Open(float open_time = DEFAULT_OPEN_TIME);
|
||||
void RefreshList();
|
||||
void DestroyTextures();
|
||||
|
|
|
@ -3366,6 +3366,7 @@ void System::UpdateRunningGame(const char* path, CDImage* image, bool booting)
|
|||
if (s_running_game_serial != prev_serial)
|
||||
UpdateSessionTime(prev_serial);
|
||||
|
||||
if (SaveStateSelectorUI::IsOpen())
|
||||
SaveStateSelectorUI::RefreshList();
|
||||
|
||||
#ifdef ENABLE_DISCORD_PRESENCE
|
||||
|
|
Loading…
Reference in a new issue