mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 13:20:30 +00:00
Adding netplay password to menu.
This commit is contained in:
parent
f619789e48
commit
24a39078be
@ -798,6 +798,8 @@ static const unsigned autosave_interval = 0;
|
||||
* user 1 rather than user 2. */
|
||||
static const bool netplay_client_swap_input = true;
|
||||
|
||||
static const bool netplay_nat_traversal = false;
|
||||
|
||||
static const unsigned netplay_delay_frames = 16;
|
||||
|
||||
static const unsigned netplay_check_frames = 30;
|
||||
|
@ -589,6 +589,8 @@ MSG_HASH(MENU_ENUM_LABEL_NETPLAY_NAT_TRAVERSAL,
|
||||
"netplay_nat_traversal")
|
||||
MSG_HASH(MENU_ENUM_LABEL_NETPLAY_NICKNAME,
|
||||
"netplay_nickname")
|
||||
MSG_HASH(MENU_ENUM_LABEL_NETPLAY_PASSWORD,
|
||||
"netplay_password")
|
||||
MSG_HASH(MENU_ENUM_LABEL_NETPLAY_SETTINGS,
|
||||
"menu_netplay_settings")
|
||||
MSG_HASH(MENU_ENUM_LABEL_NETPLAY_SPECTATOR_MODE_ENABLE,
|
||||
|
@ -1697,6 +1697,11 @@ int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"The address of the host to connect to.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_NETPLAY_PASSWORD:
|
||||
snprintf(s, len,
|
||||
"The password for connecting to the netplay \n"
|
||||
"host. Used only in host mode.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_STDIN_CMD_ENABLE:
|
||||
snprintf(s, len,
|
||||
"Enable stdin command interface.");
|
||||
|
@ -920,12 +920,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_MODE,
|
||||
"Netplay Client Enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_NICKNAME,
|
||||
"Username")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD,
|
||||
"Server Password")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SETTINGS,
|
||||
"Netplay settings")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATOR_MODE_ENABLE,
|
||||
"Netplay Spectator Enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_TCP_UDP_PORT,
|
||||
"Netplay TCP/UDP Port")
|
||||
"Netplay TCP Port")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_NAT_TRAVERSAL,
|
||||
"Netplay NAT Traversal")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_CMD_ENABLE,
|
||||
|
@ -4689,6 +4689,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
MENU_ENUM_LABEL_NETPLAY_TCP_UDP_PORT,
|
||||
PARSE_ONLY_UINT, false) != -1)
|
||||
count++;
|
||||
if (menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_NETPLAY_PASSWORD,
|
||||
PARSE_ONLY_STRING, false) != -1)
|
||||
count++;
|
||||
if (menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_NETPLAY_DELAY_FRAMES,
|
||||
PARSE_ONLY_UINT, false) != -1)
|
||||
@ -4698,11 +4702,11 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
PARSE_ONLY_UINT, false) != -1)
|
||||
count++;
|
||||
if (menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_NETPLAY_CLIENT_SWAP_INPUT,
|
||||
MENU_ENUM_LABEL_NETPLAY_NAT_TRAVERSAL,
|
||||
PARSE_ONLY_BOOL, false) != -1)
|
||||
count++;
|
||||
if (menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_NETPLAY_NAT_TRAVERSAL,
|
||||
MENU_ENUM_LABEL_NETPLAY_CLIENT_SWAP_INPUT,
|
||||
PARSE_ONLY_BOOL, false) != -1)
|
||||
count++;
|
||||
if (menu_displaylist_parse_settings_enum(menu, info,
|
||||
|
@ -5577,6 +5577,20 @@ static bool setting_append_list(
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 65535, 1, true, true);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
||||
|
||||
CONFIG_STRING(
|
||||
list, list_info,
|
||||
settings->netplay.password,
|
||||
sizeof(settings->netplay.password),
|
||||
MENU_ENUM_LABEL_NETPLAY_PASSWORD,
|
||||
MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD,
|
||||
"",
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
||||
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->netplay.delay_frames,
|
||||
@ -5588,7 +5602,7 @@ static bool setting_append_list(
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 10, 1, true, false);
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 60, 1, true, false);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
||||
|
||||
CONFIG_UINT(
|
||||
@ -5602,7 +5616,7 @@ static bool setting_append_list(
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 10, 1, true, false);
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 600, 1, true, false);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
||||
|
||||
CONFIG_BOOL(
|
||||
|
@ -1003,6 +1003,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(SORT_SAVEFILES_ENABLE),
|
||||
MENU_LABEL(SORT_SAVESTATES_ENABLE),
|
||||
MENU_LABEL(NETPLAY_IP_ADDRESS),
|
||||
MENU_LABEL(NETPLAY_PASSWORD),
|
||||
MENU_LABEL(NETPLAY_MODE),
|
||||
MENU_LABEL(PERFCNT_ENABLE),
|
||||
MENU_LABEL(OVERLAY_SCALE),
|
||||
|
Loading…
x
Reference in New Issue
Block a user