mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Make sure that the clock is only updated once per time value
This commit is contained in:
Submodule osu-framework updated: 47aabeaee5...81a3551886
@ -76,6 +76,8 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
#region Clock control
|
#region Clock control
|
||||||
|
|
||||||
|
protected override bool ShouldProcessClock => false; // We handle processing the clock ourselves
|
||||||
|
|
||||||
private ManualClock clock;
|
private ManualClock clock;
|
||||||
private IFrameBasedClock parentClock;
|
private IFrameBasedClock parentClock;
|
||||||
|
|
||||||
@ -148,10 +150,15 @@ namespace osu.Game.Rulesets.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
clock.CurrentTime = newTime.Value;
|
clock.CurrentTime = newTime.Value;
|
||||||
Clock.ProcessFrame();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
requireMoreUpdateLoops = clock.CurrentTime != parentClock.CurrentTime;
|
requireMoreUpdateLoops = clock.CurrentTime != parentClock.CurrentTime;
|
||||||
|
|
||||||
|
// The manual clock time has changed in the above code. The framed clock now needs to be updated
|
||||||
|
// to ensure that the its time is valid for our children before input is processed
|
||||||
|
Clock.ProcessFrame();
|
||||||
|
|
||||||
|
// Process input
|
||||||
base.Update();
|
base.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user