diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c index a7d9326c65..96b0f5bd0e 100644 --- a/menu/cbs/menu_cbs_right.c +++ b/menu/cbs/menu_cbs_right.c @@ -45,7 +45,7 @@ static void shader_action_parameter_right_common( } #endif -static int shader_action_parameter_right(unsigned type, const char *label, bool wraparound) +int shader_action_parameter_right(unsigned type, const char *label, bool wraparound) { #ifdef HAVE_SHADER_MANAGER struct video_shader *shader = video_shader_driver_get_current_shader(); @@ -57,7 +57,7 @@ static int shader_action_parameter_right(unsigned type, const char *label, bool return 0; } -static int shader_action_parameter_preset_right(unsigned type, const char *label, +int shader_action_parameter_preset_right(unsigned type, const char *label, bool wraparound) { #ifdef HAVE_SHADER_MANAGER diff --git a/menu/cbs/menu_cbs_select.c b/menu/cbs/menu_cbs_select.c index 05486a59d4..41f7f11bba 100644 --- a/menu/cbs/menu_cbs_select.c +++ b/menu/cbs/menu_cbs_select.c @@ -95,6 +95,26 @@ static int action_select_core_setting(const char *path, const char *label, unsig return core_setting_right(type, label, true); } +static int shader_action_parameter_select(const char *path, const char *label, unsigned type, + size_t idx) +{ +#ifdef HAVE_SHADER_MANAGER + return shader_action_parameter_right(type, label, true); +#else + return 0; +#endif +} + +static int shader_action_parameter_preset_select(const char *path, const char *label, unsigned type, + size_t idx) +{ +#ifdef HAVE_SHADER_MANAGER + return shader_action_parameter_preset_right(type, label, true); +#else + return 0; +#endif +} + static int action_select_cheat(const char *path, const char *label, unsigned type, size_t idx) { @@ -110,7 +130,13 @@ static int action_select_input_desc(const char *path, const char *label, unsigne static int menu_cbs_init_bind_select_compare_type( menu_file_list_cbs_t *cbs, unsigned type) { - if (type >= MENU_SETTINGS_CHEAT_BEGIN + if (type >= MENU_SETTINGS_SHADER_PARAMETER_0 + && type <= MENU_SETTINGS_SHADER_PARAMETER_LAST) + cbs->action_select = shader_action_parameter_select; + else if (type >= MENU_SETTINGS_SHADER_PRESET_PARAMETER_0 + && type <= MENU_SETTINGS_SHADER_PRESET_PARAMETER_LAST) + cbs->action_select = shader_action_parameter_preset_select; + else if (type >= MENU_SETTINGS_CHEAT_BEGIN && type <= MENU_SETTINGS_CHEAT_END) cbs->action_select = action_select_cheat; else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN diff --git a/menu/menu_cbs.h b/menu/menu_cbs.h index 076a943d3a..eeace61095 100644 --- a/menu/menu_cbs.h +++ b/menu/menu_cbs.h @@ -33,6 +33,11 @@ extern char core_updater_path[PATH_MAX_LENGTH]; /* Function callbacks */ +int shader_action_parameter_right(unsigned type, const char *label, bool wraparound); + +int shader_action_parameter_preset_right(unsigned type, const char *label, + bool wraparound); + int action_ok_push_generic_list(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx);