mirror of
https://github.com/libretro/RetroArch
synced 2025-03-17 19:21:09 +00:00
(Menu) Selectively hide Relay Server Location
This commit is contained in:
parent
3224eefdf1
commit
d6d76a53b9
@ -5189,28 +5189,44 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
break;
|
||||
case DISPLAYLIST_NETWORK_SETTINGS_LIST:
|
||||
{
|
||||
menu_displaylist_build_info_t build_list[] = {
|
||||
{MENU_ENUM_LABEL_NETPLAY_PUBLIC_ANNOUNCE, PARSE_ONLY_BOOL },
|
||||
{MENU_ENUM_LABEL_NETPLAY_USE_MITM_SERVER, PARSE_ONLY_BOOL },
|
||||
{MENU_ENUM_LABEL_NETPLAY_MITM_SERVER, PARSE_ONLY_STRING},
|
||||
{MENU_ENUM_LABEL_NETPLAY_IP_ADDRESS, PARSE_ONLY_STRING},
|
||||
{MENU_ENUM_LABEL_NETPLAY_TCP_UDP_PORT, PARSE_ONLY_UINT },
|
||||
{MENU_ENUM_LABEL_NETPLAY_PASSWORD, PARSE_ONLY_STRING},
|
||||
{MENU_ENUM_LABEL_NETPLAY_SPECTATE_PASSWORD, PARSE_ONLY_STRING},
|
||||
{MENU_ENUM_LABEL_NETPLAY_START_AS_SPECTATOR, PARSE_ONLY_BOOL },
|
||||
{MENU_ENUM_LABEL_NETPLAY_ALLOW_SLAVES, PARSE_ONLY_BOOL },
|
||||
{MENU_ENUM_LABEL_NETPLAY_REQUIRE_SLAVES, PARSE_ONLY_BOOL },
|
||||
{MENU_ENUM_LABEL_NETPLAY_STATELESS_MODE, PARSE_ONLY_BOOL },
|
||||
{MENU_ENUM_LABEL_NETPLAY_CHECK_FRAMES, PARSE_ONLY_INT },
|
||||
{MENU_ENUM_LABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN, PARSE_ONLY_INT },
|
||||
{MENU_ENUM_LABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE, PARSE_ONLY_INT },
|
||||
{MENU_ENUM_LABEL_NETPLAY_NAT_TRAVERSAL, PARSE_ONLY_BOOL },
|
||||
{MENU_ENUM_LABEL_NETPLAY_SHARE_DIGITAL, PARSE_ONLY_UINT },
|
||||
{MENU_ENUM_LABEL_NETPLAY_SHARE_ANALOG, PARSE_ONLY_UINT },
|
||||
settings_t *settings = config_get_ptr();
|
||||
menu_displaylist_build_info_selective_t build_list[] = {
|
||||
{MENU_ENUM_LABEL_NETPLAY_PUBLIC_ANNOUNCE, PARSE_ONLY_BOOL, true },
|
||||
{MENU_ENUM_LABEL_NETPLAY_USE_MITM_SERVER, PARSE_ONLY_BOOL, true },
|
||||
{MENU_ENUM_LABEL_NETPLAY_MITM_SERVER, PARSE_ONLY_STRING, false},
|
||||
{MENU_ENUM_LABEL_NETPLAY_IP_ADDRESS, PARSE_ONLY_STRING, true},
|
||||
{MENU_ENUM_LABEL_NETPLAY_TCP_UDP_PORT, PARSE_ONLY_UINT, true},
|
||||
{MENU_ENUM_LABEL_NETPLAY_PASSWORD, PARSE_ONLY_STRING, true},
|
||||
{MENU_ENUM_LABEL_NETPLAY_SPECTATE_PASSWORD, PARSE_ONLY_STRING, true},
|
||||
{MENU_ENUM_LABEL_NETPLAY_START_AS_SPECTATOR, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_NETPLAY_ALLOW_SLAVES, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_NETPLAY_REQUIRE_SLAVES, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_NETPLAY_STATELESS_MODE, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_NETPLAY_CHECK_FRAMES, PARSE_ONLY_INT, true},
|
||||
{MENU_ENUM_LABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN, PARSE_ONLY_INT, true},
|
||||
{MENU_ENUM_LABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE, PARSE_ONLY_INT, true},
|
||||
{MENU_ENUM_LABEL_NETPLAY_NAT_TRAVERSAL, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_NETPLAY_SHARE_DIGITAL, PARSE_ONLY_UINT, true},
|
||||
{MENU_ENUM_LABEL_NETPLAY_SHARE_ANALOG, PARSE_ONLY_UINT, true},
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
{
|
||||
switch (build_list[i].enum_idx)
|
||||
{
|
||||
case MENU_ENUM_LABEL_NETPLAY_MITM_SERVER:
|
||||
if (settings->bools.netplay_use_mitm_server)
|
||||
build_list[i].checked = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
{
|
||||
if (!build_list[i].checked && !include_everything)
|
||||
continue;
|
||||
if (menu_displaylist_parse_settings_enum(list,
|
||||
build_list[i].enum_idx, build_list[i].parse_type,
|
||||
false) == 0)
|
||||
|
@ -15428,6 +15428,9 @@ static bool setting_append_list(
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
(*list)[list_info->index - 1].action_ok = &setting_bool_action_left_with_refresh;
|
||||
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
|
||||
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
|
||||
|
||||
CONFIG_STRING(
|
||||
list, list_info,
|
||||
|
Loading…
x
Reference in New Issue
Block a user