Bugfix taking screenshots of rotated framebuffers, common in Vulkan on many Android devices

This commit is contained in:
Henrik Rydgård 2024-11-06 17:52:45 +01:00
parent 6fcb75ce63
commit 271d2b41fa

View File

@ -346,7 +346,7 @@ bool TakeGameScreenshot(Draw::DrawContext *draw, const Path &filename, Screensho
} else if (g_display.rotation != DisplayRotation::ROTATE_0) { } else if (g_display.rotation != DisplayRotation::ROTATE_0) {
_dbg_assert_(draw); _dbg_assert_(draw);
GPUDebugBuffer temp; GPUDebugBuffer temp;
success = ::GetOutputFramebuffer(draw, buf); success = ::GetOutputFramebuffer(draw, temp);
if (success) { if (success) {
buf = ApplyRotation(temp, g_display.rotation); buf = ApplyRotation(temp, g_display.rotation);
} }