mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 15:53:51 +08:00
Remove high performance GC setting
This commit is contained in:
parent
b6e07ff59c
commit
32bd3107e1
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System.Runtime;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -11,7 +10,6 @@ namespace osu.Game.Performance
|
|||||||
public class HighPerformanceSession : Component
|
public class HighPerformanceSession : Component
|
||||||
{
|
{
|
||||||
private readonly IBindable<bool> localUserPlaying = new Bindable<bool>();
|
private readonly IBindable<bool> localUserPlaying = new Bindable<bool>();
|
||||||
private GCLatencyMode originalGCMode;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuGame game)
|
private void load(OsuGame game)
|
||||||
@ -34,14 +32,10 @@ namespace osu.Game.Performance
|
|||||||
|
|
||||||
protected virtual void EnableHighPerformanceSession()
|
protected virtual void EnableHighPerformanceSession()
|
||||||
{
|
{
|
||||||
originalGCMode = GCSettings.LatencyMode;
|
|
||||||
GCSettings.LatencyMode = GCLatencyMode.LowLatency;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void DisableHighPerformanceSession()
|
protected virtual void DisableHighPerformanceSession()
|
||||||
{
|
{
|
||||||
if (GCSettings.LatencyMode == GCLatencyMode.LowLatency)
|
|
||||||
GCSettings.LatencyMode = originalGCMode;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user