System: Invalidate display on debug window change

Fixes these windows displaying black if the VM is paused.
This commit is contained in:
Stenzek 2024-10-27 14:21:03 +10:00
parent c6b74684de
commit 2c57817803
No known key found for this signature in database
3 changed files with 16 additions and 3 deletions

View File

@ -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
}

View File

@ -10,7 +10,7 @@
namespace ImGuiManager {
void RenderTextOverlays();
void RenderDebugWindows();
void UpdateDebugWindowConfig();
bool UpdateDebugWindowConfig();
void DestroyAllDebugWindows();
void RenderOverlayWindows();

View File

@ -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 ||