GBA Video: Fix OAM and palette initialization
Jeffrey Pfau jeffrey@endrift.com
Wed, 09 Dec 2015 21:22:35 -0800
2 files changed,
3 insertions(+),
7 deletions(-)
M
CHANGES
→
CHANGES
@@ -39,6 +39,7 @@ - ARM7: Fix STRT/STRBT
- ARM7: Implement undefined STRH/LDRH/LDRSH/LDRSB versions - ARM7: Fix bank switching with LDR[B]T/STR[B]T - Qt: Fix crash when closing multiplayer windows + - GBA Video: Fix OAM and palette initialization Misc: - Qt: Window size command line options are now supported - Qt: Increase usability of key mapper
M
src/gba/video.c
→
src/gba/video.c
@@ -88,13 +88,8 @@ }
video->vram = anonymousMemoryMap(SIZE_VRAM); video->renderer->vram = video->vram; - int i; - for (i = 0; i < 128; ++i) { - STORE_16(0x0200, i * 8 + 0, video->oam.raw); - STORE_16(0x0000, i * 8 + 2, video->oam.raw); - STORE_16(0x0000, i * 8 + 4, video->oam.raw); - STORE_16(0x0000, i * 8 + 6, video->oam.raw); - } + memset(video->palette, 0, sizeof(video->palette)); + memset(video->oam.raw, 0, sizeof(video->oam.raw)); video->renderer->deinit(video->renderer); video->renderer->init(video->renderer);