From 159a45187aa6178e489091b2ebff2e6f85b9b9f3 Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Sun, 2 Oct 2016 23:27:12 -0400 Subject: [PATCH 1/3] Add a link from the netplay menu to netplay settings --- intl/msg_hash_us.c | 8 ++++++++ menu/menu_displaylist.c | 16 ++++++++++++++++ msg_hash.h | 2 ++ 3 files changed, 26 insertions(+) diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index 2f2a618d84..d96c3ae45d 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -1612,6 +1612,10 @@ int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len) snprintf(s, len, "Disconnects an active Netplay connection."); break; + case MENU_ENUM_LABEL_NETPLAY_SETTINGS: + snprintf(s, len, + "Setting related to Netplay."); + break; case MENU_ENUM_LABEL_DYNAMIC_WALLPAPER: snprintf(s, len, "Dynamically load a new wallpaper \n" @@ -2488,6 +2492,8 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg) return "menu_netplay_enable_client"; case MENU_ENUM_LABEL_NETPLAY_DISCONNECT: return "menu_netplay_disconnect"; + case MENU_ENUM_LABEL_NETPLAY_SETTINGS: + return "menu_netplay_settings"; case MENU_ENUM_LABEL_DPI_OVERRIDE_ENABLE: return "dpi_override_enable"; case MENU_ENUM_LABEL_DPI_OVERRIDE_VALUE: @@ -3825,6 +3831,8 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg) return "Connect to Netplay host"; case MENU_ENUM_LABEL_VALUE_NETPLAY_DISCONNECT: return "Disconnect"; + case MENU_ENUM_LABEL_VALUE_NETPLAY_SETTINGS: + return "Netplay settings"; case MENU_ENUM_LABEL_VALUE_DPI_OVERRIDE_ENABLE: return "DPI Override Enable"; case MENU_ENUM_LABEL_VALUE_DPI_OVERRIDE_VALUE: diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 430aac9fb0..4f1790a6bb 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -1500,10 +1500,21 @@ static int menu_displaylist_parse_shader_options(menu_displaylist_info_t *info) return 0; } +static int menu_displaylist_parse_settings_enum(void *data, + menu_displaylist_info_t *info, + enum msg_hash_enums label, + enum menu_displaylist_parse_type parse_type, + bool add_empty_entry); + static int menu_displaylist_parse_netplay( menu_displaylist_info_t *info) { #ifdef HAVE_NETWORKING + menu_handle_t *menu = NULL; + + if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu)) + menu = NULL; + menu_entries_append_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE_HOST), msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_ENABLE_HOST), @@ -1522,6 +1533,11 @@ static int menu_displaylist_parse_netplay( MENU_ENUM_LABEL_NETPLAY_DISCONNECT, MENU_SETTING_ACTION, 0, 0); + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_SETTINGS), + msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_SETTINGS), + MENU_ENUM_LABEL_NETWORK_SETTINGS, MENU_SETTING_GROUP, 0, 0); + #else menu_entries_append_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS), diff --git a/msg_hash.h b/msg_hash.h index 2267279c99..f0f6b4b0c7 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -967,6 +967,8 @@ enum msg_hash_enums MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE_CLIENT, MENU_ENUM_LABEL_NETPLAY_DISCONNECT, MENU_ENUM_LABEL_VALUE_NETPLAY_DISCONNECT, + MENU_ENUM_LABEL_NETPLAY_SETTINGS, + MENU_ENUM_LABEL_VALUE_NETPLAY_SETTINGS, From 25ed0dc5d69e95a200d186163f84b3b36a35176e Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Sun, 2 Oct 2016 23:29:08 -0400 Subject: [PATCH 2/3] Remove a line used during debugging --- menu/menu_displaylist.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 4f1790a6bb..d17e55e7a4 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -1500,12 +1500,6 @@ static int menu_displaylist_parse_shader_options(menu_displaylist_info_t *info) return 0; } -static int menu_displaylist_parse_settings_enum(void *data, - menu_displaylist_info_t *info, - enum msg_hash_enums label, - enum menu_displaylist_parse_type parse_type, - bool add_empty_entry); - static int menu_displaylist_parse_netplay( menu_displaylist_info_t *info) { From 333efdf78825bd0f2372da78f9fb97c8307d8e83 Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Sun, 2 Oct 2016 23:29:50 -0400 Subject: [PATCH 3/3] And a couple more debugging lines deleted... --- menu/menu_displaylist.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index d17e55e7a4..bed7ed9e22 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -1504,11 +1504,6 @@ static int menu_displaylist_parse_netplay( menu_displaylist_info_t *info) { #ifdef HAVE_NETWORKING - menu_handle_t *menu = NULL; - - if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu)) - menu = NULL; - menu_entries_append_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE_HOST), msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_ENABLE_HOST),