Fix background screens not supporting early-exit condition

Closes #2681.
This commit is contained in:
Dean Herbert
2018-06-20 12:43:48 +09:00
parent a01a0b7d52
commit b95042e370
3 changed files with 14 additions and 8 deletions

View File

@ -195,11 +195,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))