1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-03 11:30:49 +08:00

End high performance session when showing results screen

This commit is contained in:
Dean Herbert
2024-09-09 18:30:15 +09:00
Unverified
parent 81fb058c9a
commit 67c6f8acdd
+6
View File
@@ -58,6 +58,11 @@ namespace osu.Game.Screens.Play
public override bool AllowUserExit => false; // handled by HoldForMenuButton
/// <summary>
/// Raised after all gameplay has finished.
/// </summary>
public event Action OnShowingResults;
protected override bool PlayExitSound => !isRestarting;
protected override UserActivity InitialActivity => new UserActivity.InSoloGame(Beatmap.Value.BeatmapInfo, Ruleset.Value);
@@ -873,6 +878,7 @@ namespace osu.Game.Screens.Play
// This player instance may already be in the process of exiting.
return;
OnShowingResults?.Invoke();
this.Push(CreateResults(prepareScoreForDisplayTask.GetResultSafely()));
}, Time.Current + delay, 50);