mirror of
https://github.com/ppy/osu
synced 2025-01-19 04:20:59 +00:00
Ensure PresentGameplay
doesn't get stuck in loop if no beatmaps available
This commit is contained in:
parent
2fdbc501c2
commit
451ba1c861
@ -136,10 +136,15 @@ namespace osu.Game.Overlays.SkinEditor
|
|||||||
globallyReenableBeatmapSkinSetting();
|
globallyReenableBeatmapSkinSetting();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PresentGameplay()
|
public void PresentGameplay() => presentGameplay(false);
|
||||||
|
|
||||||
|
private void presentGameplay(bool attemptedBeatmapSwitch)
|
||||||
{
|
{
|
||||||
performer?.PerformFromScreen(screen =>
|
performer?.PerformFromScreen(screen =>
|
||||||
{
|
{
|
||||||
|
if (State.Value != Visibility.Visible)
|
||||||
|
return;
|
||||||
|
|
||||||
if (beatmap.Value is DummyWorkingBeatmap)
|
if (beatmap.Value is DummyWorkingBeatmap)
|
||||||
{
|
{
|
||||||
// presume we don't have anything good to play and just bail.
|
// presume we don't have anything good to play and just bail.
|
||||||
@ -149,8 +154,12 @@ namespace osu.Game.Overlays.SkinEditor
|
|||||||
// If we're playing the intro, switch away to another beatmap.
|
// If we're playing the intro, switch away to another beatmap.
|
||||||
if (beatmap.Value.BeatmapSetInfo.Protected)
|
if (beatmap.Value.BeatmapSetInfo.Protected)
|
||||||
{
|
{
|
||||||
music.NextTrack();
|
if (!attemptedBeatmapSwitch)
|
||||||
Schedule(PresentGameplay);
|
{
|
||||||
|
music.NextTrack();
|
||||||
|
Schedule(() => presentGameplay(true));
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user