Ensure FrameStabilityContainer's ElapsedTime is zero on initial seek

This commit is contained in:
Dean Herbert 2019-04-24 15:23:00 +09:00
parent 80e1568e97
commit 60328cf1fb
1 changed files with 4 additions and 0 deletions

View File

@ -110,6 +110,10 @@ private void updateClock()
// On the first update, frame-stability seeking would result in unexpected/unwanted behaviour.
// Instead we perform an initial seek to the proposed time.
manualClock.CurrentTime = newProposedTime;
// do a second process to clear out ElapsedTime
framedClock.ProcessFrame();
firstConsumption = false;
}
else if (Math.Abs(manualClock.CurrentTime - newProposedTime) > sixty_frame_time * 1.2f)