mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:03:08 +08:00
fixes MusicController constantly trying to start a track
In Detail: It tried to start a track if the current one ended even if no BeatmapSets were present. Also if only one BeatmapSet is present if will loop by itself now.
This commit is contained in:
parent
5a6f59bed0
commit
a1dbd7916b
@ -149,6 +149,12 @@ namespace osu.Game.Overlays.Music
|
||||
private void playSpecified(BeatmapInfo info)
|
||||
{
|
||||
beatmapBacking.Value = beatmaps.GetWorkingBeatmap(info, beatmapBacking);
|
||||
|
||||
if (BeatmapSets.Count() == 1)
|
||||
beatmapBacking.Value.Track.Looping = true;
|
||||
else
|
||||
beatmapBacking.Value.Track.Looping = false;
|
||||
|
||||
beatmapBacking.Value.Track.Start();
|
||||
}
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
playButton.Icon = track.IsRunning ? FontAwesome.fa_pause_circle_o : FontAwesome.fa_play_circle_o;
|
||||
|
||||
if (track.HasCompleted && !track.Looping && !beatmapBacking.Disabled)
|
||||
if (track.HasCompleted && !beatmapBacking.Disabled && playlist.BeatmapSets.Any())
|
||||
next();
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user