mirror of
https://github.com/ppy/osu.git
synced 2025-03-16 04:57:19 +08: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();
|
base.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool speedAdjustmentsApplied;
|
||||||
|
|
||||||
private void updateRate()
|
private void updateRate()
|
||||||
{
|
{
|
||||||
if (sourceClock == null) return;
|
if (sourceClock == null) return;
|
||||||
|
|
||||||
|
speedAdjustmentsApplied = true;
|
||||||
sourceClock.ResetSpeedAdjustments();
|
sourceClock.ResetSpeedAdjustments();
|
||||||
|
|
||||||
if (sourceClock is IHasTempoAdjust tempo)
|
if (sourceClock is IHasTempoAdjust tempo)
|
||||||
@ -238,8 +241,13 @@ namespace osu.Game.Screens.Play
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void removeSourceClockAdjustments()
|
private void removeSourceClockAdjustments()
|
||||||
|
{
|
||||||
|
if (speedAdjustmentsApplied)
|
||||||
{
|
{
|
||||||
sourceClock.ResetSpeedAdjustments();
|
sourceClock.ResetSpeedAdjustments();
|
||||||
|
speedAdjustmentsApplied = false;
|
||||||
|
}
|
||||||
|
|
||||||
(sourceClock as IAdjustableAudioComponent)?.RemoveAdjustment(AdjustableProperty.Frequency, pauseFreqAdjust);
|
(sourceClock as IAdjustableAudioComponent)?.RemoveAdjustment(AdjustableProperty.Frequency, pauseFreqAdjust);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user