From 7b7b9b1f27221c8bdc6e418bc57eee45df7dafdd Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 24 Oct 2016 04:27:43 +0200 Subject: [PATCH] Add sublabel for Menu Settings --- intl/msg_hash_us.c | 2 ++ menu/cbs/menu_cbs_sublabel.c | 13 +++++++++++++ msg_hash.h | 3 ++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index 0538951a2b..67b1556475 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -1899,6 +1899,8 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg) switch (msg) { + case MENU_ENUM_SUBLABEL_MENU_SETTINGS: + return "Adjusts settings related to the appearance of the menu screen."; case MSG_CONNECTION_SLOT: return "Connection slot"; case MSG_WAITING_FOR_CLIENT: diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 64009edc55..3f5a5e41e8 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -36,6 +36,16 @@ static int action_bind_sublabel_generic( return 0; } +static int action_bind_sublabel_menu_settings_list( + file_list_t *list, + unsigned type, unsigned i, + const char *label, const char *path, + char *s, size_t len) +{ + strlcpy(s, msg_hash_to_str(MENU_ENUM_SUBLABEL_MENU_SETTINGS), len); + return 0; +} + static int action_bind_sublabel_video_settings_list( file_list_t *list, unsigned type, unsigned i, @@ -305,6 +315,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_FPS_SHOW: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_fps_show); break; + case MENU_ENUM_LABEL_MENU_SETTINGS: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_settings_list); + break; case MENU_ENUM_LABEL_VIDEO_SETTINGS: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_settings_list); break; diff --git a/msg_hash.h b/msg_hash.h index f3ed96d60e..6b4e88a4cf 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -1875,7 +1875,8 @@ enum msg_hash_enums MENU_ENUM_SUBLABEL_FPS_SHOW, MENU_ENUM_SUBLABEL_VIDEO_MAX_SWAPCHAIN_IMAGES, MENU_ENUM_SUBLABEL_ONLINE_UPDATER, - MENU_ENUM_SUBLABEL_NETPLAY + MENU_ENUM_SUBLABEL_NETPLAY, + MENU_ENUM_SUBLABEL_MENU_SETTINGS };