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
|
||||
- Qt: Fix patch loading
|
||||
- Qt: Fix crash when saving an override if a game isn't loaded
|
||||
- GB: Properly unload save files when unloading a ROM
|
||||
Misc:
|
||||
- All: Only update version info if needed
|
||||
- FFmpeg: Encoding cleanup
|
||||
|
|
|
@ -253,11 +253,13 @@ void GBUnloadROM(struct GB* gb) {
|
|||
}
|
||||
gb->pristineRom = 0;
|
||||
|
||||
struct VFile* vf = gb->sramVf;
|
||||
GBSavedataUnmask(gb);
|
||||
GBSramDeinit(gb);
|
||||
if (vf) {
|
||||
vf->close(vf);
|
||||
if (gb->sramRealVf) {
|
||||
gb->sramRealVf->close(gb->sramRealVf);
|
||||
}
|
||||
gb->sramRealVf = NULL;
|
||||
gb->sramVf = NULL;
|
||||
}
|
||||
|
||||
void GBLoadBIOS(struct GB* gb, struct VFile* vf) {
|
||||
|
|
Loading…
Reference in New Issue