Merge pull request #13936 from Cthulhu-throwaway/kick-submenu-ext
(Netplay) Chat supported info for the host kick submenu
This commit is contained in:
commit
f4964c1937
|
@ -11527,6 +11527,10 @@ MSG_HASH(
|
||||||
MSG_NETPLAY_STATUS_SPECTATING,
|
MSG_NETPLAY_STATUS_SPECTATING,
|
||||||
"Spectating"
|
"Spectating"
|
||||||
)
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MSG_NETPLAY_CHAT_SUPPORTED,
|
||||||
|
"Chat Supported"
|
||||||
|
)
|
||||||
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MSG_AUDIO_VOLUME,
|
MSG_AUDIO_VOLUME,
|
||||||
|
|
|
@ -1613,15 +1613,22 @@ static int action_bind_sublabel_netplay_kick_client(file_list_t *list,
|
||||||
|
|
||||||
if (status)
|
if (status)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "%s: %s",
|
snprintf(buf, sizeof(buf), "%s: %s\n",
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_STATUS), status);
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_STATUS), status);
|
||||||
strlcat(s, buf, len);
|
strlcat(s, buf, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), "%s: %s",
|
||||||
|
msg_hash_to_str(MSG_NETPLAY_CHAT_SUPPORTED),
|
||||||
|
msg_hash_to_str((client->protocol >= 6) ?
|
||||||
|
MENU_ENUM_LABEL_VALUE_YES :
|
||||||
|
MENU_ENUM_LABEL_VALUE_NO));
|
||||||
|
strlcat(s, buf, len);
|
||||||
|
|
||||||
if (client->ping >= 0)
|
if (client->ping >= 0)
|
||||||
{
|
{
|
||||||
if (*s)
|
snprintf(buf, sizeof(buf), "\nPing: %u",
|
||||||
strlcat(s, "\n", len);
|
(unsigned)client->ping);
|
||||||
snprintf(buf, sizeof(buf), "Ping: %u", (unsigned)client->ping);
|
|
||||||
strlcat(s, buf, len);
|
strlcat(s, buf, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -220,6 +220,7 @@ enum msg_hash_enums
|
||||||
MSG_NETPLAY_FAILED_TO_KICK_CLIENT_S,
|
MSG_NETPLAY_FAILED_TO_KICK_CLIENT_S,
|
||||||
MSG_NETPLAY_STATUS_PLAYING,
|
MSG_NETPLAY_STATUS_PLAYING,
|
||||||
MSG_NETPLAY_STATUS_SPECTATING,
|
MSG_NETPLAY_STATUS_SPECTATING,
|
||||||
|
MSG_NETPLAY_CHAT_SUPPORTED,
|
||||||
MSG_RESAMPLER_QUALITY_LOWEST,
|
MSG_RESAMPLER_QUALITY_LOWEST,
|
||||||
MSG_RESAMPLER_QUALITY_LOWER,
|
MSG_RESAMPLER_QUALITY_LOWER,
|
||||||
MSG_RESAMPLER_QUALITY_NORMAL,
|
MSG_RESAMPLER_QUALITY_NORMAL,
|
||||||
|
|
|
@ -142,6 +142,7 @@ typedef struct netplay netplay_t;
|
||||||
|
|
||||||
typedef struct netplay_client_info
|
typedef struct netplay_client_info
|
||||||
{
|
{
|
||||||
|
uint32_t protocol;
|
||||||
int32_t ping;
|
int32_t ping;
|
||||||
int id;
|
int id;
|
||||||
enum rarch_netplay_connection_mode mode;
|
enum rarch_netplay_connection_mode mode;
|
||||||
|
|
|
@ -8505,8 +8505,9 @@ static size_t retrieve_client_info(netplay_t *netplay, netplay_client_info_t *bu
|
||||||
netplay_client_info_t *info = &buf[j++];
|
netplay_client_info_t *info = &buf[j++];
|
||||||
info->id = (int)i;
|
info->id = (int)i;
|
||||||
strlcpy(info->name, connection->nick, sizeof(info->name));
|
strlcpy(info->name, connection->nick, sizeof(info->name));
|
||||||
info->mode = connection->mode;
|
info->protocol = connection->netplay_protocol;
|
||||||
info->ping = connection->ping;
|
info->mode = connection->mode;
|
||||||
|
info->ping = connection->ping;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue