Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions osu.Framework/Configuration/FrameSync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ public enum FrameSync

[Description("Basically unlimited")]
Unlimited,

Custom,
}
}
2 changes: 2 additions & 0 deletions osu.Framework/Configuration/FrameworkConfigManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -103,6 +104,7 @@ public enum FrameworkSetting
WindowMode,
ConfineMouseMode,
FrameSync,
CustomDrawLimit,
ExecutionMode,

ShowUnicode,
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ public bool OnPressed(KeyBindingPressEvent<FrameworkAction> e)
case FrameworkAction.CycleFrameSync:
var nextFrameSync = frameSyncMode.Value + 1;

if (nextFrameSync > FrameSync.Unlimited)
if (nextFrameSync > FrameSync.Custom)
Comment thread
atomicf32 marked this conversation as resolved.
Outdated
nextFrameSync = FrameSync.VSync;

frameSyncMode.Value = nextFrameSync;
Expand Down
5 changes: 5 additions & 0 deletions osu.Framework/Platform/GameHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1371,6 +1371,11 @@ private void updateFrameSyncMode()
drawLimiter = int.MaxValue;
updateLimiter = int.MaxValue;
break;

case FrameSync.Custom:
drawLimiter = Config.GetBindable<int>(FrameworkSetting.CustomDrawLimit).Value;
Comment thread
atomicf32 marked this conversation as resolved.
updateLimiter = int.MaxValue;
break;
}

if (!AllowBenchmarkUnlimitedFrames)
Expand Down
Loading