System: Implement runahead

This commit is contained in:
Connor McLaughlin
2021-01-24 02:52:52 +10:00
parent 689b62e065
commit e01d66d18e
15 changed files with 278 additions and 35 deletions

View File

@ -126,6 +126,8 @@ void Settings::Load(SettingsInterface& si)
rewind_enable = si.GetBoolValue("Main", "RewindEnable", false);
rewind_save_frequency = si.GetFloatValue("Main", "RewindFrequency", 10.0f);
rewind_save_slots = static_cast<u32>(si.GetIntValue("Main", "RewindSaveSlots", 10));
runahead_enable = si.GetBoolValue("Main", "RunaheadEnable", false);
runahead_frames = static_cast<u32>(si.GetIntValue("Main", "RunaheadFrames", 1));
cpu_execution_mode =
ParseCPUExecutionMode(
@ -301,6 +303,8 @@ void Settings::Save(SettingsInterface& si) const
si.SetBoolValue("Main", "RewindEnable", rewind_enable);
si.SetFloatValue("Main", "RewindFrequency", rewind_save_frequency);
si.SetIntValue("Main", "RewindSaveSlots", rewind_save_slots);
si.SetBoolValue("Main", "RunaheadEnable", runahead_enable);
si.SetFloatValue("Main", "RunaheadFrames", runahead_frames);
si.SetStringValue("CPU", "ExecutionMode", GetCPUExecutionModeName(cpu_execution_mode));
si.SetBoolValue("CPU", "OverclockEnable", cpu_overclock_enable);