mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
no need to do nat traversal if using relay
This commit is contained in:
parent
370b9681b8
commit
34be5f399c
@ -1514,7 +1514,7 @@ bool init_netplay(void *direct_host, const char *server, unsigned port)
|
|||||||
settings->bools.netplay_stateless_mode,
|
settings->bools.netplay_stateless_mode,
|
||||||
settings->ints.netplay_check_frames,
|
settings->ints.netplay_check_frames,
|
||||||
&cbs,
|
&cbs,
|
||||||
settings->bools.netplay_nat_traversal,
|
settings->bools.netplay_nat_traversal && !settings->bools.netplay_use_mitm_server,
|
||||||
#ifdef HAVE_DISCORD
|
#ifdef HAVE_DISCORD
|
||||||
discord_get_own_username() ? discord_get_own_username() :
|
discord_get_own_username() ? discord_get_own_username() :
|
||||||
#endif
|
#endif
|
||||||
|
@ -912,7 +912,6 @@ static bool netplay_get_cmd(netplay_t *netplay,
|
|||||||
uint32_t cmd;
|
uint32_t cmd;
|
||||||
uint32_t cmd_size;
|
uint32_t cmd_size;
|
||||||
ssize_t recvd;
|
ssize_t recvd;
|
||||||
static bool previous_frame_paused = false;
|
|
||||||
|
|
||||||
/* We don't handle the initial handshake here */
|
/* We don't handle the initial handshake here */
|
||||||
if (connection->mode < NETPLAY_CONNECTION_CONNECTED)
|
if (connection->mode < NETPLAY_CONNECTION_CONNECTED)
|
||||||
@ -1788,19 +1787,12 @@ static bool netplay_get_cmd(netplay_t *netplay,
|
|||||||
{
|
{
|
||||||
snprintf(msg, sizeof(msg)-1, msg_hash_to_str(MSG_NETPLAY_PEER_PAUSED), nick);
|
snprintf(msg, sizeof(msg)-1, msg_hash_to_str(MSG_NETPLAY_PEER_PAUSED), nick);
|
||||||
}
|
}
|
||||||
|
RARCH_LOG("[netplay] %s\n", msg);
|
||||||
if (!previous_frame_paused)
|
runloop_msg_queue_push(msg, 1, 180, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||||
{
|
|
||||||
RARCH_LOG("[netplay] %s\n", msg);
|
|
||||||
runloop_msg_queue_push(msg, 1, 180, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
|
||||||
}
|
|
||||||
previous_frame_paused = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case NETPLAY_CMD_RESUME:
|
case NETPLAY_CMD_RESUME:
|
||||||
RARCH_LOG("[netplay] resumed\n");
|
|
||||||
previous_frame_paused = false;
|
|
||||||
remote_unpaused(netplay, connection);
|
remote_unpaused(netplay, connection);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user