Replace more menu_hash_to_str usage

This commit is contained in:
twinaphex 2016-06-15 23:31:05 +02:00
parent c05742c1fc
commit 9aece7b695
5 changed files with 29 additions and 29 deletions

View File

@ -703,7 +703,7 @@ static int mui_get_core_title(char *s, size_t len)
} }
if (string_is_empty(core_name)) if (string_is_empty(core_name))
core_name = menu_hash_to_str(MENU_VALUE_NO_CORE); core_name = menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_NO_CORE);
if (!core_version) if (!core_version)
core_version = ""; core_version = "";
@ -1267,19 +1267,19 @@ static void mui_preswitch_tabs(mui_handle_t *mui, unsigned action)
{ {
case MUI_SYSTEM_TAB_MAIN: case MUI_SYSTEM_TAB_MAIN:
menu_stack->list[stack_size - 1].label = menu_stack->list[stack_size - 1].label =
strdup(menu_hash_to_str(MENU_VALUE_MAIN_MENU)); strdup(menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_MAIN_MENU));
menu_stack->list[stack_size - 1].type = menu_stack->list[stack_size - 1].type =
MENU_SETTINGS; MENU_SETTINGS;
break; break;
case MUI_SYSTEM_TAB_PLAYLISTS: case MUI_SYSTEM_TAB_PLAYLISTS:
menu_stack->list[stack_size - 1].label = menu_stack->list[stack_size - 1].label =
strdup(menu_hash_to_str(MENU_VALUE_PLAYLISTS_TAB)); strdup(menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB));
menu_stack->list[stack_size - 1].type = menu_stack->list[stack_size - 1].type =
MENU_PLAYLISTS_TAB; MENU_PLAYLISTS_TAB;
break; break;
case MUI_SYSTEM_TAB_SETTINGS: case MUI_SYSTEM_TAB_SETTINGS:
menu_stack->list[stack_size - 1].label = menu_stack->list[stack_size - 1].label =
strdup(menu_hash_to_str(MENU_VALUE_SETTINGS_TAB)); strdup(menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_SETTINGS_TAB));
menu_stack->list[stack_size - 1].type = menu_stack->list[stack_size - 1].type =
MENU_SETTINGS; MENU_SETTINGS;
break; break;
@ -1348,8 +1348,8 @@ static int mui_list_push(void *data, void *userdata,
case DISPLAYLIST_LOAD_CONTENT_LIST: case DISPLAYLIST_LOAD_CONTENT_LIST:
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list); menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
menu_entries_add_enum(info->list, menu_entries_add_enum(info->list,
menu_hash_to_str(MENU_LABEL_VALUE_LOAD_CONTENT), menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT),
menu_hash_to_str(MENU_LABEL_LOAD_CONTENT), menu_hash_to_str_enum(MENU_ENUM_LABEL_LOAD_CONTENT),
MENU_ENUM_LABEL_LOAD_CONTENT, MENU_ENUM_LABEL_LOAD_CONTENT,
MENU_SETTING_ACTION, 0, 0); MENU_SETTING_ACTION, 0, 0);
@ -1357,14 +1357,14 @@ static int mui_list_push(void *data, void *userdata,
if (core_info_list_num_info_files(list)) if (core_info_list_num_info_files(list))
{ {
menu_entries_add_enum(info->list, menu_entries_add_enum(info->list,
menu_hash_to_str(MENU_LABEL_VALUE_DETECT_CORE_LIST), menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST),
menu_hash_to_str(MENU_LABEL_DETECT_CORE_LIST), menu_hash_to_str_enum(MENU_ENUM_LABEL_DETECT_CORE_LIST),
MENU_ENUM_LABEL_DETECT_CORE_LIST, MENU_ENUM_LABEL_DETECT_CORE_LIST,
MENU_SETTING_ACTION, 0, 0); MENU_SETTING_ACTION, 0, 0);
menu_entries_add_enum(info->list, menu_entries_add_enum(info->list,
menu_hash_to_str(MENU_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST), menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST),
menu_hash_to_str(MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST), menu_hash_to_str_enum(MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST),
MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST, MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST,
MENU_SETTING_ACTION, 0, 0); MENU_SETTING_ACTION, 0, 0);
} }

View File

@ -545,7 +545,7 @@ static void rgui_render(void *data)
blit_line( blit_line(
RGUI_TERM_START_X(fb_width), RGUI_TERM_START_X(fb_width),
RGUI_TERM_START_X(fb_width), RGUI_TERM_START_X(fb_width),
menu_hash_to_str(MENU_VALUE_BACK), menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_BACK),
TITLE_COLOR(settings)); TITLE_COLOR(settings));
strlcpy(title_buf, string_to_upper(title_buf), sizeof(title_buf)); strlcpy(title_buf, string_to_upper(title_buf), sizeof(title_buf));

View File

@ -1129,7 +1129,7 @@ static bool zarch_menu_init_list(void *data)
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0); file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
strlcpy(info.label, strlcpy(info.label,
menu_hash_to_str(MENU_VALUE_HISTORY_TAB), sizeof(info.label)); menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_HISTORY_TAB), sizeof(info.label));
menu_entries_add(menu_stack, menu_entries_add(menu_stack,
info.path, info.label, info.type, info.flags, 0); info.path, info.label, info.type, info.flags, 0);

View File

@ -270,7 +270,7 @@ static void menu_displaylist_push_perfcounter(
if (!counters || num == 0) if (!counters || num == 0)
{ {
menu_entries_add(info->list, menu_entries_add(info->list,
menu_hash_to_str(MENU_LABEL_VALUE_NO_PERFORMANCE_COUNTERS), menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_NO_PERFORMANCE_COUNTERS),
"", 0, 0, 0); "", 0, 0, 0);
return; return;
} }
@ -293,15 +293,15 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info)
if (!core_info || !core_info->config_data) if (!core_info || !core_info->config_data)
{ {
menu_entries_add(info->list, menu_entries_add(info->list,
menu_hash_to_str( menu_hash_to_str_enum(
MENU_LABEL_VALUE_NO_CORE_INFORMATION_AVAILABLE), MENU_ENUM_LABEL_VALUE_NO_CORE_INFORMATION_AVAILABLE),
"", 0, 0, 0); "", 0, 0, 0);
return 0; return 0;
} }
strlcpy(tmp, strlcpy(tmp,
menu_hash_to_str( menu_hash_to_str_enum(
MENU_LABEL_VALUE_CORE_INFO_CORE_NAME), sizeof(tmp)); MENU_ENUM_LABEL_VALUE_CORE_INFO_CORE_NAME), sizeof(tmp));
strlcat(tmp, ": ", sizeof(tmp)); strlcat(tmp, ": ", sizeof(tmp));
if (core_info->core_name) if (core_info->core_name)
strlcat(tmp, core_info->core_name, sizeof(tmp)); strlcat(tmp, core_info->core_name, sizeof(tmp));
@ -310,7 +310,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info)
MENU_SETTINGS_CORE_INFO_NONE, 0, 0); MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
strlcpy(tmp, strlcpy(tmp,
menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_CORE_LABEL), sizeof(tmp)); menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_CORE_INFO_CORE_LABEL), sizeof(tmp));
strlcat(tmp, ": ", sizeof(tmp)); strlcat(tmp, ": ", sizeof(tmp));
if (core_info->display_name) if (core_info->display_name)
strlcat(tmp, core_info->display_name, sizeof(tmp)); strlcat(tmp, core_info->display_name, sizeof(tmp));
@ -320,8 +320,8 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info)
if (core_info->systemname) if (core_info->systemname)
{ {
strlcpy(tmp, strlcpy(tmp,
menu_hash_to_str( menu_hash_to_str_enum(
MENU_LABEL_VALUE_CORE_INFO_SYSTEM_NAME), MENU_ENUM_LABEL_VALUE_CORE_INFO_SYSTEM_NAME),
sizeof(tmp)); sizeof(tmp));
strlcat(tmp, ": ", sizeof(tmp)); strlcat(tmp, ": ", sizeof(tmp));
strlcat(tmp, core_info->systemname, sizeof(tmp)); strlcat(tmp, core_info->systemname, sizeof(tmp));
@ -332,7 +332,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info)
if (core_info->system_manufacturer) if (core_info->system_manufacturer)
{ {
strlcpy(tmp, strlcpy(tmp,
menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_SYSTEM_MANUFACTURER), menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_CORE_INFO_SYSTEM_MANUFACTURER),
sizeof(tmp)); sizeof(tmp));
strlcat(tmp, ": ", sizeof(tmp)); strlcat(tmp, ": ", sizeof(tmp));
strlcat(tmp, core_info->system_manufacturer, sizeof(tmp)); strlcat(tmp, core_info->system_manufacturer, sizeof(tmp));
@ -342,7 +342,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info)
if (core_info->categories_list) if (core_info->categories_list)
{ {
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_CATEGORIES), strlcpy(tmp, menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_CORE_INFO_CATEGORIES),
sizeof(tmp)); sizeof(tmp));
strlcat(tmp, ": ", sizeof(tmp)); strlcat(tmp, ": ", sizeof(tmp));
string_list_join_concat(tmp, sizeof(tmp), string_list_join_concat(tmp, sizeof(tmp),
@ -353,7 +353,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info)
if (core_info->authors_list) if (core_info->authors_list)
{ {
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_AUTHORS), strlcpy(tmp, menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_CORE_INFO_AUTHORS),
sizeof(tmp)); sizeof(tmp));
strlcat(tmp, ": ", sizeof(tmp)); strlcat(tmp, ": ", sizeof(tmp));
string_list_join_concat(tmp, sizeof(tmp), string_list_join_concat(tmp, sizeof(tmp),
@ -364,7 +364,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info)
if (core_info->permissions_list) if (core_info->permissions_list)
{ {
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_PERMISSIONS), strlcpy(tmp, menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_CORE_INFO_PERMISSIONS),
sizeof(tmp)); sizeof(tmp));
strlcat(tmp, ": ", sizeof(tmp)); strlcat(tmp, ": ", sizeof(tmp));
string_list_join_concat(tmp, sizeof(tmp), string_list_join_concat(tmp, sizeof(tmp),
@ -375,7 +375,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info)
if (core_info->licenses_list) if (core_info->licenses_list)
{ {
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_LICENSES), strlcpy(tmp, menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_CORE_INFO_LICENSES),
sizeof(tmp)); sizeof(tmp));
strlcat(tmp, ": ", sizeof(tmp)); strlcat(tmp, ": ", sizeof(tmp));
string_list_join_concat(tmp, sizeof(tmp), string_list_join_concat(tmp, sizeof(tmp),
@ -387,7 +387,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info)
if (core_info->supported_extensions_list) if (core_info->supported_extensions_list)
{ {
strlcpy(tmp, strlcpy(tmp,
menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_SUPPORTED_EXTENSIONS), menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_CORE_INFO_SUPPORTED_EXTENSIONS),
sizeof(tmp)); sizeof(tmp));
strlcat(tmp, ": ", sizeof(tmp)); strlcat(tmp, ": ", sizeof(tmp));
string_list_join_concat(tmp, sizeof(tmp), string_list_join_concat(tmp, sizeof(tmp),

View File

@ -559,7 +559,7 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
case ID_M_LOAD_CORE: case ID_M_LOAD_CORE:
extensions = "Libretro core (.dll)\0*.dll\0\All Files\0*.*\0"; extensions = "Libretro core (.dll)\0*.dll\0\All Files\0*.*\0";
#ifdef HAVE_MENU #ifdef HAVE_MENU
title = menu_hash_to_str(MENU_LABEL_VALUE_CORE_LIST); title = menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_CORE_LIST);
#else #else
title = "Load Core"; title = "Load Core";
#endif #endif
@ -568,8 +568,8 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
case ID_M_LOAD_CONTENT: case ID_M_LOAD_CONTENT:
extensions = "All Files\0*.*\0\0"; extensions = "All Files\0*.*\0\0";
#ifdef HAVE_MENU #ifdef HAVE_MENU
title = menu_hash_to_str( title = menu_hash_to_str_enum(
MENU_LABEL_VALUE_LOAD_CONTENT_LIST); MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST);
#else #else
title = "Load Content"; title = "Load Content";
#endif #endif