diff --git a/osu.Framework/Configuration/FrameSync.cs b/osu.Framework/Configuration/FrameSync.cs index 2630c2b06c..4d200df730 100644 --- a/osu.Framework/Configuration/FrameSync.cs +++ b/osu.Framework/Configuration/FrameSync.cs @@ -23,5 +23,7 @@ public enum FrameSync [Description("Basically unlimited")] Unlimited, + + Custom, } } diff --git a/osu.Framework/Configuration/FrameworkConfigManager.cs b/osu.Framework/Configuration/FrameworkConfigManager.cs index 8a1f261ab0..982c7aa365 100644 --- a/osu.Framework/Configuration/FrameworkConfigManager.cs +++ b/osu.Framework/Configuration/FrameworkConfigManager.cs @@ -40,6 +40,7 @@ protected override void InitialiseDefaults() SetDefault(FrameworkSetting.SizeFullscreen, new Size(9999, 9999), new Size(320, 240)); SetDefault(FrameworkSetting.MinimiseOnFocusLossInFullscreen, RuntimeInfo.IsDesktop); SetDefault(FrameworkSetting.FrameSync, FrameSync.Limit2x); + SetDefault(FrameworkSetting.CustomDrawLimit, 0, 0, 1000); SetDefault(FrameworkSetting.WindowMode, WindowMode.Windowed); SetDefault(FrameworkSetting.Renderer, RendererType.Automatic); SetDefault(FrameworkSetting.ShowUnicode, false); @@ -103,6 +104,7 @@ public enum FrameworkSetting WindowMode, ConfineMouseMode, FrameSync, + CustomDrawLimit, ExecutionMode, ShowUnicode, diff --git a/osu.Framework/Platform/GameHost.cs b/osu.Framework/Platform/GameHost.cs index a29c197f2d..d2ce0393ad 100644 --- a/osu.Framework/Platform/GameHost.cs +++ b/osu.Framework/Platform/GameHost.cs @@ -1371,6 +1371,11 @@ private void updateFrameSyncMode() drawLimiter = int.MaxValue; updateLimiter = int.MaxValue; break; + + case FrameSync.Custom: + drawLimiter = Config.GetBindable(FrameworkSetting.CustomDrawLimit).Value; + updateLimiter = int.MaxValue; + break; } if (!AllowBenchmarkUnlimitedFrames)