Use better logic

This commit is contained in:
Dean Herbert 2018-07-13 21:08:41 +09:00
parent a1a077398c
commit 6d8923a37c

View File

@ -189,22 +189,31 @@ namespace osu.Game
{ {
CloseAllOverlays(false); CloseAllOverlays(false);
void setBeatmap() => Beatmap.Value = BeatmapManager.GetWorkingBeatmap(beatmap.Beatmaps.First()); void setBeatmap()
{
if (Beatmap.Disabled)
{
Schedule(setBeatmap);
return;
}
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(beatmap.Beatmaps.First());
};
switch (currentScreen) switch (currentScreen)
{ {
case SongSelect _: case SongSelect _:
setBeatmap();
break; break;
default: default:
// navigate to song select if we are not already there. // navigate to song select if we are not already there.
var menu = (MainMenu)intro.ChildScreen; var menu = (MainMenu)intro.ChildScreen;
menu.MakeCurrent(); menu.MakeCurrent();
setBeatmap();
menu.LoadToSolo(); menu.LoadToSolo();
break; break;
} }
setBeatmap();
} }
/// <summary> /// <summary>