From eb4ef6d8a72b35bd39ba4109206c52674930b421 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 1 Sep 2018 14:59:33 -0700 Subject: [PATCH] GBA Serialize: Fix loading states in Hblank --- CHANGES | 1 + src/gba/video.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 309b38c3a..929a50e5e 100644 --- a/CHANGES +++ b/CHANGES @@ -11,6 +11,7 @@ Bugfixes: - GB I/O: DMA register is R/W - GBA Video: Improve sprite cycle counting (fixes mgba.io/i/1126) - GBA: Reset WAITCNT properly + - GBA Serialize: Fix loading states in Hblank Misc: - FFmpeg: Support libswresample (fixes mgba.io/i/1120, mgba.io/b/123) diff --git a/src/gba/video.c b/src/gba/video.c index b7eeaa1c3..3f231328d 100644 --- a/src/gba/video.c +++ b/src/gba/video.c @@ -321,7 +321,7 @@ void GBAVideoDeserialize(struct GBAVideo* video, const struct GBASerializedState uint32_t when; LOAD_32(when, 0, &state->video.nextEvent); - GBARegisterDISPSTAT dispstat = video->p->memory.io[REG_DISPSTAT >> 1]; + GBARegisterDISPSTAT dispstat = state->io[REG_DISPSTAT >> 1]; if (GBARegisterDISPSTATIsInHblank(dispstat)) { video->event.callback = _startHdraw; } else {