mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Add failing test
This commit is contained in:
@ -55,7 +55,9 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
protected override bool PlayResumeSound => false;
|
||||
|
||||
private Task loadTask;
|
||||
protected Task LoadTask;
|
||||
|
||||
protected Task DisposalTask;
|
||||
|
||||
private InputManager inputManager;
|
||||
private IdleTracker idleTracker;
|
||||
@ -159,7 +161,7 @@ namespace osu.Game.Screens.Play
|
||||
player.RestartCount = restartCount;
|
||||
player.RestartRequested = restartRequested;
|
||||
|
||||
loadTask = LoadComponentAsync(player, _ => info.Loading = false);
|
||||
LoadTask = LoadComponentAsync(player, _ => info.Loading = false);
|
||||
}
|
||||
|
||||
private void contentIn()
|
||||
@ -250,7 +252,7 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
if (!this.IsCurrentScreen()) return;
|
||||
|
||||
loadTask = null;
|
||||
LoadTask = null;
|
||||
|
||||
//By default, we want to load the player and never be returned to.
|
||||
//Note that this may change if the player we load requested a re-run.
|
||||
@ -301,7 +303,7 @@ namespace osu.Game.Screens.Play
|
||||
if (isDisposing)
|
||||
{
|
||||
// if the player never got pushed, we should explicitly dispose it.
|
||||
loadTask?.ContinueWith(_ => player.Dispose());
|
||||
DisposalTask = LoadTask?.ContinueWith(_ => player.Dispose());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user