GB Serialize: Fix crash when loading pre-0.7 SGB savestates
Vicki Pfau vi@endrift.com
Tue, 23 Mar 2021 00:07:11 -0700
2 files changed,
5 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -83,6 +83,7 @@ - FFmpeg: Fix some small memory leaks
- FFmpeg: Fix encoding of time base - GB: Fix crash when changing ROM while in banked address space - GB: Fix loading model overrides + - GB Serialize: Fix crash when loading pre-0.7 SGB savestates - GB Video: Fix SGB video logs - GBA: Fix loading multiboot ELF files (fixes mgba.io/i/1949) - GBA: Fix loading subsequent save files (fixes mgba.io/i/2067)
M
src/gb/serialize.c
→
src/gb/serialize.c
@@ -195,6 +195,10 @@ } else {
gb->audio.style = GB_AUDIO_CGB; } + if (!canSgb) { + gb->model &= ~GB_MODEL_SGB; + } + GBUnmapBIOS(gb); GBMemoryDeserialize(gb, state); GBVideoDeserialize(&gb->video, state);