From 95f4f976a3c00e9900fcfe1e1401e3a4d38d692e Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Mon, 19 Oct 2015 21:39:24 -0700 Subject: [PATCH] GBA Video: Fix big endian video serialization --- src/gba/video.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/gba/video.c b/src/gba/video.c index 243729468..505ef4fa5 100644 --- a/src/gba/video.c +++ b/src/gba/video.c @@ -272,13 +272,8 @@ static void GBAVideoDummyRendererGetPixels(struct GBAVideoRenderer* renderer, un void GBAVideoSerialize(const struct GBAVideo* video, struct GBASerializedState* state) { memcpy(state->vram, video->renderer->vram, SIZE_VRAM); - int i; - for (i = 0; i < SIZE_OAM; i += 2) { - STORE_16(video->oam.raw[i >> 1], i, state->oam); - } - for (i = 0; i < SIZE_PALETTE_RAM; i += 2) { - STORE_16(video->palette[i >> 1], i, state->pram); - } + memcpy(state->oam, video->oam.raw, SIZE_OAM); + memcpy(state->pram, video->palette, SIZE_PALETTE_RAM); STORE_32(video->nextEvent, 0, &state->video.nextEvent); STORE_32(video->eventDiff, 0, &state->video.eventDiff); STORE_32(video->nextHblank, 0, &state->video.nextHblank);