Add zoom feature to framebuffer list view in ImDebugger

This commit is contained in:
Henrik Rydgård committed 2026-01-28 23:49:00 +01:00
1 parent 8f76b191cd
commit 8a431e2ec2
2 files changed
+5 -1

No files matched your search

+2
View File
@@ -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);
+3 -1
View File
@@ -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();