From c6c67b7b27ee752b159477cb81810aebc7e08880 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 12 Feb 2021 00:47:32 +1000 Subject: [PATCH] ImGui: Remove close button from debug windows They can be closed by unchecking the setting instead, and it stays in sync with the config this way. --- src/core/cdrom.cpp | 2 +- src/core/dma.cpp | 2 +- src/core/gpu.cpp | 2 +- src/core/mdec.cpp | 2 +- src/core/spu.cpp | 2 +- src/core/timers.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/cdrom.cpp b/src/core/cdrom.cpp index 2d383098f..5275f5c17 100644 --- a/src/core/cdrom.cpp +++ b/src/core/cdrom.cpp @@ -2322,7 +2322,7 @@ void CDROM::DrawDebugWindow() const float framebuffer_scale = ImGui::GetIO().DisplayFramebufferScale.x; ImGui::SetNextWindowSize(ImVec2(800.0f * framebuffer_scale, 550.0f * framebuffer_scale), ImGuiCond_FirstUseEver); - if (!ImGui::Begin("CDROM State", &g_settings.debugging.show_cdrom_state)) + if (!ImGui::Begin("CDROM State", nullptr)) { ImGui::End(); return; diff --git a/src/core/dma.cpp b/src/core/dma.cpp index add0e43fc..5765ff6a8 100644 --- a/src/core/dma.cpp +++ b/src/core/dma.cpp @@ -625,7 +625,7 @@ void DMA::DrawDebugStateWindow() const float framebuffer_scale = ImGui::GetIO().DisplayFramebufferScale.x; ImGui::SetNextWindowSize(ImVec2(850.0f * framebuffer_scale, 250.0f * framebuffer_scale), ImGuiCond_FirstUseEver); - if (!ImGui::Begin("DMA State", &g_settings.debugging.show_dma_state)) + if (!ImGui::Begin("DMA State", nullptr)) { ImGui::End(); return; diff --git a/src/core/gpu.cpp b/src/core/gpu.cpp index c862ab922..638ba9479 100644 --- a/src/core/gpu.cpp +++ b/src/core/gpu.cpp @@ -1525,7 +1525,7 @@ void GPU::DrawDebugStateWindow() const float framebuffer_scale = ImGui::GetIO().DisplayFramebufferScale.x; ImGui::SetNextWindowSize(ImVec2(450.0f * framebuffer_scale, 550.0f * framebuffer_scale), ImGuiCond_FirstUseEver); - if (!ImGui::Begin("GPU", &g_settings.debugging.show_gpu_state)) + if (!ImGui::Begin("GPU", nullptr)) { ImGui::End(); return; diff --git a/src/core/mdec.cpp b/src/core/mdec.cpp index e6008774a..7e1d88411 100644 --- a/src/core/mdec.cpp +++ b/src/core/mdec.cpp @@ -726,7 +726,7 @@ void MDEC::DrawDebugStateWindow() const float framebuffer_scale = ImGui::GetIO().DisplayFramebufferScale.x; ImGui::SetNextWindowSize(ImVec2(300.0f * framebuffer_scale, 350.0f * framebuffer_scale), ImGuiCond_FirstUseEver); - if (!ImGui::Begin("MDEC State", &g_settings.debugging.show_mdec_state)) + if (!ImGui::Begin("MDEC State", nullptr)) { ImGui::End(); return; diff --git a/src/core/spu.cpp b/src/core/spu.cpp index ed5d46b9d..a9b1c3fee 100644 --- a/src/core/spu.cpp +++ b/src/core/spu.cpp @@ -1874,7 +1874,7 @@ void SPU::DrawDebugStateWindow() const float framebuffer_scale = ImGui::GetIO().DisplayFramebufferScale.x; ImGui::SetNextWindowSize(ImVec2(800.0f * framebuffer_scale, 800.0f * framebuffer_scale), ImGuiCond_FirstUseEver); - if (!ImGui::Begin("SPU State", &g_settings.debugging.show_spu_state)) + if (!ImGui::Begin("SPU State", nullptr)) { ImGui::End(); return; diff --git a/src/core/timers.cpp b/src/core/timers.cpp index b8db7822a..6e550c9a4 100644 --- a/src/core/timers.cpp +++ b/src/core/timers.cpp @@ -408,7 +408,7 @@ void Timers::DrawDebugStateWindow() const float framebuffer_scale = ImGui::GetIO().DisplayFramebufferScale.x; ImGui::SetNextWindowSize(ImVec2(800.0f * framebuffer_scale, 100.0f * framebuffer_scale), ImGuiCond_FirstUseEver); - if (!ImGui::Begin("Timer State", &g_settings.debugging.show_timers_state)) + if (!ImGui::Begin("Timer State", nullptr)) { ImGui::End(); return;