all repos — mgba @ 8f7a0e6858b47a713b4b8776b5004cfa0a046a40

mGBA Game Boy Advance Emulator

GBA Video: Make layer disabling work consistently
Vicki Pfau vi@endrift.com
Sat, 04 Aug 2018 10:16:31 -0700
commit

8f7a0e6858b47a713b4b8776b5004cfa0a046a40

parent

6c5d30e2507fd45df39fa76eb63b6af4e84de3f0

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

jump to
M CHANGESCHANGES

@@ -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.csrc/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))) && \