mirror of https://github.com/mgba-emu/mgba.git
GB, GBA: Save writeback-pending masked saves on unload (fixes #2396)
This commit is contained in:
parent
ae4605596f
commit
c34e031d8c
1
CHANGES
1
CHANGES
|
@ -3,6 +3,7 @@ Emulation fixes:
|
|||
- GBA I/O: Disable open bus behavior on invalid register 06A
|
||||
Other fixes:
|
||||
- FFmpeg: Fix crash when encoding audio with some containers
|
||||
- GB, GBA: Save writeback-pending masked saves on unload (fixes mgba.io/i/2396)
|
||||
|
||||
0.9.3: (2021-12-17)
|
||||
Emulation fixes:
|
||||
|
|
|
@ -316,7 +316,9 @@ void GBUnloadROM(struct GB* gb) {
|
|||
gb->memory.mbcType = GB_MBC_AUTODETECT;
|
||||
gb->isPristine = false;
|
||||
|
||||
gb->sramMaskWriteback = false;
|
||||
if (!gb->sramDirty) {
|
||||
gb->sramMaskWriteback = false;
|
||||
}
|
||||
GBSavedataUnmask(gb);
|
||||
GBSramDeinit(gb);
|
||||
if (gb->sramRealVf) {
|
||||
|
|
|
@ -148,7 +148,9 @@ void GBAUnloadROM(struct GBA* gba) {
|
|||
gba->memory.rom = NULL;
|
||||
gba->isPristine = false;
|
||||
|
||||
gba->memory.savedata.maskWriteback = false;
|
||||
if (!gba->memory.savedata.dirty) {
|
||||
gba->memory.savedata.maskWriteback = false;
|
||||
}
|
||||
GBASavedataUnmask(&gba->memory.savedata);
|
||||
GBASavedataDeinit(&gba->memory.savedata);
|
||||
if (gba->memory.savedata.realVf) {
|
||||
|
|
Loading…
Reference in New Issue