From 63921e025e4075684ce2f9b81143c123ec7b9fd3 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 2 Dec 2020 00:06:00 -0800 Subject: [PATCH] GB: Restore RTC state if loading save after reset --- src/gb/gb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gb/gb.c b/src/gb/gb.c index 998505c04..6fa16b919 100644 --- a/src/gb/gb.c +++ b/src/gb/gb.c @@ -160,6 +160,10 @@ bool GBLoadSave(struct GB* gb, struct VFile* vf) { if (gb->sramSize) { GBResizeSram(gb, gb->sramSize); GBMBCSwitchSramBank(gb, gb->memory.sramCurrentBank); + + if (gb->memory.mbcType == GB_MBC3_RTC) { + GBMBCRTCRead(gb); + } } return vf; }