Add missing version magic

This commit is contained in:
Jeffrey Pfau 2014-01-20 03:05:31 -08:00
parent a5d8be30d8
commit 9f28b1ec73
1 changed files with 2 additions and 0 deletions

View File

@ -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;