mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-19 08:46:57 +00:00
(Netplay) Backport - [PATCH] Should fix few issues with netplay.
One perf fix and 3/4 player fix.
This commit is contained in:
parent
92251dcecb
commit
8e435a66eb
@ -568,8 +568,15 @@ int16_t input_state_net(unsigned port, unsigned device,
|
||||
unsigned idx, unsigned id)
|
||||
{
|
||||
netplay_t *netplay = (netplay_t*)netplay_data;
|
||||
|
||||
if (netplay_is_alive(netplay))
|
||||
{
|
||||
/* Only two players for now. */
|
||||
if (port > 1)
|
||||
return 0;
|
||||
|
||||
return netplay_input_state(netplay, port, device, idx, id);
|
||||
}
|
||||
return netplay->cbs.state_cb(port, device, idx, id);
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ static void netplay_net_post_frame(netplay_t *netplay)
|
||||
{
|
||||
const struct delta_frame *ptr = &netplay->buffer[netplay->other_ptr];
|
||||
|
||||
if ((ptr->simulated_input_state != ptr->real_input_state)
|
||||
if (memcmp(ptr->simulated_input_state, ptr->real_input_state, sizeof(ptr->real_input_state)) != 0
|
||||
&& !ptr->used_real)
|
||||
break;
|
||||
netplay->other_ptr = NEXT_PTR(netplay->other_ptr);
|
||||
|
Loading…
Reference in New Issue
Block a user