Fix libretro RTC support. Fixes
@@ -1016,7 +1016,7 @@ void *retro_get_memory_data(unsigned type)
break;
case RETRO_MEMORY_RTC:
if(gameboy[0].cartridge_type->has_battery)
- data = &gameboy[0].rtc_real;
+ data = GB_GET_SECTION(&gameboy[0], rtc);
else
data = NULL;
break;
@@ -1043,13 +1043,13 @@ void *retro_get_memory_data(unsigned type)
break;
case RETRO_MEMORY_GAMEBOY_1_RTC:
if(gameboy[0].cartridge_type->has_battery)
- data = &gameboy[0].rtc_real;
+ data = GB_GET_SECTION(&gameboy[0], rtc);
else
data = NULL;
break;
case RETRO_MEMORY_GAMEBOY_2_RTC:
if(gameboy[1].cartridge_type->has_battery)
- data = &gameboy[1].rtc_real;
+ data = GB_GET_SECTION(&gameboy[1], rtc);
else
data = NULL;
break;
@@ -1088,7 +1088,7 @@ size_t retro_get_memory_size(unsigned type)
break;
case RETRO_MEMORY_RTC:
if(gameboy[0].cartridge_type->has_battery)
- size = sizeof (gameboy[0].rtc_real);
+ size = GB_SECTION_SIZE(rtc);
else
size = 0;
break;
@@ -1115,11 +1115,11 @@ size_t retro_get_memory_size(unsigned type)
break;
case RETRO_MEMORY_GAMEBOY_1_RTC:
if(gameboy[0].cartridge_type->has_battery)
- size = sizeof (gameboy[0].rtc_real);
+ size = GB_SECTION_SIZE(rtc);
break;
case RETRO_MEMORY_GAMEBOY_2_RTC:
if(gameboy[1].cartridge_type->has_battery)
- size = sizeof (gameboy[1].rtc_real);
+ size = GB_SECTION_SIZE(rtc);
break;
default:
break;
