mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 15:40:44 +00:00
Rename callbacks
This commit is contained in:
parent
acdf0eb74e
commit
c717ebdfda
@ -83,7 +83,7 @@ static void event_disk_control_set_eject(bool new_state, bool print_log)
|
||||
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info);
|
||||
|
||||
if (info)
|
||||
control = (const struct retro_disk_control_callback*)&info->disk_control;
|
||||
control = (const struct retro_disk_control_callback*)&info->disk_control_cb;
|
||||
|
||||
if (!control || !control->get_num_images)
|
||||
return;
|
||||
@ -131,7 +131,7 @@ static void event_disk_control_set_index(unsigned idx)
|
||||
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info);
|
||||
|
||||
if (info)
|
||||
control = (const struct retro_disk_control_callback*)&info->disk_control;
|
||||
control = (const struct retro_disk_control_callback*)&info->disk_control_cb;
|
||||
|
||||
if (!control || !control->get_num_images)
|
||||
return;
|
||||
@ -189,7 +189,7 @@ static bool event_disk_control_append_image(const char *path)
|
||||
|
||||
if (sysinfo)
|
||||
control = (const struct retro_disk_control_callback*)
|
||||
&sysinfo->disk_control;
|
||||
&sysinfo->disk_control_cb;
|
||||
|
||||
if (!control)
|
||||
return false;
|
||||
@ -1559,11 +1559,11 @@ bool event_cmd_ctl(enum event_command cmd, void *data)
|
||||
return event_disk_control_append_image(path);
|
||||
}
|
||||
case EVENT_CMD_DISK_EJECT_TOGGLE:
|
||||
if (info && info->disk_control.get_num_images)
|
||||
if (info && info->disk_control_cb.get_num_images)
|
||||
{
|
||||
const struct retro_disk_control_callback *control =
|
||||
(const struct retro_disk_control_callback*)
|
||||
&info->disk_control;
|
||||
&info->disk_control_cb;
|
||||
|
||||
if (control)
|
||||
{
|
||||
@ -1577,11 +1577,11 @@ bool event_cmd_ctl(enum event_command cmd, void *data)
|
||||
1, 120, true);
|
||||
break;
|
||||
case EVENT_CMD_DISK_NEXT:
|
||||
if (info && info->disk_control.get_num_images)
|
||||
if (info && info->disk_control_cb.get_num_images)
|
||||
{
|
||||
const struct retro_disk_control_callback *control =
|
||||
(const struct retro_disk_control_callback*)
|
||||
&info->disk_control;
|
||||
&info->disk_control_cb;
|
||||
|
||||
if (!control)
|
||||
return false;
|
||||
@ -1597,11 +1597,11 @@ bool event_cmd_ctl(enum event_command cmd, void *data)
|
||||
1, 120, true);
|
||||
break;
|
||||
case EVENT_CMD_DISK_PREV:
|
||||
if (info && info->disk_control.get_num_images)
|
||||
if (info && info->disk_control_cb.get_num_images)
|
||||
{
|
||||
const struct retro_disk_control_callback *control =
|
||||
(const struct retro_disk_control_callback*)
|
||||
&info->disk_control;
|
||||
&info->disk_control_cb;
|
||||
|
||||
if (!control)
|
||||
return false;
|
||||
|
@ -860,7 +860,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
|
||||
case RETRO_ENVIRONMENT_SET_DISK_CONTROL_INTERFACE:
|
||||
RARCH_LOG("Environ SET_DISK_CONTROL_INTERFACE.\n");
|
||||
system->disk_control =
|
||||
system->disk_control_cb =
|
||||
*(const struct retro_disk_control_callback*)data;
|
||||
break;
|
||||
|
||||
@ -1062,7 +1062,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
cb->stop = driver_location_stop;
|
||||
cb->get_position = driver_location_get_position;
|
||||
cb->set_interval = driver_location_set_interval;
|
||||
system->location_callback = *cb;
|
||||
system->location_cb = *cb;
|
||||
|
||||
location_driver_ctl(RARCH_LOCATION_CTL_UNSET_ACTIVE, NULL);
|
||||
break;
|
||||
|
@ -217,8 +217,8 @@ void init_location(void)
|
||||
location_driver_ctl(RARCH_LOCATION_CTL_UNSET_ACTIVE, NULL);
|
||||
}
|
||||
|
||||
if (system->location_callback.initialized)
|
||||
system->location_callback.initialized();
|
||||
if (system->location_cb.initialized)
|
||||
system->location_cb.initialized();
|
||||
}
|
||||
|
||||
static void uninit_location(void)
|
||||
@ -229,8 +229,8 @@ static void uninit_location(void)
|
||||
|
||||
if (location_data && location_driver)
|
||||
{
|
||||
if (system->location_callback.deinitialized)
|
||||
system->location_callback.deinitialized();
|
||||
if (system->location_cb.deinitialized)
|
||||
system->location_cb.deinitialized();
|
||||
|
||||
if (location_driver->free)
|
||||
location_driver->free(location_data);
|
||||
|
@ -632,7 +632,7 @@ static void menu_action_setting_disp_set_label_menu_disk_index(
|
||||
if (!system)
|
||||
return;
|
||||
|
||||
control = &system->disk_control;
|
||||
control = &system->disk_control_cb;
|
||||
|
||||
if (!control)
|
||||
return;
|
||||
|
@ -2088,7 +2088,7 @@ static int menu_displaylist_parse_load_content_settings(
|
||||
menu_hash_to_str(MENU_LABEL_CORE_CHEAT_OPTIONS),
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
if ( (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
&& system && system->disk_control.get_num_images)
|
||||
&& system && system->disk_control_cb.get_num_images)
|
||||
menu_entries_push(info->list,
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_DISK_OPTIONS),
|
||||
menu_hash_to_str(MENU_LABEL_DISK_OPTIONS),
|
||||
|
4
system.h
4
system.h
@ -40,8 +40,8 @@ typedef struct rarch_system_info
|
||||
const char *input_desc_btn[MAX_USERS][RARCH_FIRST_META_KEY];
|
||||
char valid_extensions[PATH_MAX_LENGTH];
|
||||
|
||||
struct retro_disk_control_callback disk_control;
|
||||
struct retro_location_callback location_callback;
|
||||
struct retro_disk_control_callback disk_control_cb;
|
||||
struct retro_location_callback location_cb;
|
||||
|
||||
core_option_manager_t *core_options;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user