diff --git a/osu.Game/Screens/Select/PlaySongSelect.cs b/osu.Game/Screens/Select/PlaySongSelect.cs index 8f91f1ed0f..3960a4ea65 100644 --- a/osu.Game/Screens/Select/PlaySongSelect.cs +++ b/osu.Game/Screens/Select/PlaySongSelect.cs @@ -65,6 +65,8 @@ namespace osu.Game.Screens.Select protected override void OnResuming(Screen last) { player = null; + Beatmap.Track.Looping = false; + base.OnResuming(last); } @@ -83,13 +85,19 @@ namespace osu.Game.Screens.Select return true; } - return base.OnExiting(next); + if (base.OnExiting(next)) + return true; + + Beatmap.Track.Looping = false; + return false; } protected override void OnSelected() { if (player != null) return; + Beatmap.Track.Looping = false; + LoadComponentAsync(player = new PlayerLoader(new Player { Beatmap = Beatmap, //eagerly set this so it's present before push. diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index 57d844e214..dca65d1837 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -348,6 +348,7 @@ namespace osu.Game.Screens.Select trackManager.SetExclusive(track); if (preview) track.Seek(Beatmap.Metadata.PreviewTime); + track.Looping = true; track.Start(); } } @@ -365,13 +366,6 @@ namespace osu.Game.Screens.Select dialogOverlay?.Push(new BeatmapDeleteDialog(Beatmap)); } - protected override void Update() - { - base.Update(); - - ensurePlayingSelected(); - } - protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) { if (args.Repeat) return false;