1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:02:53 +08:00

Merge branch 'master' into non-null-ruleset

This commit is contained in:
Dan Balasescu 2018-07-02 15:32:55 +09:00 committed by GitHub
commit e5947cc969
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 6 deletions

View File

@ -40,7 +40,14 @@ namespace osu.Game.Screens
while (screen.LoadState < LoadState.Ready)
Thread.Sleep(1);
base.Push(screen);
try
{
base.Push(screen);
}
catch (ScreenAlreadyExitedException)
{
// screen may have exited before the push was successful.
}
}
protected override void Update()

View File

@ -180,11 +180,10 @@ namespace osu.Game.Screens
if (Background != null && !Background.Equals(nextOsu?.Background))
{
if (nextOsu != null)
//We need to use MakeCurrent in case we are jumping up multiple game screens.
nextOsu.Background?.MakeCurrent();
else
Background.Exit();
Background.Exit();
//We need to use MakeCurrent in case we are jumping up multiple game screens.
nextOsu?.Background?.MakeCurrent();
}
if (base.OnExiting(next))