Merge pull request #110 from funbars/run2

fix runahead
This commit is contained in:
Twinaphex 2019-05-10 17:06:57 +02:00 committed by GitHub
commit 8a78001f3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1040 additions and 1027 deletions

View File

@ -1292,11 +1292,10 @@ 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;
size_t serialize_size;
st.data = NULL;
st.loc = 0;
@ -1309,7 +1308,17 @@ size_t retro_serialize_size(void)
free(st.data);
return serialize_size = st.len;
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;
}
bool retro_serialize(void *data, size_t size)

View File

@ -38,6 +38,7 @@ int setting_pce_multitap = 1;
int setting_pce_scaling = 0;
uint32_t setting_pce_cdspeed = 1;
std::string setting_pce_cdbios = "syscard3.pce";
std::string setting_pce_gecdbios = "gexpress.pce";
uint64 MDFN_GetSettingUI(const char *name)
{
@ -135,6 +136,8 @@ std::string MDFN_GetSettingS(const char *name)
{
if (!strcmp("pce.cdbios", name))
return setting_pce_cdbios;
if (!strcmp("pce.gecdbios", name))
return setting_pce_gecdbios;
/* FILESYS */
if (!strcmp("filesys.path_firmware", name))
return retro_base_directory;

View File

@ -20,6 +20,7 @@ extern int setting_pce_multitap;
extern int setting_pce_scaling;
extern uint32_t setting_pce_cdspeed;
extern std::string setting_pce_cdbios;
extern std::string setting_pce_gecdbios;
// This should assert() or something if the setting isn't found, since it would
// be a totally tubular error!