(menu_entries_cbs_right.c) Buildfixes
This commit is contained in:
parent
a311d6d423
commit
eb6875737d
|
@ -347,73 +347,10 @@ static int bind_right_generic(unsigned type, const char *label,
|
||||||
return menu_setting_set(type, label, MENU_ACTION_RIGHT, wraparound);
|
return menu_setting_set(type, label, MENU_ACTION_RIGHT, wraparound);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int menu_entries_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *cbs,
|
||||||
void menu_entries_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
|
unsigned type, uint32_t menu_label_hash)
|
||||||
const char *path, const char *label, unsigned type, size_t idx,
|
|
||||||
const char *elem0, const char *elem1, const char *menu_label,
|
|
||||||
uint32_t label_hash, uint32_t menu_label_hash)
|
|
||||||
{
|
{
|
||||||
int i;
|
if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
||||||
|
|
||||||
if (!cbs)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (label)
|
|
||||||
{
|
|
||||||
if (menu_entries_common_is_settings_entry(elem0))
|
|
||||||
{
|
|
||||||
cbs->action_right = action_right_scroll;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cbs->action_right = bind_right_generic;
|
|
||||||
|
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX:
|
|
||||||
cbs->action_right = disk_options_disk_idx_right;
|
|
||||||
break;
|
|
||||||
case MENU_FILE_PLAIN:
|
|
||||||
case MENU_FILE_DIRECTORY:
|
|
||||||
case MENU_FILE_CARCHIVE:
|
|
||||||
case MENU_FILE_CORE:
|
|
||||||
case MENU_FILE_RDB:
|
|
||||||
case MENU_FILE_RDB_ENTRY:
|
|
||||||
case MENU_FILE_CURSOR:
|
|
||||||
case MENU_FILE_SHADER:
|
|
||||||
case MENU_FILE_SHADER_PRESET:
|
|
||||||
case MENU_FILE_IMAGE:
|
|
||||||
case MENU_FILE_OVERLAY:
|
|
||||||
case MENU_FILE_VIDEOFILTER:
|
|
||||||
case MENU_FILE_AUDIOFILTER:
|
|
||||||
case MENU_FILE_CONFIG:
|
|
||||||
case MENU_FILE_USE_DIRECTORY:
|
|
||||||
case MENU_FILE_PLAYLIST_ENTRY:
|
|
||||||
case MENU_FILE_DOWNLOAD_CORE:
|
|
||||||
case MENU_FILE_CHEAT:
|
|
||||||
case MENU_FILE_REMAP:
|
|
||||||
case MENU_SETTING_GROUP:
|
|
||||||
switch (menu_label_hash)
|
|
||||||
{
|
|
||||||
case MENU_VALUE_HORIZONTAL_MENU:
|
|
||||||
case MENU_VALUE_MAIN_MENU:
|
|
||||||
cbs->action_right = action_right_mainmenu;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
cbs->action_right = action_right_scroll;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case MENU_SETTING_ACTION:
|
|
||||||
case MENU_FILE_CONTENTLIST_ENTRY:
|
|
||||||
cbs->action_right = action_right_mainmenu;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strstr(label, "rdb_entry"))
|
|
||||||
cbs->action_right = action_right_scroll;
|
|
||||||
|
|
||||||
else if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
|
||||||
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
||||||
cbs->action_right = shader_action_parameter_right;
|
cbs->action_right = shader_action_parameter_right;
|
||||||
else if (type >= MENU_SETTINGS_SHADER_PRESET_PARAMETER_0
|
else if (type >= MENU_SETTINGS_SHADER_PRESET_PARAMETER_0
|
||||||
|
@ -430,6 +367,60 @@ void menu_entries_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
|
||||||
else if ((type >= MENU_SETTINGS_CORE_OPTION_START))
|
else if ((type >= MENU_SETTINGS_CORE_OPTION_START))
|
||||||
cbs->action_right = core_setting_right;
|
cbs->action_right = core_setting_right;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX:
|
||||||
|
cbs->action_right = disk_options_disk_idx_right;
|
||||||
|
break;
|
||||||
|
case MENU_FILE_PLAIN:
|
||||||
|
case MENU_FILE_DIRECTORY:
|
||||||
|
case MENU_FILE_CARCHIVE:
|
||||||
|
case MENU_FILE_CORE:
|
||||||
|
case MENU_FILE_RDB:
|
||||||
|
case MENU_FILE_RDB_ENTRY:
|
||||||
|
case MENU_FILE_CURSOR:
|
||||||
|
case MENU_FILE_SHADER:
|
||||||
|
case MENU_FILE_SHADER_PRESET:
|
||||||
|
case MENU_FILE_IMAGE:
|
||||||
|
case MENU_FILE_OVERLAY:
|
||||||
|
case MENU_FILE_VIDEOFILTER:
|
||||||
|
case MENU_FILE_AUDIOFILTER:
|
||||||
|
case MENU_FILE_CONFIG:
|
||||||
|
case MENU_FILE_USE_DIRECTORY:
|
||||||
|
case MENU_FILE_PLAYLIST_ENTRY:
|
||||||
|
case MENU_FILE_DOWNLOAD_CORE:
|
||||||
|
case MENU_FILE_CHEAT:
|
||||||
|
case MENU_FILE_REMAP:
|
||||||
|
case MENU_SETTING_GROUP:
|
||||||
|
switch (menu_label_hash)
|
||||||
|
{
|
||||||
|
case MENU_VALUE_HORIZONTAL_MENU:
|
||||||
|
case MENU_VALUE_MAIN_MENU:
|
||||||
|
cbs->action_right = action_right_mainmenu;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
cbs->action_right = action_right_scroll;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case MENU_SETTING_ACTION:
|
||||||
|
case MENU_FILE_CONTENTLIST_ENTRY:
|
||||||
|
cbs->action_right = action_right_mainmenu;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int menu_entries_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
|
||||||
|
const char *label, uint32_t label_hash, uint32_t menu_label_hash)
|
||||||
|
{
|
||||||
|
if (strstr(label, "rdb_entry"))
|
||||||
|
cbs->action_right = action_right_scroll;
|
||||||
|
else
|
||||||
{
|
{
|
||||||
switch (label_hash)
|
switch (label_hash)
|
||||||
{
|
{
|
||||||
|
@ -452,9 +443,35 @@ void menu_entries_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
|
||||||
case MENU_LABEL_CHEAT_NUM_PASSES:
|
case MENU_LABEL_CHEAT_NUM_PASSES:
|
||||||
cbs->action_right = action_right_cheat_num_passes;
|
cbs->action_right = action_right_cheat_num_passes;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void menu_entries_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
|
||||||
|
const char *path, const char *label, unsigned type, size_t idx,
|
||||||
|
const char *elem0, const char *elem1, const char *menu_label,
|
||||||
|
uint32_t label_hash, uint32_t menu_label_hash)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (!cbs)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (label)
|
||||||
|
{
|
||||||
|
if (menu_entries_common_is_settings_entry(elem0))
|
||||||
|
{
|
||||||
|
cbs->action_right = action_right_scroll;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cbs->action_right = bind_right_generic;
|
||||||
|
|
||||||
for (i = 0; i < MAX_USERS; i++)
|
for (i = 0; i < MAX_USERS; i++)
|
||||||
{
|
{
|
||||||
char label_setting[PATH_MAX_LENGTH];
|
char label_setting[PATH_MAX_LENGTH];
|
||||||
|
@ -463,4 +480,9 @@ void menu_entries_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
|
||||||
if (!strcmp(label, label_setting))
|
if (!strcmp(label, label_setting))
|
||||||
cbs->action_right = bind_right_generic;
|
cbs->action_right = bind_right_generic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (menu_entries_cbs_init_bind_right_compare_label(cbs, label, label_hash, menu_label_hash) == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
menu_entries_cbs_init_bind_right_compare_type(cbs, type, menu_label_hash);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue