mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-22 18:58:21 +00:00
Server needs double the buffer frames since two connected clients could
be ahead and behind by the max frames
This commit is contained in:
parent
f7f6590156
commit
a20e79bbb5
@ -376,6 +376,11 @@ static bool netplay_init_buffers(netplay_t *netplay)
|
||||
/* Enough to get ahead or behind by MAX_STALL_FRAMES frames */
|
||||
netplay->buffer_size = NETPLAY_MAX_STALL_FRAMES + 1;
|
||||
|
||||
/* If we're the server, we need enough to get ahead AND behind by
|
||||
* MAX_STALL_FRAMES frame */
|
||||
if (netplay->is_server)
|
||||
netplay->buffer_size *= 2;
|
||||
|
||||
netplay->buffer = (struct delta_frame*)calloc(netplay->buffer_size,
|
||||
sizeof(*netplay->buffer));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user