diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 486203160..a5e8bb012 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -171,8 +171,8 @@ void Settings::Load(const SettingsInterface& si, const SettingsInterface& contro enable_discord_presence = si.GetBoolValue("Main", "EnableDiscordPresence", false); rewind_enable = si.GetBoolValue("Main", "RewindEnable", false); rewind_save_frequency = si.GetFloatValue("Main", "RewindFrequency", 10.0f); - rewind_save_slots = static_cast(si.GetUIntValue("Main", "RewindSaveSlots", 10u)); - runahead_frames = static_cast(si.GetUIntValue("Main", "RunaheadFrameCount", 0u)); + rewind_save_slots = static_cast(std::min(si.GetUIntValue("Main", "RewindSaveSlots", 10u), 65535u)); + runahead_frames = static_cast(std::min(si.GetUIntValue("Main", "RunaheadFrameCount", 0u), 255u)); cpu_execution_mode = ParseCPUExecutionMode( diff --git a/src/core/settings.h b/src/core/settings.h index 2640cbc0e..418bacc25 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -91,7 +91,7 @@ struct Settings bool rewind_enable : 1 = false; float rewind_save_frequency = 10.0f; - u8 rewind_save_slots = 10; + u16 rewind_save_slots = 10; u8 runahead_frames = 0; GPURenderer gpu_renderer = DEFAULT_GPU_RENDERER;