mirror of
https://github.com/libretro/RetroArch
synced 2025-04-11 00:44:20 +00:00
Move core_setting_toggle to menu_entries_cbs.c as static function
This commit is contained in:
parent
896bff00cc
commit
528cb1dd60
@ -501,35 +501,6 @@ unsigned menu_common_type_is(const char *label, unsigned type)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int menu_common_core_setting_toggle(unsigned type, const char *label,
|
|
||||||
unsigned action)
|
|
||||||
{
|
|
||||||
unsigned index = type - MENU_SETTINGS_CORE_OPTION_START;
|
|
||||||
|
|
||||||
(void)label;
|
|
||||||
|
|
||||||
switch (action)
|
|
||||||
{
|
|
||||||
case MENU_ACTION_LEFT:
|
|
||||||
core_option_prev(g_extern.system.core_options, index);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MENU_ACTION_RIGHT:
|
|
||||||
case MENU_ACTION_OK:
|
|
||||||
core_option_next(g_extern.system.core_options, index);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MENU_ACTION_START:
|
|
||||||
core_option_set_default(g_extern.system.core_options, index);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int menu_common_setting_set_perf(unsigned setting, unsigned action,
|
int menu_common_setting_set_perf(unsigned setting, unsigned action,
|
||||||
struct retro_perf_counter **counters, unsigned offset)
|
struct retro_perf_counter **counters, unsigned offset)
|
||||||
{
|
{
|
||||||
|
@ -155,9 +155,6 @@ void menu_update_system_info(menu_handle_t *menu, bool *load_no_content);
|
|||||||
|
|
||||||
unsigned menu_common_type_is(const char *label, unsigned type);
|
unsigned menu_common_type_is(const char *label, unsigned type);
|
||||||
|
|
||||||
int menu_common_core_setting_toggle(unsigned type, const char *label,
|
|
||||||
unsigned action);
|
|
||||||
|
|
||||||
int menu_common_setting_set_perf(unsigned setting, unsigned action,
|
int menu_common_setting_set_perf(unsigned setting, unsigned action,
|
||||||
struct retro_perf_counter **counters, unsigned offset);
|
struct retro_perf_counter **counters, unsigned offset);
|
||||||
|
|
||||||
|
@ -587,6 +587,35 @@ static int action_ok_help(const char *path,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int core_setting_toggle(unsigned type, const char *label,
|
||||||
|
unsigned action)
|
||||||
|
{
|
||||||
|
unsigned index = type - MENU_SETTINGS_CORE_OPTION_START;
|
||||||
|
|
||||||
|
(void)label;
|
||||||
|
|
||||||
|
switch (action)
|
||||||
|
{
|
||||||
|
case MENU_ACTION_LEFT:
|
||||||
|
core_option_prev(g_extern.system.core_options, index);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MENU_ACTION_RIGHT:
|
||||||
|
case MENU_ACTION_OK:
|
||||||
|
core_option_next(g_extern.system.core_options, index);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MENU_ACTION_START:
|
||||||
|
core_option_set_default(g_extern.system.core_options, index);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Bind the OK callback function */
|
/* Bind the OK callback function */
|
||||||
|
|
||||||
static int menu_entries_cbs_init_bind_ok_first(menu_file_list_cbs_t *cbs,
|
static int menu_entries_cbs_init_bind_ok_first(menu_file_list_cbs_t *cbs,
|
||||||
@ -735,7 +764,7 @@ static void menu_entries_cbs_init_bind_toggle(menu_file_list_cbs_t *cbs,
|
|||||||
)
|
)
|
||||||
cbs->action_toggle = menu_shader_manager_setting_toggle;
|
cbs->action_toggle = menu_shader_manager_setting_toggle;
|
||||||
else if ((type >= MENU_SETTINGS_CORE_OPTION_START))
|
else if ((type >= MENU_SETTINGS_CORE_OPTION_START))
|
||||||
cbs->action_toggle = menu_common_core_setting_toggle;
|
cbs->action_toggle = core_setting_toggle;
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_entries_cbs_init(void *data,
|
void menu_entries_cbs_init(void *data,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user