diff --git a/src/core/imgui_overlays.cpp b/src/core/imgui_overlays.cpp index 7e7a97df2..2f0b3cfba 100644 --- a/src/core/imgui_overlays.cpp +++ b/src/core/imgui_overlays.cpp @@ -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; diff --git a/src/core/imgui_overlays.h b/src/core/imgui_overlays.h index 599e5fcc8..77866a4b6 100644 --- a/src/core/imgui_overlays.h +++ b/src/core/imgui_overlays.h @@ -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(); diff --git a/src/core/system.cpp b/src/core/system.cpp index 6f6358230..85f9edcda 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -3366,7 +3366,8 @@ void System::UpdateRunningGame(const char* path, CDImage* image, bool booting) if (s_running_game_serial != prev_serial) UpdateSessionTime(prev_serial); - SaveStateSelectorUI::RefreshList(); + if (SaveStateSelectorUI::IsOpen()) + SaveStateSelectorUI::RefreshList(); #ifdef ENABLE_DISCORD_PRESENCE UpdateDiscordPresence();