GBA I/O: Fix deserializing audio on big endian

This commit is contained in:
Vicki Pfau 2021-07-01 22:09:23 -07:00
parent 0352125cad
commit 801033020a
1 changed files with 2 additions and 1 deletions

View File

@ -973,7 +973,8 @@ void GBAIOSerialize(struct GBA* gba, struct GBASerializedState* state) {
}
void GBAIODeserialize(struct GBA* gba, const struct GBASerializedState* state) {
GBAAudioWriteSOUNDCNT_X(&gba->audio, state->io[REG_SOUNDCNT_X >> 1]);
LOAD_16(gba->memory.io[REG_SOUNDCNT_X >> 1], REG_SOUNDCNT_X, state->io);
GBAAudioWriteSOUNDCNT_X(&gba->audio, gba->memory.io[REG_SOUNDCNT_X >> 1]);
int i;
for (i = 0; i < REG_MAX; i += 2) {