mirror of
https://github.com/ppy/osu
synced 2024-12-26 08:53:10 +00:00
Make class not overrideable
This commit is contained in:
parent
bfb5098238
commit
f2d52fbaa2
@ -792,8 +792,6 @@ namespace osu.Game
|
||||
|
||||
protected virtual UpdateManager CreateUpdateManager() => new UpdateManager();
|
||||
|
||||
protected virtual HighPerformanceSessionManager CreateHighPerformanceSessionManager() => new HighPerformanceSessionManager();
|
||||
|
||||
protected override Container CreateScalingContainer() => new ScalingContainer(ScalingMode.Everything);
|
||||
|
||||
#region Beatmap progression
|
||||
@ -1088,7 +1086,7 @@ namespace osu.Game
|
||||
loadComponentSingleFile(new AccountCreationOverlay(), topMostOverlayContent.Add, true);
|
||||
loadComponentSingleFile<IDialogOverlay>(new DialogOverlay(), topMostOverlayContent.Add, true);
|
||||
|
||||
loadComponentSingleFile(CreateHighPerformanceSessionManager(), Add, true);
|
||||
loadComponentSingleFile(new HighPerformanceSessionManager(), Add, true);
|
||||
|
||||
loadComponentSingleFile(new BackgroundDataStoreProcessor(), Add);
|
||||
|
||||
|
@ -14,11 +14,11 @@ namespace osu.Game.Performance
|
||||
|
||||
public IDisposable BeginSession()
|
||||
{
|
||||
EnableHighPerformanceSession();
|
||||
return new InvokeOnDisposal<HighPerformanceSessionManager>(this, static m => m.DisableHighPerformanceSession());
|
||||
enableHighPerformanceSession();
|
||||
return new InvokeOnDisposal<HighPerformanceSessionManager>(this, static m => m.disableHighPerformanceSession());
|
||||
}
|
||||
|
||||
protected virtual void EnableHighPerformanceSession()
|
||||
private void enableHighPerformanceSession()
|
||||
{
|
||||
originalGCMode = GCSettings.LatencyMode;
|
||||
GCSettings.LatencyMode = GCLatencyMode.LowLatency;
|
||||
@ -27,7 +27,7 @@ namespace osu.Game.Performance
|
||||
GC.Collect(0);
|
||||
}
|
||||
|
||||
protected virtual void DisableHighPerformanceSession()
|
||||
private void disableHighPerformanceSession()
|
||||
{
|
||||
if (GCSettings.LatencyMode == GCLatencyMode.LowLatency)
|
||||
GCSettings.LatencyMode = originalGCMode;
|
||||
|
Loading…
Reference in New Issue
Block a user