Unverified Commit c33ff011 authored by funbars's avatar funbars Committed by GitHub
Browse files

fix runahead

parent c967bdde
......@@ -1292,24 +1292,33 @@ void retro_set_video_refresh(retro_video_refresh_t cb)
video_cb = cb;
}
static size_t serialize_size;
size_t retro_serialize_size(void)
{
StateMem st;
StateMem st;
size_t serialize_size;
st.data = NULL;
st.loc = 0;
st.len = 0;
st.malloced = 0;
st.initial_malloc = 0;
st.data = NULL;
st.loc = 0;
st.len = 0;
st.malloced = 0;
st.initial_malloc = 0;
if (!MDFNSS_SaveSM(&st, 0, 0, NULL, NULL, NULL))
return 0;
if (!MDFNSS_SaveSM(&st, 0, 0, NULL, NULL, NULL))
return 0;
free(st.data);
free(st.data);
serialize_size = st.len;
int runahead = -1;
if(environ_cb(RETRO_ENVIRONMENT_GET_AUDIO_VIDEO_ENABLE, &runahead))
{
// future expanding size
if(runahead & 4)
serialize_size += 0x280000;
}
return serialize_size = st.len;
return serialize_size;
}
bool retro_serialize(void *data, size_t size)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment