mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 01:33:45 +01:00
Add zoom feature to framebuffer list view in ImDebugger
This commit is contained in:
1 parent
8f76b191cd
commit
8a431e2ec2
2 files changed
+5
-1
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user