mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 04:52:57 +08:00
Reset preview track when stopping instead
This commit is contained in:
parent
7f7e72705f
commit
ea624b8ad0
@ -98,6 +98,9 @@ namespace osu.Game.Audio
|
||||
|
||||
Track.Stop();
|
||||
|
||||
// Ensure the track is reset immediately on stopping, so the next time it is started it has a correct time value.
|
||||
Track.Seek(0);
|
||||
|
||||
Stopped?.Invoke();
|
||||
}
|
||||
|
||||
|
@ -75,9 +75,9 @@ namespace osu.Game.Beatmaps.Drawables.Cards.Buttons
|
||||
Playing.BindValueChanged(updateState, true);
|
||||
}
|
||||
|
||||
protected override void UpdateAfterChildren()
|
||||
protected override void Update()
|
||||
{
|
||||
base.UpdateAfterChildren();
|
||||
base.Update();
|
||||
|
||||
if (Playing.Value && previewTrack != null && previewTrack.TrackLoaded)
|
||||
progress.Value = previewTrack.CurrentTime / previewTrack.Length;
|
||||
|
Loading…
Reference in New Issue
Block a user