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();