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:
parent
86fcffefd0
commit
95213a6d55
|
@ -1462,11 +1462,11 @@ void retro_run(void)
|
||||||
case 0x0f:
|
case 0x0f:
|
||||||
case 0x10:
|
case 0x10:
|
||||||
/* Check if any RTC has been loaded, zero value means nothing has been loaded. */
|
/* 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;
|
initRTC = true;
|
||||||
break;
|
break;
|
||||||
case 0xfd:
|
case 0xfd:
|
||||||
if (!gbDataTAMA5.mapperSeconds && !gbDataTAMA5.mapperLSeconds && !gbDataTAMA5.mapperLastTime)
|
if (!gbDataTAMA5.mapperLastTime)
|
||||||
initRTC = true;
|
initRTC = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue