1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-30 07:19:54 +08:00

Merge pull request #10146 from bdach/flaky-song-select-tests-v2

This commit is contained in:
Dean Herbert
2020-09-15 14:17:27 +09:00
committed by GitHub
Unverified
+9 -2
View File
@@ -517,6 +517,8 @@ namespace osu.Game.Screens.Select
FilterControl.Activate();
ModSelect.SelectedMods.BindTo(selectedMods);
music.TrackChanged += ensureTrackLooping;
}
private const double logo_transition = 250;
@@ -568,6 +570,7 @@ namespace osu.Game.Screens.Select
BeatmapDetails.Refresh();
music.CurrentTrack.Looping = true;
music.TrackChanged += ensureTrackLooping;
music.ResetTrackAdjustments();
if (Beatmap != null && !Beatmap.Value.BeatmapSetInfo.DeletePending)
@@ -593,6 +596,7 @@ namespace osu.Game.Screens.Select
BeatmapOptions.Hide();
music.CurrentTrack.Looping = false;
music.TrackChanged -= ensureTrackLooping;
this.ScaleTo(1.1f, 250, Easing.InSine);
@@ -614,10 +618,14 @@ namespace osu.Game.Screens.Select
FilterControl.Deactivate();
music.CurrentTrack.Looping = false;
music.TrackChanged -= ensureTrackLooping;
return false;
}
private void ensureTrackLooping(WorkingBeatmap beatmap, TrackChangeDirection changeDirection)
=> music.CurrentTrack.Looping = true;
public override bool OnBackButton()
{
if (ModSelect.State.Value == Visibility.Visible)
@@ -634,6 +642,7 @@ namespace osu.Game.Screens.Select
base.Dispose(isDisposing);
decoupledRuleset.UnbindAll();
music.TrackChanged -= ensureTrackLooping;
}
/// <summary>
@@ -653,8 +662,6 @@ namespace osu.Game.Screens.Select
beatmapInfoWedge.Beatmap = beatmap;
BeatmapDetails.Beatmap = beatmap;
music.CurrentTrack.Looping = true;
}
private readonly WeakReference<ITrack> lastTrack = new WeakReference<ITrack>(null);