GBA Video: Fix disabling OBJWIN in GL renderer (fixes #1759)
Vicki Pfau vi@endrift.com
Sun, 24 May 2020 13:54:12 -0700
2 files changed,
4 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -23,6 +23,7 @@ - GBA Timers: Fix deserializing count-up timers
- GBA Video: Latch scanline at end of Hblank (fixes mgba.io/i/1319) - GBA Video: Fix Hblank timing - GBA Video: Fix mosaic objects drawing past the end (fixes mgba.io/i/1702) + - GBA Video: Fix disabling OBJWIN in GL renderer (fixes mgba.io/i/1759) Other fixes: - CMake: Always use devkitPro toolchain when applicable (fixes mgba.io/i/1755) - Core: Ensure ELF regions can be written before trying
M
src/gba/renderers/gl.c
→
src/gba/renderers/gl.c
@@ -1704,7 +1704,9 @@ } else {
glUniform4i(uniforms[GBA_GL_OBJ_MOSAIC], 0, 0, 0, 0); } glStencilFunc(GL_ALWAYS, 1, 1); - glDrawArrays(GL_TRIANGLE_FAN, 0, 4); + if (GBAObjAttributesAGetMode(sprite->a) != OBJ_MODE_OBJWIN || GBARegisterDISPCNTIsObjwinEnable(renderer->dispcnt)) { + glDrawArrays(GL_TRIANGLE_FAN, 0, 4); + } shader = &renderer->objShader[2]; uniforms = shader->uniforms;