mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Merge pull request #19669 from peppy/abort-load-player-more
Handle cancellation at more points during `Player` initialisation
This commit is contained in:
commit
87133b9cc5
@ -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.
|
// 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);
|
GameplayClockContainer.Add(rulesetSkinProvider);
|
||||||
|
|
||||||
|
if (cancellationToken.IsCancellationRequested)
|
||||||
|
return;
|
||||||
|
|
||||||
rulesetSkinProvider.AddRange(new Drawable[]
|
rulesetSkinProvider.AddRange(new Drawable[]
|
||||||
{
|
{
|
||||||
failAnimationLayer = new FailAnimation(DrawableRuleset)
|
failAnimationLayer = new FailAnimation(DrawableRuleset)
|
||||||
@ -279,6 +282,9 @@ namespace osu.Game.Screens.Play
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (cancellationToken.IsCancellationRequested)
|
||||||
|
return;
|
||||||
|
|
||||||
if (Configuration.AllowRestart)
|
if (Configuration.AllowRestart)
|
||||||
{
|
{
|
||||||
rulesetSkinProvider.Add(new HotkeyRetryOverlay
|
rulesetSkinProvider.Add(new HotkeyRetryOverlay
|
||||||
|
Loading…
Reference in New Issue
Block a user