mirror of https://github.com/mgba-emu/mgba.git
GB, GBA Savedata: Fix savestate loading overwriting saves on reset
This commit is contained in:
parent
f888d9b408
commit
d25d4d30ff
1
CHANGES
1
CHANGES
|
@ -43,6 +43,7 @@ Bugfixes:
|
|||
- GB I/O: DMA register is R/W
|
||||
- GB Video: Fix SCX timing
|
||||
- GBA Video: Improve sprite cycle counting (fixes mgba.io/i/1126)
|
||||
- GB, GBA Savedata: Fix savestate loading overwriting saves on reset
|
||||
Misc:
|
||||
- GBA Timer: Use global cycles for timers
|
||||
- GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
|
||||
|
|
|
@ -295,7 +295,6 @@ void GBUnloadROM(struct GB* gb) {
|
|||
gb->isPristine = false;
|
||||
|
||||
gb->sramMaskWriteback = false;
|
||||
GBSavedataUnmask(gb);
|
||||
GBSramDeinit(gb);
|
||||
if (gb->sramRealVf) {
|
||||
gb->sramRealVf->close(gb->sramRealVf);
|
||||
|
@ -468,6 +467,7 @@ void GBReset(struct LR35902Core* cpu) {
|
|||
|
||||
cpu->memory.setActiveRegion(cpu, cpu->pc);
|
||||
|
||||
gb->sramMaskWriteback = false;
|
||||
GBSavedataUnmask(gb);
|
||||
}
|
||||
|
||||
|
|
|
@ -185,6 +185,7 @@ void GBAReset(struct ARMCore* cpu) {
|
|||
|
||||
struct GBA* gba = (struct GBA*) cpu->master;
|
||||
if (!gba->rr || (!gba->rr->isPlaying(gba->rr) && !gba->rr->isRecording(gba->rr))) {
|
||||
gba->memory.savedata.maskWriteback = false;
|
||||
GBASavedataUnmask(&gba->memory.savedata);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue