mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Show passworded rooms on lobby (#13301)
This commit is contained in:
parent
67eb42a8c2
commit
af4bdecef9
@ -12643,6 +12643,10 @@ MSG_HASH(
|
|||||||
MENU_ENUM_SUBLABEL_MENU_SHOW_SHUTDOWN,
|
MENU_ENUM_SUBLABEL_MENU_SHOW_SHUTDOWN,
|
||||||
"Show the 'Shutdown' option."
|
"Show the 'Shutdown' option."
|
||||||
)
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MSG_ROOM_PASSWORDED,
|
||||||
|
"Passworded"
|
||||||
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MSG_INTERNET,
|
MSG_INTERNET,
|
||||||
"Internet"
|
"Internet"
|
||||||
|
@ -9713,10 +9713,21 @@ unsigned menu_displaylist_netplay_refresh_rooms(file_list_t *list)
|
|||||||
for (i = 0; i < net_st->room_count; i++)
|
for (i = 0; i < net_st->room_count; i++)
|
||||||
{
|
{
|
||||||
char country[8];
|
char country[8];
|
||||||
|
char passworded[64];
|
||||||
|
|
||||||
if (*net_st->room_list[i].country)
|
if (!net_st->room_list[i].lan &&
|
||||||
|
!string_is_empty(net_st->room_list[i].country))
|
||||||
snprintf(country, sizeof(country),
|
snprintf(country, sizeof(country),
|
||||||
"(%s)", net_st->room_list[i].country);
|
"(%s)", net_st->room_list[i].country);
|
||||||
|
else
|
||||||
|
*country = '\0';
|
||||||
|
|
||||||
|
if (net_st->room_list[i].has_password ||
|
||||||
|
net_st->room_list[i].has_spectate_password)
|
||||||
|
snprintf(passworded, sizeof(passworded),
|
||||||
|
"[%s]", msg_hash_to_str(MSG_ROOM_PASSWORDED));
|
||||||
|
else
|
||||||
|
*passworded = '\0';
|
||||||
|
|
||||||
/* Uncomment this to debug mismatched room parameters*/
|
/* Uncomment this to debug mismatched room parameters*/
|
||||||
#if 0
|
#if 0
|
||||||
@ -9739,15 +9750,16 @@ unsigned menu_displaylist_netplay_refresh_rooms(file_list_t *list)
|
|||||||
net_st->room_list[i].timestamp);
|
net_st->room_list[i].timestamp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
snprintf(s, sizeof(s), "%s: %s%s",
|
snprintf(s, sizeof(s), "%s%s: %s%s",
|
||||||
net_st->room_list[i].lan
|
passworded,
|
||||||
? msg_hash_to_str(MSG_LOCAL)
|
net_st->room_list[i].lan
|
||||||
: (net_st->room_list[i].host_method
|
? msg_hash_to_str(MSG_LOCAL)
|
||||||
== NETPLAY_HOST_METHOD_MITM
|
: (net_st->room_list[i].host_method
|
||||||
? msg_hash_to_str(MSG_INTERNET_RELAY)
|
== NETPLAY_HOST_METHOD_MITM
|
||||||
|
? msg_hash_to_str(MSG_INTERNET_RELAY)
|
||||||
: msg_hash_to_str(MSG_INTERNET)),
|
: msg_hash_to_str(MSG_INTERNET)),
|
||||||
net_st->room_list[i].nickname,
|
net_st->room_list[i].nickname,
|
||||||
net_st->room_list[i].lan ? "" : country
|
country
|
||||||
);
|
);
|
||||||
|
|
||||||
if (menu_entries_append_enum(list,
|
if (menu_entries_append_enum(list,
|
||||||
|
@ -167,6 +167,7 @@ enum msg_file_type
|
|||||||
enum msg_hash_enums
|
enum msg_hash_enums
|
||||||
{
|
{
|
||||||
MSG_UNKNOWN = 0,
|
MSG_UNKNOWN = 0,
|
||||||
|
MSG_ROOM_PASSWORDED,
|
||||||
MSG_INTERNET,
|
MSG_INTERNET,
|
||||||
MSG_INTERNET_RELAY,
|
MSG_INTERNET_RELAY,
|
||||||
MSG_READ_WRITE,
|
MSG_READ_WRITE,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user