mirror of https://github.com/mgba-emu/mgba.git
GB: Properly unload save files when unloading a ROM
This commit is contained in:
parent
742538dc43
commit
bf06f1e443
1
CHANGES
1
CHANGES
|
@ -29,6 +29,7 @@ Bugfixes:
|
||||||
- GBA Memory: Fix several unused I/O register read values
|
- GBA Memory: Fix several unused I/O register read values
|
||||||
- Qt: Fix patch loading
|
- Qt: Fix patch loading
|
||||||
- Qt: Fix crash when saving an override if a game isn't loaded
|
- Qt: Fix crash when saving an override if a game isn't loaded
|
||||||
|
- GB: Properly unload save files when unloading a ROM
|
||||||
Misc:
|
Misc:
|
||||||
- All: Only update version info if needed
|
- All: Only update version info if needed
|
||||||
- FFmpeg: Encoding cleanup
|
- FFmpeg: Encoding cleanup
|
||||||
|
|
|
@ -253,11 +253,13 @@ void GBUnloadROM(struct GB* gb) {
|
||||||
}
|
}
|
||||||
gb->pristineRom = 0;
|
gb->pristineRom = 0;
|
||||||
|
|
||||||
struct VFile* vf = gb->sramVf;
|
GBSavedataUnmask(gb);
|
||||||
GBSramDeinit(gb);
|
GBSramDeinit(gb);
|
||||||
if (vf) {
|
if (gb->sramRealVf) {
|
||||||
vf->close(vf);
|
gb->sramRealVf->close(gb->sramRealVf);
|
||||||
}
|
}
|
||||||
|
gb->sramRealVf = NULL;
|
||||||
|
gb->sramVf = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GBLoadBIOS(struct GB* gb, struct VFile* vf) {
|
void GBLoadBIOS(struct GB* gb, struct VFile* vf) {
|
||||||
|
|
Loading…
Reference in New Issue