GBA Serialize: Fix serializing DMA transfer register

This commit is contained in:
Vicki Pfau 2020-01-24 18:03:47 -08:00
parent d0e25d3037
commit f75bbb973c
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,7 @@
0.8.1: (Future)
Emulation fixes:
- GBA Memory: Misaligned SRAM writes are ignored
- GBA Serialize: Fix serializing DMA transfer register
Other fixes:
- Qt: Only dynamically reset video scale if a game is running
- Qt: Fix race condition with proxied video events

View File

@ -950,7 +950,7 @@ void GBAIOSerialize(struct GBA* gba, struct GBASerializedState* state) {
STORE_32(gba->memory.dma[i].when, 0, &state->dma[i].when);
}
state->dmaTransferRegister = gba->memory.dmaTransferRegister;
STORE_32(gba->memory.dmaTransferRegister, 0, &state->dmaTransferRegister);
GBAHardwareSerialize(&gba->memory.hw, state);
}
@ -993,7 +993,9 @@ void GBAIODeserialize(struct GBA* gba, const struct GBASerializedState* state) {
}
}
GBAAudioWriteSOUNDCNT_X(&gba->audio, gba->memory.io[REG_SOUNDCNT_X >> 1]);
gba->memory.dmaTransferRegister = state->dmaTransferRegister;
LOAD_32(gba->memory.dmaTransferRegister, 0, &state->dmaTransferRegister);
GBADMAUpdate(gba);
GBAHardwareDeserialize(&gba->memory.hw, state);
}