GBA Video: Make layer disabling work consistently
Vicki Pfau vi@endrift.com
Sat, 04 Aug 2018 10:16:31 -0700
2 files changed,
3 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -44,6 +44,7 @@ - GB I/O: DMA register is R/W
- GB Video: Fix SCX timing - GBA Video: Improve sprite cycle counting (fixes mgba.io/i/1126) - GB, GBA Savedata: Fix savestate loading overwriting saves on reset + - GBA Video: Make layer disabling work consistently Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
M
src/gba/renderers/video-software.c
→
src/gba/renderers/video-software.c
@@ -722,7 +722,7 @@ }
} static void _enableBg(struct GBAVideoSoftwareRenderer* renderer, int bg, bool active) { - if (renderer->d.disableBG[bg] || !active) { + if (!active) { renderer->bg[bg].enabled = 0; } else if (!renderer->bg[bg].enabled && active) { if (renderer->nextY == 0) {@@ -799,6 +799,7 @@ }
} #define TEST_LAYER_ENABLED(X) \ + !renderer->d.disableBG[X] && \ (renderer->bg[X].enabled == 4 && \ (GBAWindowControlIsBg ## X ## Enable(renderer->currentWindow.packed) || \ (GBARegisterDISPCNTIsObjwinEnable(renderer->dispcnt) && GBAWindowControlIsBg ## X ## Enable (renderer->objwin.packed))) && \