Merge pull request #19669 from peppy/abort-load-player-more

Handle cancellation at more points during `Player` initialisation
This commit is contained in:
Dan Balasescu
2022-08-10 13:53:27 +09:00
committed by GitHub

View File

@ -249,6 +249,9 @@ namespace osu.Game.Screens.Play
// this is intentionally done in two stages to ensure things are in a loaded state before exposing the ruleset to skin sources.
GameplayClockContainer.Add(rulesetSkinProvider);
if (cancellationToken.IsCancellationRequested)
return;
rulesetSkinProvider.AddRange(new Drawable[]
{
failAnimationLayer = new FailAnimation(DrawableRuleset)
@ -279,6 +282,9 @@ namespace osu.Game.Screens.Play
},
});
if (cancellationToken.IsCancellationRequested)
return;
if (Configuration.AllowRestart)
{
rulesetSkinProvider.Add(new HotkeyRetryOverlay