diff --git a/osu.Game/Overlays/Settings/Sections/Debug/GCSettings.cs b/osu.Game/Overlays/Settings/Sections/Debug/GCSettings.cs index 9f550413f3..b14a4b8773 100644 --- a/osu.Game/Overlays/Settings/Sections/Debug/GCSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Debug/GCSettings.cs @@ -13,15 +13,18 @@ namespace osu.Game.Overlays.Settings.Sections.Debug { protected override string Header => "Garbage Collector"; + private readonly Bindable latencyMode = new Bindable(); + private Bindable configLatencyMode; + [BackgroundDependencyLoader] private void load(FrameworkDebugConfigManager config) { Children = new Drawable[] { - new SettingsEnumDropdown + new SettingsEnumDropdown { LabelText = "Active mode", - Bindable = config.GetBindable(DebugSetting.ActiveGCMode) + Bindable = latencyMode }, new SettingsButton { @@ -29,6 +32,18 @@ namespace osu.Game.Overlays.Settings.Sections.Debug Action = GC.Collect }, }; + + configLatencyMode = config.GetBindable(DebugSetting.ActiveGCMode); + configLatencyMode.BindValueChanged(v => latencyMode.Value = (LatencyMode)v, true); + latencyMode.BindValueChanged(v => configLatencyMode.Value = (GCLatencyMode)v); + } + + private enum LatencyMode + { + Batch = GCLatencyMode.Batch, + Interactive = GCLatencyMode.Interactive, + LowLatency = GCLatencyMode.LowLatency, + SustainedLowLatency = GCLatencyMode.SustainedLowLatency } } }