diff --git a/osu-framework b/osu-framework index 241133f0a6..d8d4f55e10 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 241133f0a65326a563ba23b7166167a882d1d5cb +Subproject commit d8d4f55e10ac553223db75874bae6ae4894b739a diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index 31e7313c0b..89082cfbd5 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -139,8 +139,7 @@ namespace osu.Game.Screens.Play { // as the pushDebounce below has a delay, we need to keep checking and cancel a future debounce // if we become unready for push during the delay. - pushDebounce?.Cancel(); - pushDebounce = null; + cancelLoad(); return; } @@ -172,10 +171,23 @@ namespace osu.Game.Screens.Play } } + private void cancelLoad() + { + pushDebounce?.Cancel(); + pushDebounce = null; + } + + protected override void OnSuspending(Screen next) + { + base.OnSuspending(next); + cancelLoad(); + } + protected override bool OnExiting(Screen next) { Content.ScaleTo(0.7f, 150, Easing.InQuint); this.FadeOut(150); + cancelLoad(); return base.OnExiting(next); }