1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 19:27:24 +08:00

Make class not overrideable

This commit is contained in:
Dan Balasescu 2024-02-27 17:33:24 +09:00
parent bfb5098238
commit f2d52fbaa2
No known key found for this signature in database
2 changed files with 5 additions and 7 deletions

View File

@ -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);

View File

@ -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;