1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 07:22:55 +08:00

Fix track-adjusting mods not applying after resuming from anoth… (#6299)

Fix track-adjusting mods not applying after resuming from another screen

Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
Dean Herbert 2019-09-28 19:53:20 +08:00 committed by GitHub
commit a55d060791
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -57,7 +57,7 @@ namespace osu.Game.Overlays
protected override void LoadComplete() protected override void LoadComplete()
{ {
beatmap.BindValueChanged(beatmapChanged, true); beatmap.BindValueChanged(beatmapChanged, true);
mods.BindValueChanged(_ => updateAudioAdjustments(), true); mods.BindValueChanged(_ => ResetTrackAdjustments(), true);
base.LoadComplete(); base.LoadComplete();
} }
@ -213,12 +213,12 @@ namespace osu.Game.Overlays
current = beatmap.NewValue; current = beatmap.NewValue;
TrackChanged?.Invoke(current, direction); TrackChanged?.Invoke(current, direction);
updateAudioAdjustments(); ResetTrackAdjustments();
queuedDirection = null; queuedDirection = null;
} }
private void updateAudioAdjustments() public void ResetTrackAdjustments()
{ {
var track = current?.Track; var track = current?.Track;
if (track == null) if (track == null)

View File

@ -490,6 +490,7 @@ namespace osu.Game.Screens.Select
BeatmapDetails.Leaderboard.RefreshScores(); BeatmapDetails.Leaderboard.RefreshScores();
Beatmap.Value.Track.Looping = true; Beatmap.Value.Track.Looping = true;
music?.ResetTrackAdjustments();
if (Beatmap != null && !Beatmap.Value.BeatmapSetInfo.DeletePending) if (Beatmap != null && !Beatmap.Value.BeatmapSetInfo.DeletePending)
{ {