(Menu) Menu label/hashes update

This commit is contained in:
twinaphex 2015-06-21 08:41:36 +02:00
parent 997af16157
commit 1949c5eada
4 changed files with 17 additions and 4 deletions

View File

@ -365,7 +365,9 @@ static int action_iterate_menu_viewport(char *s, size_t len, const char *label,
&& !settings->video.scale_integer) && !settings->video.scale_integer)
{ {
info.list = menu_list->menu_stack; info.list = menu_list->menu_stack;
strlcpy(info.label, "custom_viewport_2", sizeof(info.label)); strlcpy(info.label,
menu_hash_to_str(MENU_LABEL_CUSTOM_VIEWPORT_2),
sizeof(info.label));
info.type = 0; info.type = 0;
info.directory_ptr = nav->selection_ptr; info.directory_ptr = nav->selection_ptr;
@ -428,9 +430,9 @@ static int action_iterate_menu_viewport(char *s, size_t len, const char *label,
else else
{ {
if (type == MENU_SETTINGS_CUSTOM_VIEWPORT) if (type == MENU_SETTINGS_CUSTOM_VIEWPORT)
base_msg = "Set Upper-Left Corner"; base_msg = menu_hash_to_str(MENU_LABEL_VALUE_CUSTOM_VIEWPORT_1);
else if (hash == MENU_LABEL_CUSTOM_VIEWPORT_2) else if (hash == MENU_LABEL_CUSTOM_VIEWPORT_2)
base_msg = "Set Bottom-Right Corner"; base_msg = menu_hash_to_str(MENU_LABEL_VALUE_CUSTOM_VIEWPORT_2);
snprintf(s, len, "%s (%d, %d : %4ux%4u)", snprintf(s, len, "%s (%d, %d : %4ux%4u)",
base_msg, custom->x, custom->y, custom->width, custom->height); base_msg, custom->x, custom->y, custom->width, custom->height);

View File

@ -1214,7 +1214,7 @@ static int action_ok_custom_viewport(const char *path,
info.list = menu_list->menu_stack; info.list = menu_list->menu_stack;
info.type = MENU_SETTINGS_CUSTOM_VIEWPORT; info.type = MENU_SETTINGS_CUSTOM_VIEWPORT;
info.directory_ptr = idx; info.directory_ptr = idx;
strlcpy(info.label, "custom_viewport_1", sizeof(info.label)); strlcpy(info.label, menu_hash_to_str(MENU_LABEL_CUSTOM_VIEWPORT_1), sizeof(info.label));
ret = menu_displaylist_push_list(&info, DISPLAYLIST_GENERIC); ret = menu_displaylist_push_list(&info, DISPLAYLIST_GENERIC);

View File

@ -344,6 +344,14 @@ static const char *menu_hash_to_str_english(uint32_t hash)
{ {
switch (hash) switch (hash)
{ {
case MENU_LABEL_CUSTOM_VIEWPORT_1:
return "custom_viewport_1";
case MENU_LABEL_VALUE_CUSTOM_VIEWPORT_1:
return "Set Upper-Left Corner";
case MENU_LABEL_CUSTOM_VIEWPORT_2:
return "custom_viewport_2";
case MENU_LABEL_VALUE_CUSTOM_VIEWPORT_2:
return "Set Bottom-Right Corner";
case MENU_VALUE_SHADER: case MENU_VALUE_SHADER:
return "Shader"; return "Shader";
case MENU_VALUE_CHEAT: case MENU_VALUE_CHEAT:

View File

@ -29,6 +29,7 @@ extern "C" {
#define MENU_VALUE_DIRECTORY_DEFAULT 0xdcc3a2e4U #define MENU_VALUE_DIRECTORY_DEFAULT 0xdcc3a2e4U
#define MENU_VALUE_NOT_AVAILABLE 0x0b880503U #define MENU_VALUE_NOT_AVAILABLE 0x0b880503U
#define MENU_LABEL_VIDEO_FONT_ENABLE 0x697d9b58U #define MENU_LABEL_VIDEO_FONT_ENABLE 0x697d9b58U
#define MENU_LABEL_VALUE_VIDEO_FONT_ENABLE 0x272a12a6U #define MENU_LABEL_VALUE_VIDEO_FONT_ENABLE 0x272a12a6U
#define MENU_LABEL_VIDEO_FONT_PATH 0xd0de729eU #define MENU_LABEL_VIDEO_FONT_PATH 0xd0de729eU
@ -573,7 +574,9 @@ extern "C" {
#define MENU_LABEL_INFO_SCREEN 0xd97853d0U #define MENU_LABEL_INFO_SCREEN 0xd97853d0U
#define MENU_LABEL_LOAD_OPEN_ZIP 0x8aa3c068U #define MENU_LABEL_LOAD_OPEN_ZIP 0x8aa3c068U
#define MENU_LABEL_CUSTOM_VIEWPORT_1 0x76c3016fU #define MENU_LABEL_CUSTOM_VIEWPORT_1 0x76c3016fU
#define MENU_LABEL_VALUE_CUSTOM_VIEWPORT_1 0xdeef977eU
#define MENU_LABEL_CUSTOM_VIEWPORT_2 0x76c30170U #define MENU_LABEL_CUSTOM_VIEWPORT_2 0x76c30170U
#define MENU_LABEL_VALUE_CUSTOM_VIEWPORT_2 0x1d76c99aU
#define MENU_LABEL_CUSTOM_RATIO 0xf038731eU #define MENU_LABEL_CUSTOM_RATIO 0xf038731eU
#define MENU_LABEL_VALUE_CUSTOM_RATIO 0x3c94b73fU #define MENU_LABEL_VALUE_CUSTOM_RATIO 0x3c94b73fU
#define MENU_LABEL_HELP 0x7c97d2eeU #define MENU_LABEL_HELP 0x7c97d2eeU