GBA Video: Fix regression with sprite visibility
Jeffrey Pfau jeffrey@endrift.com
Wed, 17 Jun 2015 22:49:09 -0700
1 files changed,
6 insertions(+),
1 deletions(-)
M
src/gba/renderers/video-software.c
→
src/gba/renderers/video-software.c
@@ -736,7 +736,7 @@ for (w = 0; w < renderer->nWindows; ++w) {
renderer->start = renderer->end; renderer->end = renderer->windows[w].endX; renderer->currentWindow = renderer->windows[w].control; - if (GBAWindowControlIsObjEnable(renderer->currentWindow.packed) && spriteLayers & (1 << priority)) { + if (spriteLayers & (1 << priority)) { _postprocessSprite(renderer, priority); } if (TEST_LAYER_ENABLED(0) && GBARegisterDISPCNTGetMode(renderer->dispcnt) < 2) {@@ -1883,6 +1883,9 @@ bool objwinOnly = false;
if (objwinSlowPath) { objwinDisable = !GBAWindowControlIsObjEnable(renderer->objwin.packed); objwinOnly = !objwinDisable && !GBAWindowControlIsObjEnable(renderer->currentWindow.packed); + if (objwinDisable && !GBAWindowControlIsObjEnable(renderer->currentWindow.packed)) { + return; + } if (objwinDisable) { for (x = renderer->start; x < renderer->end; ++x, ++pixel) {@@ -1912,6 +1915,8 @@ }
} return; } + } else if (!GBAWindowControlIsObjEnable(renderer->currentWindow.packed)) { + return; } for (x = renderer->start; x < renderer->end; ++x, ++pixel) { uint32_t color = renderer->spriteLayer[x] & ~FLAG_OBJWIN;