1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:12:54 +08:00

Make sure that the clock is only updated once per time value

This commit is contained in:
smoogipoo 2017-11-13 19:02:53 +09:00
parent 0cec51110a
commit 495155874c
2 changed files with 9 additions and 2 deletions

@ -1 +1 @@
Subproject commit 47aabeaee5a8d85a0e6769fd601736f8dc1eb051
Subproject commit 81a35518860cc533c4bf55b407c4e63d47ad11ce

View File

@ -76,6 +76,8 @@ namespace osu.Game.Rulesets.UI
#region Clock control
protected override bool ShouldProcessClock => false; // We handle processing the clock ourselves
private ManualClock clock;
private IFrameBasedClock parentClock;
@ -148,10 +150,15 @@ namespace osu.Game.Rulesets.UI
}
clock.CurrentTime = newTime.Value;
Clock.ProcessFrame();
}
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();
}