Rework the internal screenshot API, fix bug causing screenshotting to get stuck

This commit is contained in:
Henrik Rydgård committed 2026-02-13 12:34:26 +01:00
1 parent f2459aa0f4
commit 386fc442a6
13 files changed
+246 -211

No files matched your search

+1
View File
@@ -3137,6 +3137,7 @@ bool GetOutputFramebuffer(Draw::DrawContext *draw, GPUDebugBuffer &buffer) {
bool flipped = g_Config.iGPUBackend == (int)GPUBackend::OPENGL;
buffer.Allocate(w, h, fmt == Draw::DataFormat::R8G8B8A8_UNORM ? GPU_DBG_FORMAT_8888 : GPU_DBG_FORMAT_8888_BGRA, flipped);
buffer.SetIsBackbuffer(true);
return draw->CopyFramebufferToMemory(nullptr, Draw::Aspect::COLOR_BIT, 0, 0, w, h, fmt, buffer.GetData(), w, Draw::ReadbackMode::BLOCK, "GetOutputFramebuffer");
}