GB, GBA Core: Reset audio when loading mVL states so audio sync works

This commit is contained in:
Vicki Pfau 2017-04-24 12:44:51 -07:00
parent 25beafcc11
commit aec8b82756
2 changed files with 2 additions and 0 deletions

View File

@ -818,6 +818,7 @@ static bool _GBVLPLoadState(struct mCore* core, const void* buffer) {
GBVideoDeserialize(&gb->video, state);
GBIODeserialize(gb, state);
GBAudioReset(&gb->audio);
// Make sure CPU loop never spins
GBHalt(gb->cpu);

View File

@ -838,6 +838,7 @@ static bool _GBAVLPLoadState(struct mCore* core, const void* state) {
gba->cpu->memory.store16(gba->cpu, BASE_IO | REG_IE, 0, NULL);
GBAVideoDeserialize(&gba->video, state);
GBAIODeserialize(gba, state);
GBAAudioReset(&gba->audio);
return true;
}