diff --git a/CHANGES b/CHANGES index a559f2349..ee564b688 100644 --- a/CHANGES +++ b/CHANGES @@ -84,6 +84,7 @@ Other fixes: - 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) diff --git a/src/gba/gba.c b/src/gba/gba.c index ca5d97370..3daa8489f 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -439,7 +439,12 @@ bool GBALoadROM(struct GBA* gba, struct VFile* vf) { } 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; }