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,6 +357,7 @@ size_t retro_get_memory_size(unsigned id)
size = gbCgbMode ? 0x4000 : 0x2000;
break;
case RETRO_MEMORY_RTC:
if (gbRTCPresent)
size = gb_rtcdata_size();
break;
}