mirror of
https://github.com/ppy/osu
synced 2025-02-09 22:57:37 +00:00
Only undo adjustments in GameplayClockContainer if applied at least once
This commit is contained in:
parent
de23364608
commit
48c6279e8b
@ -214,10 +214,13 @@ namespace osu.Game.Screens.Play
|
||||
base.Update();
|
||||
}
|
||||
|
||||
private bool speedAdjustmentsApplied;
|
||||
|
||||
private void updateRate()
|
||||
{
|
||||
if (sourceClock == null) return;
|
||||
|
||||
speedAdjustmentsApplied = true;
|
||||
sourceClock.ResetSpeedAdjustments();
|
||||
|
||||
if (sourceClock is IHasTempoAdjust tempo)
|
||||
@ -239,7 +242,12 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private void removeSourceClockAdjustments()
|
||||
{
|
||||
sourceClock.ResetSpeedAdjustments();
|
||||
if (speedAdjustmentsApplied)
|
||||
{
|
||||
sourceClock.ResetSpeedAdjustments();
|
||||
speedAdjustmentsApplied = false;
|
||||
}
|
||||
|
||||
(sourceClock as IAdjustableAudioComponent)?.RemoveAdjustment(AdjustableProperty.Frequency, pauseFreqAdjust);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user