all repos — mgba @ 29c7dc67973674244f29cbeefacc08fe604edbc6

mGBA Game Boy Advance Emulator

GBA Video: Fix disabling OBJWIN in GL renderer (fixes #1759)
Vicki Pfau vi@endrift.com
Sun, 24 May 2020 13:54:12 -0700
commit

29c7dc67973674244f29cbeefacc08fe604edbc6

parent

d32a97c66cac3a0f1fe8b1fbe5cebe9fbcf30b42

2 files changed, 4 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -10,6 +10,7 @@ - GBA SIO: Fix Multiplayer busy bit

- GBA SIO: Fix double-unloading active driver - GBA Timers: Fix deserializing count-up timers - 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: Fix ELF loading regression (fixes mgba.io/i/1669)
M src/gba/renderers/gl.csrc/gba/renderers/gl.c

@@ -1721,7 +1721,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;