mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +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->ints.netplay_check_frames,
|
||||
&cbs,
|
||||
settings->bools.netplay_nat_traversal,
|
||||
settings->bools.netplay_nat_traversal && !settings->bools.netplay_use_mitm_server,
|
||||
#ifdef HAVE_DISCORD
|
||||
discord_get_own_username() ? discord_get_own_username() :
|
||||
#endif
|
||||
|
@ -912,7 +912,6 @@ static bool netplay_get_cmd(netplay_t *netplay,
|
||||
uint32_t cmd;
|
||||
uint32_t cmd_size;
|
||||
ssize_t recvd;
|
||||
static bool previous_frame_paused = false;
|
||||
|
||||
/* We don't handle the initial handshake here */
|
||||
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);
|
||||
}
|
||||
|
||||
if (!previous_frame_paused)
|
||||
{
|
||||
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;
|
||||
RARCH_LOG("[netplay] %s\n", msg);
|
||||
runloop_msg_queue_push(msg, 1, 180, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
break;
|
||||
}
|
||||
|
||||
case NETPLAY_CMD_RESUME:
|
||||
RARCH_LOG("[netplay] resumed\n");
|
||||
previous_frame_paused = false;
|
||||
remote_unpaused(netplay, connection);
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user