mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Fix regression in quick exit logic
This commit is contained in:
@ -478,11 +478,11 @@ namespace osu.Game.Screens.Play
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Exits the <see cref="Player"/>.
|
/// Exits the <see cref="Player"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="userRequested">
|
/// <param name="showDialogFirst">
|
||||||
/// Whether the exit is requested by the user, or a higher-level game component.
|
/// Whether the pause or fail dialog should be shown before performing an exit.
|
||||||
/// Pausing is allowed only in the former case.
|
/// If true and a dialog is not yet displayed, the exit will be blocked the the relevant dialog will display instead.
|
||||||
/// </param>
|
/// </param>
|
||||||
protected void PerformExit(bool userRequested)
|
protected void PerformExit(bool showDialogFirst)
|
||||||
{
|
{
|
||||||
// if a restart has been requested, cancel any pending completion (user has shown intent to restart).
|
// if a restart has been requested, cancel any pending completion (user has shown intent to restart).
|
||||||
completionProgressDelegate?.Cancel();
|
completionProgressDelegate?.Cancel();
|
||||||
@ -495,7 +495,7 @@ namespace osu.Game.Screens.Play
|
|||||||
this.MakeCurrent();
|
this.MakeCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userRequested)
|
if (showDialogFirst)
|
||||||
{
|
{
|
||||||
if (ValidForResume && HasFailed && !FailOverlay.IsPresent)
|
if (ValidForResume && HasFailed && !FailOverlay.IsPresent)
|
||||||
{
|
{
|
||||||
@ -503,7 +503,7 @@ namespace osu.Game.Screens.Play
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canPause)
|
if (canPause && !GameplayClockContainer.IsPaused.Value)
|
||||||
{
|
{
|
||||||
Pause();
|
Pause();
|
||||||
return;
|
return;
|
||||||
@ -540,10 +540,7 @@ namespace osu.Game.Screens.Play
|
|||||||
sampleRestart?.Play();
|
sampleRestart?.Play();
|
||||||
RestartRequested?.Invoke();
|
RestartRequested?.Invoke();
|
||||||
|
|
||||||
if (this.IsCurrentScreen())
|
PerformExit(false);
|
||||||
PerformExit(true);
|
|
||||||
else
|
|
||||||
this.MakeCurrent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ScheduledDelegate completionProgressDelegate;
|
private ScheduledDelegate completionProgressDelegate;
|
||||||
|
Reference in New Issue
Block a user