mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Change menu_common_core_setting_toggle to be bindable to cbs->action_toggle
This commit is contained in:
parent
e71486a9bf
commit
896bff00cc
@ -254,9 +254,7 @@ static int menu_setting_toggle_pressed(unsigned type,
|
||||
if (cbs && cbs->action_toggle)
|
||||
return cbs->action_toggle(type, label, action);
|
||||
|
||||
if ((type >= MENU_SETTINGS_CORE_OPTION_START))
|
||||
return menu_common_core_setting_toggle(type, action);
|
||||
else if (type >= MENU_SETTINGS_PERF_COUNTERS_BEGIN &&
|
||||
if (type >= MENU_SETTINGS_PERF_COUNTERS_BEGIN &&
|
||||
type <= MENU_SETTINGS_PERF_COUNTERS_END)
|
||||
{
|
||||
counters = (struct retro_perf_counter**)perf_counters_rarch;
|
||||
|
@ -501,9 +501,12 @@ unsigned menu_common_type_is(const char *label, unsigned type)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int menu_common_core_setting_toggle(unsigned setting, unsigned action)
|
||||
int menu_common_core_setting_toggle(unsigned type, const char *label,
|
||||
unsigned action)
|
||||
{
|
||||
unsigned index = setting - MENU_SETTINGS_CORE_OPTION_START;
|
||||
unsigned index = type - MENU_SETTINGS_CORE_OPTION_START;
|
||||
|
||||
(void)label;
|
||||
|
||||
switch (action)
|
||||
{
|
||||
|
@ -155,7 +155,8 @@ void menu_update_system_info(menu_handle_t *menu, bool *load_no_content);
|
||||
|
||||
unsigned menu_common_type_is(const char *label, unsigned type);
|
||||
|
||||
int menu_common_core_setting_toggle(unsigned setting, unsigned action);
|
||||
int menu_common_core_setting_toggle(unsigned type, const char *label,
|
||||
unsigned action);
|
||||
|
||||
int menu_common_setting_set_perf(unsigned setting, unsigned action,
|
||||
struct retro_perf_counter **counters, unsigned offset);
|
||||
|
@ -734,6 +734,8 @@ static void menu_entries_cbs_init_bind_toggle(menu_file_list_cbs_t *cbs,
|
||||
!strcmp(label, "video_shader_preset_parameters")
|
||||
)
|
||||
cbs->action_toggle = menu_shader_manager_setting_toggle;
|
||||
else if ((type >= MENU_SETTINGS_CORE_OPTION_START))
|
||||
cbs->action_toggle = menu_common_core_setting_toggle;
|
||||
}
|
||||
|
||||
void menu_entries_cbs_init(void *data,
|
||||
|
Loading…
x
Reference in New Issue
Block a user