diff --git a/netplay/netplay.c b/netplay/netplay.c index d3eaecfde6..6af88650c6 100644 --- a/netplay/netplay.c +++ b/netplay/netplay.c @@ -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); } diff --git a/netplay/netplay_net.c b/netplay/netplay_net.c index 198e64234d..9cd6f815d1 100644 --- a/netplay/netplay_net.c +++ b/netplay/netplay_net.c @@ -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);