From 60e244291a94bb66ef84aef8ed843995a6b60e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 12 Dec 2024 23:01:40 +0100 Subject: [PATCH] Enable a dockspace, so you can dock windows to the sides of the screen --- GPU/Common/TextureCacheCommon.cpp | 2 +- UI/EmuScreen.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index d10712d11d..84cbf90679 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -3067,7 +3067,7 @@ void TextureCacheCommon::DrawImGuiDebug(uint64_t &selectedTextureId) const { ImVec2 avail = ImGui::GetContentRegionAvail(); auto &style = ImGui::GetStyle(); ImGui::BeginChild("left", ImVec2(140.0f, 0.0f), ImGuiChildFlags_ResizeX); - float window_visible_x2 = ImGui::GetCursorPosX() + ImGui::GetContentRegionAvail().x; + float window_visible_x2 = ImGui::GetCursorScreenPos().x + ImGui::GetContentRegionAvail().x; // Global texture stats int replacementStateCounts[(int)ReplacementState::COUNT]{}; diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index e8d809c0da..6725eda504 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -1686,6 +1686,8 @@ void EmuScreen::renderImDebugger() { io.AddKeyEvent(ImGuiMod_Alt, keyAltLeft_ || keyAltRight_); // io.AddKeyEvent(ImGuiMod_Super, e.key.super); + ImGui::DockSpaceOverViewport(0, ImGui::GetMainViewport(), ImGuiDockNodeFlags_PassthruCentralNode); + imDebugger_->Frame(currentDebugMIPS, gpuDebug); ImGui::Render();