mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 18:32:56 +08:00
Merge pull request #10146 from bdach/flaky-song-select-tests-v2
This commit is contained in:
commit
75d0797cf8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user