mirror of https://github.com/mgba-emu/mgba.git
GB Serialize: Fix crash when loading pre-0.7 SGB savestates
This commit is contained in:
parent
c2de079a9d
commit
9eee7a7c7a
1
CHANGES
1
CHANGES
|
@ -83,6 +83,7 @@ Other fixes:
|
||||||
- FFmpeg: Fix encoding of time base
|
- FFmpeg: Fix encoding of time base
|
||||||
- GB: Fix crash when changing ROM while in banked address space
|
- GB: Fix crash when changing ROM while in banked address space
|
||||||
- GB: Fix loading model overrides
|
- GB: Fix loading model overrides
|
||||||
|
- GB Serialize: Fix crash when loading pre-0.7 SGB savestates
|
||||||
- GB Video: Fix SGB video logs
|
- GB Video: Fix SGB video logs
|
||||||
- GBA: Fix loading multiboot ELF files (fixes mgba.io/i/1949)
|
- GBA: Fix loading multiboot ELF files (fixes mgba.io/i/1949)
|
||||||
- GBA: Fix loading subsequent save files (fixes mgba.io/i/2067)
|
- GBA: Fix loading subsequent save files (fixes mgba.io/i/2067)
|
||||||
|
|
|
@ -195,6 +195,10 @@ bool GBDeserialize(struct GB* gb, const struct GBSerializedState* state) {
|
||||||
gb->audio.style = GB_AUDIO_CGB;
|
gb->audio.style = GB_AUDIO_CGB;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!canSgb) {
|
||||||
|
gb->model &= ~GB_MODEL_SGB;
|
||||||
|
}
|
||||||
|
|
||||||
GBUnmapBIOS(gb);
|
GBUnmapBIOS(gb);
|
||||||
GBMemoryDeserialize(gb, state);
|
GBMemoryDeserialize(gb, state);
|
||||||
GBVideoDeserialize(&gb->video, state);
|
GBVideoDeserialize(&gb->video, state);
|
||||||
|
|
Loading…
Reference in New Issue