From 8903f286efa4e92c6276fc18ea29af29d0b5f8d2 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Thu, 26 Dec 2019 18:27:48 +0900 Subject: [PATCH] Fix escape not continuing to results screen --- osu.Game/Screens/Play/Player.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 8970f9ac88..ab32c55229 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -541,8 +541,14 @@ namespace osu.Game.Screens.Play { if (completionProgressDelegate != null && !completionProgressDelegate.Cancelled && !completionProgressDelegate.Completed) { - // proceed to result screen if beatmap already finished playing - completionProgressDelegate.RunTask(); + // Proceed to result screen if beatmap already finished playing. + // This is scheduled since the player needs to become the current screen before the delegate runs. This happens after the return true. + Scheduler.Add(() => + { + if (!completionProgressDelegate.Completed && !completionProgressDelegate.Cancelled) + completionProgressDelegate.RunTask(); + }); + return true; }