Fix OAM deserialization
Jeffrey Pfau jeffrey@endrift.com
Sat, 25 Jan 2014 15:06:28 -0800
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
src/gba/gba-video.c
→
src/gba/gba-video.c
@@ -204,8 +204,10 @@ }
void GBAVideoDeserialize(struct GBAVideo* video, struct GBASerializedState* state) { memcpy(video->renderer->vram, state->vram, SIZE_VRAM); - memcpy(video->oam.raw, state->oam, SIZE_OAM); int i; + for (i = 0; i < SIZE_OAM; i += 2) { + GBAStore16(&video->p->memory.d, BASE_OAM | i, state->oam[i >> 1], 0); + } for (i = 0; i < SIZE_PALETTE_RAM; i += 2) { GBAStore16(&video->p->memory.d, BASE_PALETTE_RAM | i, state->pram[i >> 1], 0); }