Don't serialize frame 0 in netplay, as the core may not yet be ready

This commit is contained in:
Gregor Richards 2016-09-22 17:36:46 -04:00
parent 714db40fa0
commit 1503b3d42f

View File

@ -59,7 +59,8 @@ static bool netplay_net_pre_frame(netplay_t *netplay)
{
retro_ctx_serialize_info_t serial_info;
if (netplay_delta_frame_ready(netplay, &netplay->buffer[netplay->self_ptr], netplay->self_frame_count))
if (netplay_delta_frame_ready(netplay, &netplay->buffer[netplay->self_ptr], netplay->self_frame_count) &&
netplay->self_frame_count > 0 /* Frame 0 may not yet be ready for serialization */)
{
serial_info.data_const = NULL;
serial_info.data = netplay->buffer[netplay->self_ptr].state;