all repos — mgba @ 63921e025e4075684ce2f9b81143c123ec7b9fd3

mGBA Game Boy Advance Emulator

GB: Restore RTC state if loading save after reset
Vicki Pfau vi@endrift.com
Wed, 02 Dec 2020 00:06:00 -0800
commit

63921e025e4075684ce2f9b81143c123ec7b9fd3

parent

046f7a3374395a4446db4fdd70ac8cbea9755df0

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/gb/gb.csrc/gb/gb.c

@@ -160,6 +160,10 @@ gb->sramRealVf = vf;

if (gb->sramSize) { GBResizeSram(gb, gb->sramSize); GBMBCSwitchSramBank(gb, gb->memory.sramCurrentBank); + + if (gb->memory.mbcType == GB_MBC3_RTC) { + GBMBCRTCRead(gb); + } } return vf; }