GB: Only use mapperLastTime to see if RTC data was loaded

- Removing mapperSeconds and mapperLSeconds since both of these can be
  zero at any time since they are seconds timer, not seconds since
epoch.
- This leaves only mapperLastTime as this is the number of seconds since
  last epoch. If this value is zero, then initialize rtc.
This commit is contained in:
negativeExponent 2020-08-14 21:20:54 +08:00
parent 86fcffefd0
commit 95213a6d55
1 changed files with 2 additions and 2 deletions

View File

@ -1462,11 +1462,11 @@ void retro_run(void)
case 0x0f:
case 0x10:
/* Check if any RTC has been loaded, zero value means nothing has been loaded. */
if (!gbDataMBC3.mapperSeconds && !gbDataMBC3.mapperLSeconds && !gbDataMBC3.mapperLastTime)
if (!gbDataMBC3.mapperLastTime)
initRTC = true;
break;
case 0xfd:
if (!gbDataTAMA5.mapperSeconds && !gbDataTAMA5.mapperLSeconds && !gbDataTAMA5.mapperLastTime)
if (!gbDataTAMA5.mapperLastTime)
initRTC = true;
break;
}