diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index fac00a133d..d34553eb28 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -111,8 +111,8 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) if (!core_info || !core_info->data) { menu_list_push(info->list, - "No information available.", "", - 0, 0, 0); + menu_hash_to_str(MENU_LABEL_VALUE_NO_CORE_INFORMATION_AVAILABLE), + "", 0, 0, 0); return 0; } @@ -1371,11 +1371,11 @@ static int menu_displaylist_parse_horizontal_content_actions(menu_displaylist_in if (global->main_is_init && !global->libretro_dummy && !strcmp(menu->deferred_path, global->fullpath)) { - menu_list_push(info->list, "Resume", "file_load_or_resume", MENU_SETTING_ACTION_RUN, 0, 0); - menu_list_push(info->list, "Save State", "savestate", MENU_SETTING_ACTION_SAVESTATE, 0, 0); - menu_list_push(info->list, "Load State", "loadstate", MENU_SETTING_ACTION_LOADSTATE, 0, 0); - menu_list_push(info->list, "Core Information", "core_information", MENU_SETTING_ACTION_CORE_INFORMATION, 0, 0); - menu_list_push(info->list, "Options", "options", MENU_SETTING_ACTION_CORE_OPTIONS, 0, 0); + menu_list_push(info->list, menu_hash_to_str(MENU_LABEL_RESUME_CONTENT), "file_load_or_resume", MENU_SETTING_ACTION_RUN, 0, 0); + menu_list_push(info->list, menu_hash_to_str(MENU_LABEL_SAVE_STATE), "savestate", MENU_SETTING_ACTION_SAVESTATE, 0, 0); + menu_list_push(info->list, menu_hash_to_str(MENU_LABEL_LOAD_STATE), "loadstate", MENU_SETTING_ACTION_LOADSTATE, 0, 0); + menu_list_push(info->list, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFORMATION), "core_information", MENU_SETTING_ACTION_CORE_INFORMATION, 0, 0); + menu_list_push(info->list, menu_hash_to_str(MENU_LABEL_VALUE_OPTIONS), "options", MENU_SETTING_ACTION_CORE_OPTIONS, 0, 0); menu_list_push(info->list, "Take Screenshot", "take_screenshot", MENU_SETTING_ACTION_SCREENSHOT, 0, 0); menu_list_push(info->list, "Reset", "restart_content", MENU_SETTING_ACTION_RESET, 0, 0); } @@ -1425,9 +1425,9 @@ static int menu_displaylist_parse_options_cheats(menu_displaylist_info_t *info) static int menu_displaylist_parse_options_management(menu_displaylist_info_t *info) { #ifdef HAVE_LIBRETRODB - menu_list_push(info->list, "Database Manager", "database_manager_list", + menu_list_push(info->list, menu_hash_to_str(MENU_LABEL_VALUE_DATABASE_MANAGER), "database_manager_list", MENU_SETTING_ACTION, 0, 0); - menu_list_push(info->list, "Cursor Manager", "cursor_manager_list", + menu_list_push(info->list, menu_hash_to_str(MENU_LABEL_VALUE_CURSOR_MANAGER), "cursor_manager_list", MENU_SETTING_ACTION, 0, 0); #endif return 0; @@ -1787,7 +1787,8 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) (type == DISPLAYLIST_PERFCOUNTERS_CORE) ? perf_ptr_libretro : perf_ptr_rarch , (type == DISPLAYLIST_PERFCOUNTERS_CORE) ? - MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN : MENU_SETTINGS_PERF_COUNTERS_BEGIN); + MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN : + MENU_SETTINGS_PERF_COUNTERS_BEGIN); ret = 0; need_refresh = false; @@ -1801,7 +1802,8 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) break; case DISPLAYLIST_DATABASE_QUERY: menu_list_clear(info->list); - ret = menu_database_parse_query(info->list, info->path, (info->path_c[0] == '\0') ? NULL : info->path_c); + ret = menu_database_parse_query(info->list, + info->path, (info->path_c[0] == '\0') ? NULL : info->path_c); strlcpy(info->path, info->path_b, sizeof(info->path)); need_sort = true; @@ -1825,9 +1827,11 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) break; case DISPLAYLIST_PERFCOUNTER_SELECTION: menu_list_clear(info->list); - menu_list_push(info->list, "Frontend Counters", "frontend_counters", + menu_list_push(info->list, + menu_hash_to_str(MENU_LABEL_VALUE_FRONTEND_COUNTERS), "frontend_counters", MENU_SETTING_ACTION, 0, 0); - menu_list_push(info->list, "Core Counters", "core_counters", + menu_list_push(info->list, + menu_hash_to_str(MENU_LABEL_VALUE_CORE_COUNTERS), "core_counters", MENU_SETTING_ACTION, 0, 0); need_refresh = true; @@ -1931,11 +1935,14 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) break; case DISPLAYLIST_OPTIONS_DISK: menu_list_clear(info->list); - menu_list_push(info->list, "Disk Index", "disk_idx", + menu_list_push(info->list, + menu_hash_to_str(MENU_LABEL_VALUE_DISK_INDEX), "disk_idx", MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX, 0, 0); - menu_list_push(info->list, "Disk Cycle Tray Status", "disk_cycle_tray_status", + menu_list_push(info->list, + menu_hash_to_str(MENU_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS), "disk_cycle_tray_status", MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_CYCLE_TRAY_STATUS, 0, 0); - menu_list_push(info->list, "Disk Image Append", "disk_image_append", + menu_list_push(info->list, + menu_hash_to_str(MENU_LABEL_VALUE_DISK_IMAGE_APPEND), "disk_image_append", MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_IMAGE_APPEND, 0, 0); need_push = true; @@ -1960,7 +1967,8 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) if (list_size <= 0) { menu_list_push(info->list, - "No cores available.", "", + menu_hash_to_str(MENU_LABEL_VALUE_NO_CORES_AVAILABLE), + "", 0, 0, 0); return 0; } @@ -1995,7 +2003,8 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) MENU_SETTINGS_CORE_OPTION_START + i, 0, 0); } else - menu_list_push(info->list, "No core options available.", "", + menu_list_push(info->list, + menu_hash_to_str(MENU_LABEL_VALUE_NO_CORE_OPTIONS_AVAILABLE), "", MENU_SETTINGS_CORE_OPTION_NONE, 0, 0); need_push = true; break; diff --git a/menu/menu_hash.c b/menu/menu_hash.c index 7c6ccb5773..a5a7609566 100644 --- a/menu/menu_hash.c +++ b/menu/menu_hash.c @@ -23,6 +23,34 @@ const char *menu_hash_to_str(uint32_t hash) { switch (hash) { + case MENU_LABEL_VALUE_OPTIONS: + return "Options"; + case MENU_LABEL_VALUE_RESUME: + return "Resume"; + case MENU_LABEL_VALUE_SAVE_STATE: + return "Save State"; + case MENU_LABEL_VALUE_DISK_INDEX: + return "Disk Index"; + case MENU_LABEL_VALUE_FRONTEND_COUNTERS: + return "Frontend Counters"; + case MENU_LABEL_VALUE_CORE_COUNTERS: + return "Core Counters"; + case MENU_LABEL_VALUE_DISK_IMAGE_APPEND: + return "Disk Image Append"; + case MENU_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS: + return "Disk Cycle Tray Status"; + case MENU_LABEL_VALUE_NO_CORE_INFORMATION_AVAILABLE: + return "No core information available."; + case MENU_LABEL_VALUE_NO_CORE_OPTIONS_AVAILABLE: + return "No core options available."; + case MENU_LABEL_VALUE_NO_CORES_AVAILABLE: + return "No cores available."; + case MENU_LABEL_VALUE_CORE_INFORMATION: + return "Core Information"; + case MENU_LABEL_VALUE_DATABASE_MANAGER: + return "Database Manager"; + case MENU_LABEL_VALUE_CURSOR_MANAGER: + return "Cursor Manager"; case MENU_VALUE_RECORDING_SETTINGS: return "Recording Settings"; case MENU_VALUE_MAIN_MENU: diff --git a/menu/menu_hash.h b/menu/menu_hash.h index d352f8e0ee..eac5530f9b 100644 --- a/menu/menu_hash.h +++ b/menu/menu_hash.h @@ -26,7 +26,11 @@ extern "C" { #define MENU_LABEL_HOLD_FAST_FORWARD 0xebe2e4cdU #define MENU_LABEL_CHEAT_TOGGLE 0xe515e0cbU #define MENU_LABEL_PAUSE_TOGGLE 0x557634e4U + +#define MENU_LABEL_VALUE_NO_CORE_INFORMATION_AVAILABLE 0x2a11fe80U +#define MENU_LABEL_VALUE_NO_CORES_AVAILABLE 0xe16bfd0dU #define MENU_LABEL_SAVE_STATE 0x54a257f4U +#define MENU_LABEL_VALUE_SAVE_STATE 0x3e182415U #define MENU_LABEL_LOAD_STATE 0xe8c5dae5U #define MENU_LABEL_REWIND 0x1931d5aeU #define MENU_LABEL_NETPLAY_FLIP_PLAYERS 0x801425abU @@ -245,21 +249,31 @@ extern "C" { #define MENU_LABEL_CORE_LIST 0xa8c3bfc9U #define MENU_LABEL_MANAGEMENT 0xb8137ec2U #define MENU_LABEL_OPTIONS 0x71f05091U +#define MENU_LABEL_VALUE_OPTIONS 0xd2a8b871U #define MENU_LABEL_SETTINGS 0x1304dc16U #define MENU_LABEL_FRONTEND_COUNTERS 0xe5696877U +#define MENU_LABEL_VALUE_FRONTEND_COUNTERS 0x5752bcf8U +#define MENU_LABEL_VALUE_CORE_COUNTERS 0x4610e861U #define MENU_LABEL_CORE_COUNTERS 0x64cc83e0U #define MENU_LABEL_HISTORY_LIST 0x60d82032U #define MENU_LABEL_INFO_SCREEN 0xd97853d0U #define MENU_LABEL_SYSTEM_INFORMATION 0x206ebf0fU #define MENU_LABEL_CORE_INFORMATION 0xb638e0d3U +#define MENU_LABEL_VALUE_CORE_INFORMATION 0x781981b4U #define MENU_LABEL_VIDEO_SHADER_PARAMETERS 0x9895c3e5U #define MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS 0xd18158d7U #define MENU_LABEL_DISK_OPTIONS 0xc61ab5fbU #define MENU_LABEL_CORE_OPTIONS 0xf65e60f9U +#define MENU_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS 0xf44928c4U +#define MENU_LABEL_VALUE_NO_CORE_OPTIONS_AVAILABLE 0xd064cbe6U +#define MENU_LABEL_VALUE_DISK_INDEX 0xadbce4a8U +#define MENU_LABEL_VALUE_DISK_IMAGE_APPEND 0x1cb28c6bU #define MENU_LABEL_SHADER_OPTIONS 0x1f7d2fc7U #define MENU_LABEL_VIDEO_OPTIONS 0x6390c4e7U #define MENU_LABEL_CORE_CHEAT_OPTIONS 0x9293171dU #define MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS 0x7836a8caU +#define MENU_LABEL_VALUE_CURSOR_MANAGER 0xc3696afeU +#define MENU_LABEL_VALUE_DATABASE_MANAGER 0x6af9d2b5U #define MENU_LABEL_DATABASE_MANAGER_LIST 0x7f853d8fU #define MENU_LABEL_CURSOR_MANAGER_LIST 0xa969e378U #define MENU_LABEL_VIDEO_SHADER_PASS 0x4fa31028U @@ -356,6 +370,7 @@ extern "C" { #define MENU_LABEL_SAVESTATE 0x3a4849b5U #define MENU_LABEL_LOADSTATE 0xa39eb286U #define MENU_LABEL_RESUME_CONTENT 0xd9f088b0U +#define MENU_LABEL_VALUE_RESUME 0xce8ac2f6U #define MENU_LABEL_RESTART_CONTENT 0x1ea2e224U #define MENU_LABEL_TAKE_SCREENSHOT 0x6786e867U #define MENU_LABEL_FILE_LOAD_OR_RESUME 0x952941f4U