GBA: Fix loading subsequent save files (fixes #2067)
Vicki Pfau vi@endrift.com
Sat, 20 Mar 2021 23:43:26 -0700
2 files changed,
6 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -84,6 +84,7 @@ - FFmpeg: Fix encoding of time base
- GB: Fix crash when changing ROM while in banked address space - 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) - mGUI: Don't attempt to preload files larger than can fit in RAM - Qt: Force OpenGL paint engine creation thread (fixes mgba.io/i/1642) - Qt: Fix static compilation in MinGW (fixes mgba.io/i/1769)
M
src/gba/gba.c
→
src/gba/gba.c
@@ -439,7 +439,12 @@ return true;
} bool GBALoadSave(struct GBA* gba, struct VFile* sav) { + enum SavedataType type = gba->memory.savedata.type; + GBASavedataDeinit(&gba->memory.savedata); GBASavedataInit(&gba->memory.savedata, sav); + if (type != SAVEDATA_AUTODETECT) { + GBASavedataForceType(&gba->memory.savedata, type); + } return sav; }