GBA Video: Fix OAM and palette initialization

This commit is contained in:
Jeffrey Pfau 2015-12-09 21:22:35 -08:00
parent 08a2b24eac
commit df3ee0e2be
2 changed files with 3 additions and 7 deletions

View File

@ -39,6 +39,7 @@ Bugfixes:
- 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

View File

@ -88,13 +88,8 @@ void GBAVideoReset(struct GBAVideo* video) {
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);