Unbind the read framebuffer before the swap, for OBS's game capture.

The renderer left the back buffer's render target bound as the read
framebuffer after the display blit. OBS's game capture copies the window
from the read framebuffer bound in the context at SwapBuffers, so it copied
that render target, which is drawn top row first, and the recording was
upside down. Recorded with OBS 32.2.2 before and after: upside down, then
upright.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
John CranstonandClaude Fable 5.1 committed 2026-10-22 01:58:46 -07:00
1 parent 61621e6513
commit a689a8a3fa
1 file changed
+1
+1
View File
@@ -6808,6 +6808,7 @@ void WINAPI D3DDevice_Present(CONST RECT *source_rectangle, CONST RECT *destinat
x, y + height, x + width, y, GL_COLOR_BUFFER_BIT, GL_LINEAR);
}
glBindVertexArray(device.vertex_array);
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
platform_video_swap();
#ifndef HALO_GLES
visibility_read_batch();