mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
(netplay) Cleanups
This commit is contained in:
parent
494ceee05e
commit
7660b67ad4
@ -733,10 +733,14 @@ static bool init_tcp_socket(netplay_t *netplay, const char *server,
|
|||||||
|
|
||||||
while (tmp_info)
|
while (tmp_info)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd = init_tcp_connection(
|
||||||
if ((fd = init_tcp_connection(tmp_info, server, netplay->spectate.enabled,
|
tmp_info,
|
||||||
(struct sockaddr*)&netplay->other_addr,
|
server,
|
||||||
sizeof(netplay->other_addr))) >= 0)
|
netplay->spectate.enabled,
|
||||||
|
(struct sockaddr*)&netplay->other_addr,
|
||||||
|
sizeof(netplay->other_addr));
|
||||||
|
|
||||||
|
if (fd >= 0)
|
||||||
{
|
{
|
||||||
ret = true;
|
ret = true;
|
||||||
netplay->fd = fd;
|
netplay->fd = fd;
|
||||||
|
@ -75,10 +75,10 @@ enum netplay_cmd
|
|||||||
|
|
||||||
/* Controlling game playback */
|
/* Controlling game playback */
|
||||||
|
|
||||||
/* Pauses the game, takes no args */
|
/* Pauses the game, takes no arguments */
|
||||||
NETPLAY_CMD_PAUSE = 0x0030,
|
NETPLAY_CMD_PAUSE = 0x0030,
|
||||||
|
|
||||||
/* Resumes the game, takes no args */
|
/* Resumes the game, takes no arguments */
|
||||||
NETPLAY_CMD_RESUME = 0x0031
|
NETPLAY_CMD_RESUME = 0x0031
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -82,8 +82,8 @@ static void netplay_net_post_frame(netplay_t *netplay)
|
|||||||
while (first || (netplay->tmp_ptr != netplay->self_ptr))
|
while (first || (netplay->tmp_ptr != netplay->self_ptr))
|
||||||
{
|
{
|
||||||
serial_info.data = netplay->buffer[netplay->tmp_ptr].state;
|
serial_info.data = netplay->buffer[netplay->tmp_ptr].state;
|
||||||
serial_info.data_const = NULL;
|
|
||||||
serial_info.size = netplay->state_size;
|
serial_info.size = netplay->state_size;
|
||||||
|
serial_info.data_const = NULL;
|
||||||
|
|
||||||
core_ctl(CORE_CTL_RETRO_SERIALIZE, &serial_info);
|
core_ctl(CORE_CTL_RETRO_SERIALIZE, &serial_info);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user