From 8a431e2ec2569848cf6e5f376765a40bd5934b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 28 Jan 2026 23:49:00 +0100 Subject: [PATCH] Add zoom feature to framebuffer list view in ImDebugger --- UI/ImDebugger/ImDebugger.h | 2 ++ UI/ImDebugger/ImGe.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/UI/ImDebugger/ImDebugger.h b/UI/ImDebugger/ImDebugger.h index 651c59c188..f7c14d5125 100644 --- a/UI/ImDebugger/ImDebugger.h +++ b/UI/ImDebugger/ImDebugger.h @@ -121,6 +121,8 @@ struct ImConfig { bool sasShowAllVoices = false; + float fbViewerZoom = 1.0f; + // We use a separate ini file from the main PPSSPP config. void LoadConfig(const Path &iniFile); diff --git a/UI/ImDebugger/ImGe.cpp b/UI/ImDebugger/ImGe.cpp index 0ed1f2b77c..70cc812eb4 100644 --- a/UI/ImDebugger/ImGe.cpp +++ b/UI/ImDebugger/ImGe.cpp @@ -79,10 +79,12 @@ void DrawFramebuffersWindow(ImConfig &cfg, FramebufferManagerCommon *framebuffer } if (cfg.selectedFramebuffer != -1) { + ImGui::SliderFloat("Scale", &cfg.fbViewerZoom, 0.5f, 16.0f, "%.2f", ImGuiSliderFlags_Logarithmic); + // Now, draw the image of the selected framebuffer. Draw::Framebuffer *fb = vfbs[cfg.selectedFramebuffer]->fbo; ImTextureID texId = ImGui_ImplThin3d_AddFBAsTextureTemp(fb, Draw::Aspect::COLOR_BIT, ImGuiPipeline::TexturedOpaque); - ImGui::Image(texId, ImVec2(fb->Width(), fb->Height())); + ImGui::Image(texId, ImVec2(fb->Width() * cfg.fbViewerZoom, fb->Height() * cfg.fbViewerZoom)); } ImGui::End();