Rename callbacks

This commit is contained in:
twinaphex 2016-03-04 20:00:49 +01:00
parent acdf0eb74e
commit c717ebdfda
6 changed files with 19 additions and 19 deletions

View File

@ -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); runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info);
if (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) if (!control || !control->get_num_images)
return; return;
@ -131,7 +131,7 @@ static void event_disk_control_set_index(unsigned idx)
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info); runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info);
if (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) if (!control || !control->get_num_images)
return; return;
@ -189,7 +189,7 @@ static bool event_disk_control_append_image(const char *path)
if (sysinfo) if (sysinfo)
control = (const struct retro_disk_control_callback*) control = (const struct retro_disk_control_callback*)
&sysinfo->disk_control; &sysinfo->disk_control_cb;
if (!control) if (!control)
return false; return false;
@ -1559,11 +1559,11 @@ bool event_cmd_ctl(enum event_command cmd, void *data)
return event_disk_control_append_image(path); return event_disk_control_append_image(path);
} }
case EVENT_CMD_DISK_EJECT_TOGGLE: 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 *control =
(const struct retro_disk_control_callback*) (const struct retro_disk_control_callback*)
&info->disk_control; &info->disk_control_cb;
if (control) if (control)
{ {
@ -1577,11 +1577,11 @@ bool event_cmd_ctl(enum event_command cmd, void *data)
1, 120, true); 1, 120, true);
break; break;
case EVENT_CMD_DISK_NEXT: 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 *control =
(const struct retro_disk_control_callback*) (const struct retro_disk_control_callback*)
&info->disk_control; &info->disk_control_cb;
if (!control) if (!control)
return false; return false;
@ -1597,11 +1597,11 @@ bool event_cmd_ctl(enum event_command cmd, void *data)
1, 120, true); 1, 120, true);
break; break;
case EVENT_CMD_DISK_PREV: 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 *control =
(const struct retro_disk_control_callback*) (const struct retro_disk_control_callback*)
&info->disk_control; &info->disk_control_cb;
if (!control) if (!control)
return false; return false;

View File

@ -860,7 +860,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
case RETRO_ENVIRONMENT_SET_DISK_CONTROL_INTERFACE: case RETRO_ENVIRONMENT_SET_DISK_CONTROL_INTERFACE:
RARCH_LOG("Environ SET_DISK_CONTROL_INTERFACE.\n"); RARCH_LOG("Environ SET_DISK_CONTROL_INTERFACE.\n");
system->disk_control = system->disk_control_cb =
*(const struct retro_disk_control_callback*)data; *(const struct retro_disk_control_callback*)data;
break; break;
@ -1062,7 +1062,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
cb->stop = driver_location_stop; cb->stop = driver_location_stop;
cb->get_position = driver_location_get_position; cb->get_position = driver_location_get_position;
cb->set_interval = driver_location_set_interval; cb->set_interval = driver_location_set_interval;
system->location_callback = *cb; system->location_cb = *cb;
location_driver_ctl(RARCH_LOCATION_CTL_UNSET_ACTIVE, NULL); location_driver_ctl(RARCH_LOCATION_CTL_UNSET_ACTIVE, NULL);
break; break;

View File

@ -217,8 +217,8 @@ void init_location(void)
location_driver_ctl(RARCH_LOCATION_CTL_UNSET_ACTIVE, NULL); location_driver_ctl(RARCH_LOCATION_CTL_UNSET_ACTIVE, NULL);
} }
if (system->location_callback.initialized) if (system->location_cb.initialized)
system->location_callback.initialized(); system->location_cb.initialized();
} }
static void uninit_location(void) static void uninit_location(void)
@ -229,8 +229,8 @@ static void uninit_location(void)
if (location_data && location_driver) if (location_data && location_driver)
{ {
if (system->location_callback.deinitialized) if (system->location_cb.deinitialized)
system->location_callback.deinitialized(); system->location_cb.deinitialized();
if (location_driver->free) if (location_driver->free)
location_driver->free(location_data); location_driver->free(location_data);

View File

@ -632,7 +632,7 @@ static void menu_action_setting_disp_set_label_menu_disk_index(
if (!system) if (!system)
return; return;
control = &system->disk_control; control = &system->disk_control_cb;
if (!control) if (!control)
return; return;

View File

@ -2088,7 +2088,7 @@ static int menu_displaylist_parse_load_content_settings(
menu_hash_to_str(MENU_LABEL_CORE_CHEAT_OPTIONS), menu_hash_to_str(MENU_LABEL_CORE_CHEAT_OPTIONS),
MENU_SETTING_ACTION, 0, 0); MENU_SETTING_ACTION, 0, 0);
if ( (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) 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_entries_push(info->list,
menu_hash_to_str(MENU_LABEL_VALUE_DISK_OPTIONS), menu_hash_to_str(MENU_LABEL_VALUE_DISK_OPTIONS),
menu_hash_to_str(MENU_LABEL_DISK_OPTIONS), menu_hash_to_str(MENU_LABEL_DISK_OPTIONS),

View File

@ -40,8 +40,8 @@ typedef struct rarch_system_info
const char *input_desc_btn[MAX_USERS][RARCH_FIRST_META_KEY]; const char *input_desc_btn[MAX_USERS][RARCH_FIRST_META_KEY];
char valid_extensions[PATH_MAX_LENGTH]; char valid_extensions[PATH_MAX_LENGTH];
struct retro_disk_control_callback disk_control; struct retro_disk_control_callback disk_control_cb;
struct retro_location_callback location_callback; struct retro_location_callback location_cb;
core_option_manager_t *core_options; core_option_manager_t *core_options;