1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 09:23:06 +08:00

Ensure the correct background state is restored when skipping multiple levels

This commit is contained in:
Dean Herbert 2016-10-07 20:35:44 +09:00
parent 93f326bb9b
commit 27a26cfaaf

View File

@ -60,7 +60,13 @@ namespace osu.Game.GameModes
OsuGameMode nextOsu = next as OsuGameMode;
if (Background != null && !Background.Equals(nextOsu?.Background))
Background.Exit();
{
if (nextOsu != null)
//We need to use MakeCurrent in case we are jumping up multiple game modes.
nextOsu.Background.MakeCurrent();
else
Background.Exit();
}
return base.OnExiting(next);
}