mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:42:55 +08:00
Fix tests failing when run headless
This commit is contained in:
parent
9da99a0ddf
commit
b924aa3296
@ -19,7 +19,9 @@ namespace osu.Game.Tests.Visual.Settings
|
|||||||
public override void SetUpSteps()
|
public override void SetUpSteps()
|
||||||
{
|
{
|
||||||
base.SetUpSteps();
|
base.SetUpSteps();
|
||||||
|
|
||||||
AddStep("Load screen", () => LoadScreen(latencyCertifier = new LatencyCertifierScreen()));
|
AddStep("Load screen", () => LoadScreen(latencyCertifier = new LatencyCertifierScreen()));
|
||||||
|
AddUntilStep("wait for load", () => latencyCertifier.IsLoaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -33,7 +35,6 @@ namespace osu.Game.Tests.Visual.Settings
|
|||||||
}
|
}
|
||||||
|
|
||||||
AddAssert("check at results", () => !latencyCertifier.ChildrenOfType<LatencyArea>().Any());
|
AddAssert("check at results", () => !latencyCertifier.ChildrenOfType<LatencyArea>().Any());
|
||||||
|
|
||||||
AddAssert("check no buttons", () => !latencyCertifier.ChildrenOfType<OsuButton>().Any());
|
AddAssert("check no buttons", () => !latencyCertifier.ChildrenOfType<OsuButton>().Any());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ Do whatever you need to try and perceive the difference in latency, then choose
|
|||||||
{
|
{
|
||||||
mainArea.Clear();
|
mainArea.Clear();
|
||||||
|
|
||||||
var displayMode = host.Window.CurrentDisplayMode.Value;
|
var displayMode = host.Window?.CurrentDisplayMode.Value;
|
||||||
|
|
||||||
string exclusive = "unknown";
|
string exclusive = "unknown";
|
||||||
|
|
||||||
@ -217,7 +217,7 @@ Do whatever you need to try and perceive the difference in latency, then choose
|
|||||||
statusText.AddParagraph(string.Empty);
|
statusText.AddParagraph(string.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
statusText.AddParagraph($"Polling: {pollingMax} hz Monitor: {displayMode.RefreshRate:N0} hz Exclusive: {exclusive}", cp => cp.Font = OsuFont.Default.With(size: 15));
|
statusText.AddParagraph($"Polling: {pollingMax} hz Monitor: {displayMode?.RefreshRate ?? 0:N0} hz Exclusive: {exclusive}", cp => cp.Font = OsuFont.Default.With(size: 15));
|
||||||
|
|
||||||
statusText.AddParagraph($"Input: {host.InputThread.Clock.FramesPerSecond} hz "
|
statusText.AddParagraph($"Input: {host.InputThread.Clock.FramesPerSecond} hz "
|
||||||
+ $"Update: {host.UpdateThread.Clock.FramesPerSecond} hz "
|
+ $"Update: {host.UpdateThread.Clock.FramesPerSecond} hz "
|
||||||
|
Loading…
Reference in New Issue
Block a user