all repos — mgba @ a8dcbd05cb3738a45718457f756e050559e9c834

mGBA Game Boy Advance Emulator

GBA Video: Fix enabling layers in non-tile modes (fixes #1317)
Vicki Pfau vi@endrift.com
Sat, 23 Feb 2019 00:13:22 -0800
commit

a8dcbd05cb3738a45718457f756e050559e9c834

parent

fc33aec7bbf40fe93ee7101af30e796fc24c812c

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

jump to
M CHANGESCHANGES

@@ -16,6 +16,7 @@ - GBA DMA: Fix Display Start DMAs

- GBA DMA: Fix DMA start/end timing - Qt: Fix window icon on X11 - GB, GBA Serialize: Fix loading two states in a row + - GBA Video: Fix enabling layers in non-tile modes (fixes mgba.io/i/1317) Misc: - GBA Video: Improve sprite cycle counting (fixes mgba.io/i/1274)
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -727,7 +727,8 @@ int wasActive = renderer->bg[bg].enabled;

if (!active) { renderer->bg[bg].enabled = 0; } else if (!wasActive && active) { - if (renderer->nextY == 0) { + if (renderer->nextY == 0 || GBARegisterDISPCNTGetMode(renderer->dispcnt) > 2) { + // TODO: Investigate in more depth how switching background works in different modes renderer->bg[bg].enabled = 4; } else { renderer->bg[bg].enabled = 1;