mirror of https://github.com/mgba-emu/mgba.git
GB: Restore RTC state if loading save after reset
This commit is contained in:
parent
046f7a3374
commit
63921e025e
|
@ -160,6 +160,10 @@ bool GBLoadSave(struct GB* gb, struct VFile* vf) {
|
||||||
if (gb->sramSize) {
|
if (gb->sramSize) {
|
||||||
GBResizeSram(gb, gb->sramSize);
|
GBResizeSram(gb, gb->sramSize);
|
||||||
GBMBCSwitchSramBank(gb, gb->memory.sramCurrentBank);
|
GBMBCSwitchSramBank(gb, gb->memory.sramCurrentBank);
|
||||||
|
|
||||||
|
if (gb->memory.mbcType == GB_MBC3_RTC) {
|
||||||
|
GBMBCRTCRead(gb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return vf;
|
return vf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue