all repos — mgba @ 9f28b1ec73ad387b87bd280b07c94861d71ad3bf

mGBA Game Boy Advance Emulator

Add missing version magic
Jeffrey Pfau jeffrey@endrift.com
Mon, 20 Jan 2014 03:05:31 -0800
commit

9f28b1ec73ad387b87bd280b07c94861d71ad3bf

parent

a5d8be30d83e5ff9ed376dca74eb961bba5b4593

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

jump to
M src/gba/gba-serialize.csrc/gba/gba-serialize.c

@@ -11,6 +11,8 @@

const uint32_t GBA_SAVESTATE_MAGIC = 0x01000000; void GBASerialize(struct GBA* gba, struct GBASerializedState* state) { + state->versionMagic = GBA_SAVESTATE_MAGIC; + memcpy(state->cpu.gprs, gba->cpu.gprs, sizeof(state->cpu.gprs)); state->cpu.cpsr = gba->cpu.cpsr; state->cpu.spsr = gba->cpu.spsr;