GBA Video: Fix disabling OBJWIN in GL renderer (fixes #1759)

This commit is contained in:
Vicki Pfau 2020-05-24 13:54:12 -07:00
parent d32a97c66c
commit 29c7dc6797
2 changed files with 4 additions and 1 deletions

View File

@ -10,6 +10,7 @@ Emulation fixes:
- 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)

View File

@ -1721,7 +1721,9 @@ void GBAVideoGLRendererDrawSprite(struct GBAVideoGLRenderer* renderer, struct GB
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;