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;
|
static bool s_open = false;
|
||||||
} // namespace SaveStateSelectorUI
|
} // namespace SaveStateSelectorUI
|
||||||
|
|
||||||
|
bool SaveStateSelectorUI::IsOpen()
|
||||||
|
{
|
||||||
|
return s_open;
|
||||||
|
}
|
||||||
|
|
||||||
void SaveStateSelectorUI::Open(float open_time /* = DEFAULT_OPEN_TIME */)
|
void SaveStateSelectorUI::Open(float open_time /* = DEFAULT_OPEN_TIME */)
|
||||||
{
|
{
|
||||||
s_open_time = 0.0f;
|
s_open_time = 0.0f;
|
||||||
|
|
|
@ -15,6 +15,7 @@ namespace SaveStateSelectorUI {
|
||||||
|
|
||||||
static constexpr float DEFAULT_OPEN_TIME = 5.0f;
|
static constexpr float DEFAULT_OPEN_TIME = 5.0f;
|
||||||
|
|
||||||
|
bool IsOpen();
|
||||||
void Open(float open_time = DEFAULT_OPEN_TIME);
|
void Open(float open_time = DEFAULT_OPEN_TIME);
|
||||||
void RefreshList();
|
void RefreshList();
|
||||||
void DestroyTextures();
|
void DestroyTextures();
|
||||||
|
|
|
@ -3366,7 +3366,8 @@ void System::UpdateRunningGame(const char* path, CDImage* image, bool booting)
|
||||||
if (s_running_game_serial != prev_serial)
|
if (s_running_game_serial != prev_serial)
|
||||||
UpdateSessionTime(prev_serial);
|
UpdateSessionTime(prev_serial);
|
||||||
|
|
||||||
SaveStateSelectorUI::RefreshList();
|
if (SaveStateSelectorUI::IsOpen())
|
||||||
|
SaveStateSelectorUI::RefreshList();
|
||||||
|
|
||||||
#ifdef ENABLE_DISCORD_PRESENCE
|
#ifdef ENABLE_DISCORD_PRESENCE
|
||||||
UpdateDiscordPresence();
|
UpdateDiscordPresence();
|
||||||
|
|
Loading…
Reference in New Issue