diff --git a/src/core/imgui_overlays.cpp b/src/core/imgui_overlays.cpp index fb7f6c8e3..7c15b7ad8 100644 --- a/src/core/imgui_overlays.cpp +++ b/src/core/imgui_overlays.cpp @@ -203,10 +203,11 @@ void Host::DisplayLoadingScreen(const char* message, int progress_min /*= -1*/, ImGui::NewFrame(); } -void ImGuiManager::UpdateDebugWindowConfig() +bool ImGuiManager::UpdateDebugWindowConfig() { #ifndef __ANDROID__ const bool block_all = Achievements::IsHardcoreModeActive(); + bool was_changed = false; for (size_t i = 0; i < NUM_DEBUG_WINDOWS; i++) { @@ -230,8 +231,16 @@ void ImGuiManager::UpdateDebugWindowConfig() { ERROR_LOG("Failed to create aux render window for {}: {}", info.name, error.GetDescription()); } + else + { + was_changed = true; + } } } + + return was_changed; +#else + return false; #endif } diff --git a/src/core/imgui_overlays.h b/src/core/imgui_overlays.h index fcaea0353..7c9f26540 100644 --- a/src/core/imgui_overlays.h +++ b/src/core/imgui_overlays.h @@ -10,7 +10,7 @@ namespace ImGuiManager { void RenderTextOverlays(); void RenderDebugWindows(); -void UpdateDebugWindowConfig(); +bool UpdateDebugWindowConfig(); void DestroyAllDebugWindows(); void RenderOverlayWindows(); diff --git a/src/core/system.cpp b/src/core/system.cpp index 529963e60..ac6ba0ce8 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -1298,7 +1298,10 @@ bool System::RecreateGPU(GPURenderer renderer, bool force_recreate_device, bool } if (force_recreate_device) + { ImGuiManager::UpdateDebugWindowConfig(); + InvalidateDisplay(); + } // fix up vsync etc UpdateSpeedLimiterState(); @@ -4596,7 +4599,8 @@ void System::CheckForSettingsChanges(const Settings& old_settings) PostProcessing::UpdateSettings(); - ImGuiManager::UpdateDebugWindowConfig(); + if (ImGuiManager::UpdateDebugWindowConfig()) + InvalidateDisplay(); #ifdef ENABLE_GDB_SERVER if (g_settings.debugging.enable_gdb_server != old_settings.debugging.enable_gdb_server ||