(netplay) Cleanups

This commit is contained in:
twinaphex 2016-04-10 16:35:25 +02:00
parent 494ceee05e
commit 7660b67ad4
3 changed files with 11 additions and 7 deletions

View File

@ -733,10 +733,14 @@ static bool init_tcp_socket(netplay_t *netplay, const char *server,
while (tmp_info)
{
int fd;
if ((fd = init_tcp_connection(tmp_info, server, netplay->spectate.enabled,
(struct sockaddr*)&netplay->other_addr,
sizeof(netplay->other_addr))) >= 0)
int fd = init_tcp_connection(
tmp_info,
server,
netplay->spectate.enabled,
(struct sockaddr*)&netplay->other_addr,
sizeof(netplay->other_addr));
if (fd >= 0)
{
ret = true;
netplay->fd = fd;

View File

@ -75,10 +75,10 @@ enum netplay_cmd
/* Controlling game playback */
/* Pauses the game, takes no args */
/* Pauses the game, takes no arguments */
NETPLAY_CMD_PAUSE = 0x0030,
/* Resumes the game, takes no args */
/* Resumes the game, takes no arguments */
NETPLAY_CMD_RESUME = 0x0031
};

View File

@ -82,8 +82,8 @@ static void netplay_net_post_frame(netplay_t *netplay)
while (first || (netplay->tmp_ptr != netplay->self_ptr))
{
serial_info.data = netplay->buffer[netplay->tmp_ptr].state;
serial_info.data_const = NULL;
serial_info.size = netplay->state_size;
serial_info.data_const = NULL;
core_ctl(CORE_CTL_RETRO_SERIALIZE, &serial_info);