diff --git a/menu/menu_entries_cbs.h b/menu/menu_entries_cbs.h index 91652af810..f5a7c82bd7 100644 --- a/menu/menu_entries_cbs.h +++ b/menu/menu_entries_cbs.h @@ -35,6 +35,12 @@ extern char core_updater_path[PATH_MAX_LENGTH]; int core_setting_right(unsigned type, const char *label, bool wraparound); + +int action_right_input_desc(unsigned type, const char *label, + bool wraparound); + +int action_right_cheat(unsigned type, const char *label, + bool wraparound); /* End of function callbacks */ void menu_entries_common_load_content(bool persist); diff --git a/menu/menu_entries_cbs_right.c b/menu/menu_entries_cbs_right.c index ea4b073562..8a1e1861d0 100644 --- a/menu/menu_entries_cbs_right.c +++ b/menu/menu_entries_cbs_right.c @@ -66,7 +66,7 @@ static int shader_action_parameter_preset_right(unsigned type, const char *label return 0; } -static int action_right_cheat(unsigned type, const char *label, +int action_right_cheat(unsigned type, const char *label, bool wraparound) { global_t *global = global_get_ptr(); @@ -82,7 +82,7 @@ static int action_right_cheat(unsigned type, const char *label, return 0; } -static int action_right_input_desc(unsigned type, const char *label, +int action_right_input_desc(unsigned type, const char *label, bool wraparound) { unsigned inp_desc_index_offset = type - MENU_SETTINGS_INPUT_DESC_BEGIN; diff --git a/menu/menu_entries_cbs_select.c b/menu/menu_entries_cbs_select.c index 976814e8fa..a0a4b6e603 100644 --- a/menu/menu_entries_cbs_select.c +++ b/menu/menu_entries_cbs_select.c @@ -63,6 +63,18 @@ static int action_select_core_setting(const char *path, const char *label, unsig return core_setting_right(type, label, true); } +static int action_select_cheat(const char *path, const char *label, unsigned type, + size_t idx) +{ + return action_right_cheat(type, label, true); +} + +static int action_select_input_desc(const char *path, const char *label, unsigned type, + size_t idx) +{ + return action_right_input_desc(type, label, true); +} + void menu_entries_cbs_init_bind_select(menu_file_list_cbs_t *cbs, const char *path, const char *label, unsigned type, size_t idx, const char *elem0, const char *elem1, @@ -73,7 +85,13 @@ void menu_entries_cbs_init_bind_select(menu_file_list_cbs_t *cbs, cbs->action_select = action_select_default; - if ((type >= MENU_SETTINGS_CORE_OPTION_START)) + 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 + && type <= MENU_SETTINGS_INPUT_DESC_END) + cbs->action_select = action_select_input_desc; + else if ((type >= MENU_SETTINGS_CORE_OPTION_START)) cbs->action_select = action_select_core_setting; else {