Revert "menu_cbs_get_value - get rid of hashes"

This reverts commit 9d55e3dc84.
This commit is contained in:
twinaphex 2016-07-10 04:08:11 +02:00
parent 9d55e3dc84
commit ad36b8ba76
3 changed files with 98 additions and 5 deletions

View File

@ -1425,7 +1425,7 @@ static void menu_action_setting_disp_set_label(file_list_t* list,
}
static int menu_cbs_init_bind_get_string_representation_compare_label(
menu_file_list_cbs_t *cbs)
menu_file_list_cbs_t *cbs, uint32_t label_hash)
{
if (cbs->enum_idx != MSG_UNKNOWN)
{
@ -1541,6 +1541,97 @@ static int menu_cbs_init_bind_get_string_representation_compare_label(
return - 1;
}
}
else
{
switch (label_hash)
{
case MENU_LABEL_XMB_THEME:
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_xmb_theme);
break;
case MENU_LABEL_XMB_GRADIENT:
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_xmb_menu_color_theme);
break;
case MENU_LABEL_THUMBNAILS:
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_thumbnails);
break;
case MENU_LABEL_REMAP_FILE_LOAD:
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_remap_file_load);
break;
case MENU_LABEL_VIDEO_SHADER_FILTER_PASS:
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_shader_filter_pass);
break;
case MENU_LABEL_VIDEO_SHADER_SCALE_PASS:
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_shader_scale_pass);
break;
case MENU_LABEL_VIDEO_SHADER_NUM_PASSES:
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_shader_num_passes);
break;
case MENU_LABEL_XMB_RIBBON_ENABLE:
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_pipeline);
break;
case MENU_LABEL_VIDEO_SHADER_PASS:
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_shader_pass);
break;
case MENU_LABEL_VIDEO_SHADER_DEFAULT_FILTER:
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_shader_default_filter);
break;
case MENU_LABEL_VIDEO_FILTER:
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_filter);
break;
case MENU_LABEL_CONFIGURATIONS:
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_configurations);
break;
case MENU_LABEL_SCREEN_RESOLUTION:
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_menu_video_resolution);
break;
case MENU_LABEL_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE:
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_menu_input_keyboard_gamepad_mapping_type);
break;
case MENU_LABEL_CONTENT_COLLECTION_LIST:
case MENU_LABEL_LOAD_CONTENT_HISTORY:
case MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST:
case MENU_LABEL_DETECT_CORE_LIST:
case MENU_LABEL_LOAD_CONTENT:
case MENU_LABEL_CORE_OPTIONS:
case MENU_LABEL_CORE_CHEAT_OPTIONS:
case MENU_LABEL_SHADER_OPTIONS:
case MENU_LABEL_VIDEO_SHADER_PARAMETERS:
case MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS:
case MENU_LABEL_VIDEO_SHADER_PRESET_SAVE_AS:
case MENU_LABEL_CHEAT_FILE_SAVE_AS:
case MENU_LABEL_FRONTEND_COUNTERS:
case MENU_LABEL_CORE_COUNTERS:
case MENU_LABEL_DATABASE_MANAGER_LIST:
case MENU_LABEL_CURSOR_MANAGER_LIST:
case MENU_LABEL_CLOSE_CONTENT:
case MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS:
case MENU_LABEL_CORE_INFORMATION:
case MENU_LABEL_SYSTEM_INFORMATION:
case MENU_LABEL_DEBUG_INFORMATION:
case MENU_LABEL_ACHIEVEMENT_LIST:
case MENU_LABEL_SAVE_STATE:
case MENU_LABEL_LOAD_STATE:
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_menu_more);
break;
default:
return - 1;
}
}
return 0;
}
@ -1685,7 +1776,8 @@ static int menu_cbs_init_bind_get_string_representation_compare_type(
}
int menu_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx)
const char *path, const char *label, unsigned type, size_t idx,
uint32_t label_hash)
{
if (!cbs)
return -1;
@ -1751,7 +1843,7 @@ int menu_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs,
return 0;
}
if (menu_cbs_init_bind_get_string_representation_compare_label(cbs) == 0)
if (menu_cbs_init_bind_get_string_representation_compare_label(cbs, label_hash) == 0)
return 0;
if (menu_cbs_init_bind_get_string_representation_compare_type(cbs, type) == 0)

View File

@ -118,7 +118,7 @@ void menu_cbs_init(void *data,
menu_cbs_init_log(repr_label, "REFRESH", cbs->action_refresh_ident);
menu_cbs_init_bind_get_string_representation(cbs, path, label, type, idx);
menu_cbs_init_bind_get_string_representation(cbs, path, label, type, idx, label_hash);
menu_cbs_init_log(repr_label, "GET VALUE", cbs->action_get_value_ident);

View File

@ -146,7 +146,8 @@ int menu_cbs_init_bind_refresh(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx);
int menu_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx);
const char *path, const char *label, unsigned type, size_t idx,
uint32_t label_hash);
int menu_cbs_init_bind_label(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx);