Fix escape not continuing to results screen

This commit is contained in:
smoogipoo 2019-12-26 18:27:48 +09:00
parent 5a11fe9a84
commit 8903f286ef
1 changed files with 8 additions and 2 deletions

View File

@ -541,8 +541,14 @@ public override bool OnExiting(IScreen next)
{
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;
}