Allow custom MaxCatchUpFrames to be specified

Also adjusts the default to allow for smoother seeking.
This commit is contained in:
Dean Herbert
2019-05-09 16:37:34 +09:00
parent 66594b7a1b
commit 3bcfc86b9c
2 changed files with 11 additions and 4 deletions

View File

@ -103,7 +103,11 @@ namespace osu.Game.Tests.Visual.Gameplay
checkFrameCount(0);
}
private void createStabilityContainer() => AddStep("create container", () => mainContainer.Child = new FrameStabilityContainer().WithChild(consumer = new ClockConsumingChild()));
private const int max_frames_catchup = 50;
private void createStabilityContainer(double gameplayStartTime = double.MinValue) => AddStep("create container", () =>
mainContainer.Child = new FrameStabilityContainer(gameplayStartTime) { MaxCatchUpFrames = max_frames_catchup }
.WithChild(consumer = new ClockConsumingChild()));
private void seekManualTo(double time) => AddStep($"seek manual clock to {time}", () => manualClock.CurrentTime = time);