Libretro: Only enable RTC save if gbRTCPresent=1

This commit is contained in:
negativeExponent 2021-05-25 09:52:44 +08:00
parent 05a046e7ed
commit ab7f7baab0
1 changed files with 3 additions and 2 deletions

View File

@ -309,7 +309,7 @@ void* retro_get_memory_data(unsigned id)
data = (gbCgbMode ? gbVram : (gbMemory + 0x8000));
break;
case RETRO_MEMORY_RTC:
//if (gbBattery/* && gbRTCPresent*/)
if (gbRTCPresent)
data = gb_rtcdata_prt();
break;
}
@ -357,7 +357,8 @@ size_t retro_get_memory_size(unsigned id)
size = gbCgbMode ? 0x4000 : 0x2000;
break;
case RETRO_MEMORY_RTC:
size = gb_rtcdata_size();
if (gbRTCPresent)
size = gb_rtcdata_size();
break;
}
break;