Standardize function signature for action_select

This commit is contained in:
twinaphex 2019-12-21 06:01:38 +01:00
parent 7c028596fb
commit 48799b73d5
3 changed files with 11 additions and 11 deletions

View File

@ -37,7 +37,7 @@
#endif #endif
static int action_select_default(const char *path, const char *label, unsigned type, static int action_select_default(const char *path, const char *label, unsigned type,
size_t idx) size_t idx, size_t entry_idx)
{ {
menu_entry_t entry; menu_entry_t entry;
int ret = 0; int ret = 0;
@ -111,46 +111,46 @@ static int action_select_default(const char *path, const char *label, unsigned t
} }
static int action_select_path_use_directory(const char *path, static int action_select_path_use_directory(const char *path,
const char *label, unsigned type, size_t idx) const char *label, unsigned type, size_t idx, size_t entry_idx)
{ {
return action_ok_path_use_directory(path, label, type, idx, 0 /* unused */); return action_ok_path_use_directory(path, label, type, idx, 0 /* unused */);
} }
static int action_select_core_setting(const char *path, const char *label, unsigned type, static int action_select_core_setting(const char *path, const char *label, unsigned type,
size_t idx) size_t idx, size_t entry_idx)
{ {
return action_ok_core_option_dropdown_list(path, label, type, idx, 0); return action_ok_core_option_dropdown_list(path, label, type, idx, 0);
} }
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL) #if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
static int shader_action_parameter_select(const char *path, const char *label, unsigned type, static int shader_action_parameter_select(const char *path, const char *label, unsigned type,
size_t idx) size_t idx, size_t entry_idx)
{ {
return shader_action_parameter_right(type, label, true); return shader_action_parameter_right(type, label, true);
} }
static int shader_action_parameter_preset_select(const char *path, const char *label, unsigned type, static int shader_action_parameter_preset_select(const char *path, const char *label, unsigned type,
size_t idx) size_t idx, size_t entry_idx)
{ {
return shader_action_parameter_right(type, label, true); return shader_action_parameter_right(type, label, true);
} }
#endif #endif
static int action_select_cheat(const char *path, const char *label, unsigned type, static int action_select_cheat(const char *path, const char *label, unsigned type,
size_t idx) size_t idx, size_t entry_idx)
{ {
return action_right_cheat(type, label, true); return action_right_cheat(type, label, true);
} }
static int action_select_input_desc(const char *path, const char *label, unsigned type, static int action_select_input_desc(const char *path, const char *label, unsigned type,
size_t idx) size_t idx, size_t entry_idx)
{ {
return action_right_input_desc(type, label, true); return action_right_input_desc(type, label, true);
} }
static int action_select_input_desc_kbd(const char *path, static int action_select_input_desc_kbd(const char *path,
const char *label, unsigned type, const char *label, unsigned type,
size_t idx) size_t idx, size_t entry_idx)
{ {
return action_right_input_desc_kbd(type, label, true); return action_right_input_desc_kbd(type, label, true);
} }
@ -158,7 +158,7 @@ static int action_select_input_desc_kbd(const char *path,
#ifdef HAVE_NETWORKING #ifdef HAVE_NETWORKING
static int action_select_netplay_connect_room(const char *path, static int action_select_netplay_connect_room(const char *path,
const char *label, unsigned type, const char *label, unsigned type,
size_t idx) size_t idx, size_t entry_idx)
{ {
char tmp_hostname[4115]; char tmp_hostname[4115];

View File

@ -385,7 +385,7 @@ int generic_menu_entry_action(
case MENU_ACTION_SELECT: case MENU_ACTION_SELECT:
if (cbs && cbs->action_select) if (cbs && cbs->action_select)
ret = cbs->action_select(entry->path, ret = cbs->action_select(entry->path,
entry->label, entry->type, i); entry->label, entry->type, i, entry->entry_idx);
break; break;
case MENU_ACTION_SEARCH: case MENU_ACTION_SEARCH:
menu_input_dialog_start_search(); menu_input_dialog_start_search();

View File

@ -107,7 +107,7 @@ typedef struct menu_file_list_cbs
int (*action_iterate)(const char *label, unsigned action); int (*action_iterate)(const char *label, unsigned action);
int (*action_deferred_push)(menu_displaylist_info_t *info); int (*action_deferred_push)(menu_displaylist_info_t *info);
int (*action_select)(const char *path, const char *label, unsigned type, int (*action_select)(const char *path, const char *label, unsigned type,
size_t idx); size_t idx, size_t entry_idx);
int (*action_get_title)(const char *path, const char *label, int (*action_get_title)(const char *path, const char *label,
unsigned type, char *s, size_t len); unsigned type, char *s, size_t len);
int (*action_ok)(const char *path, const char *label, unsigned type, int (*action_ok)(const char *path, const char *label, unsigned type,