mirror of https://github.com/ppy/osu
Fix idle tracker assuming time starts at 0
`IdleTracker` in its construction quietly assumed that the clock it receives from its parent starts ticking from 0 at the point at which it is passed down. This is not necessarily the case when headless executions are involved, which means that the initial state of the tracker could be computed as idle incorrectly. Resolve by explicitly reading the clock time at the point of `LoadComplete()`.
This commit is contained in:
parent
3eb2fb7e89
commit
250c7403e8
|
@ -42,6 +42,12 @@ public IdleTracker(double timeToIdle)
|
|||
RelativeSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
updateLastInteractionTime();
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
|
Loading…
Reference in New Issue