mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-11 00:44:32 +00:00
FullscreenUI: Disable rewind options when runahead is enabled (#3589)
This commit is contained in:
@@ -2800,22 +2800,22 @@ void FullscreenUI::DrawEmulationSettingsPage()
|
||||
|
||||
MenuHeading(FSUI_VSTR("Runahead/Rewind"));
|
||||
|
||||
DrawToggleSetting(bsi, FSUI_ICONVSTR(ICON_FA_BACKWARD, "Enable Rewinding"),
|
||||
FSUI_VSTR("Saves state periodically so you can rewind any mistakes while playing."), "Main",
|
||||
"RewindEnable", false);
|
||||
|
||||
const s32 runahead_frames = GetEffectiveIntSetting(bsi, "Main", "RunaheadFrameCount", 0);
|
||||
const bool runahead_enabled = (runahead_frames > 0);
|
||||
const bool rewind_enabled = GetEffectiveBoolSetting(bsi, "Main", "RewindEnable", false);
|
||||
|
||||
DrawToggleSetting(bsi, FSUI_ICONVSTR(ICON_FA_BACKWARD, "Enable Rewinding"),
|
||||
FSUI_VSTR("Saves state periodically so you can rewind any mistakes while playing."), "Main",
|
||||
"RewindEnable", false, !runahead_enabled);
|
||||
|
||||
DrawFloatRangeSetting(
|
||||
bsi, FSUI_ICONVSTR(ICON_FA_FLOPPY_DISK, "Rewind Save Frequency"),
|
||||
FSUI_VSTR("How often a rewind state will be created. Higher frequencies have greater system requirements."), "Main",
|
||||
"RewindFrequency", 10.0f, 0.0f, 3600.0f, FSUI_CSTR("%.2f Seconds"), 1.0f, rewind_enabled);
|
||||
"RewindFrequency", 10.0f, 0.0f, 3600.0f, FSUI_CSTR("%.2f Seconds"), 1.0f, rewind_enabled && !runahead_enabled);
|
||||
DrawIntRangeSetting(
|
||||
bsi, FSUI_ICONVSTR(ICON_FA_WHISKEY_GLASS, "Rewind Save Slots"),
|
||||
FSUI_VSTR("How many saves will be kept for rewinding. Higher values have greater memory requirements."), "Main",
|
||||
"RewindSaveSlots", 10, 1, 10000, FSUI_CSTR("%d Frames"), rewind_enabled);
|
||||
"RewindSaveSlots", 10, 1, 10000, FSUI_CSTR("%d Frames"), rewind_enabled && !runahead_enabled);
|
||||
|
||||
static constexpr const std::array runahead_options = {
|
||||
FSUI_NSTR("Disabled"), FSUI_NSTR("1 Frame"), FSUI_NSTR("2 Frames"), FSUI_NSTR("3 Frames"),
|
||||
|
||||
Reference in New Issue
Block a user