mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 18:27:26 +08:00
Remove GC debug setting
This commit is contained in:
parent
e8ea0594b4
commit
6d0cc1f770
@ -2,9 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Runtime;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
|
||||
@ -14,37 +12,17 @@ namespace osu.Game.Overlays.Settings.Sections.Debug
|
||||
{
|
||||
protected override string Header => "Garbage Collector";
|
||||
|
||||
private readonly Bindable<LatencyMode> latencyMode = new Bindable<LatencyMode>();
|
||||
private Bindable<GCLatencyMode> configLatencyMode;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(FrameworkDebugConfigManager config)
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SettingsEnumDropdown<LatencyMode>
|
||||
{
|
||||
LabelText = "Active mode",
|
||||
Bindable = latencyMode
|
||||
},
|
||||
new SettingsButton
|
||||
{
|
||||
Text = "Force garbage collection",
|
||||
Action = GC.Collect
|
||||
},
|
||||
};
|
||||
|
||||
configLatencyMode = config.GetBindable<GCLatencyMode>(DebugSetting.ActiveGCMode);
|
||||
configLatencyMode.BindValueChanged(mode => latencyMode.Value = (LatencyMode)mode.NewValue, true);
|
||||
latencyMode.BindValueChanged(mode => configLatencyMode.Value = (GCLatencyMode)mode.NewValue);
|
||||
}
|
||||
|
||||
private enum LatencyMode
|
||||
{
|
||||
Batch = GCLatencyMode.Batch,
|
||||
Interactive = GCLatencyMode.Interactive,
|
||||
LowLatency = GCLatencyMode.LowLatency,
|
||||
SustainedLowLatency = GCLatencyMode.SustainedLowLatency
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user