1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 07:42:55 +08:00

Rename to latency certifier

This commit is contained in:
Dean Herbert 2022-06-07 23:34:19 +09:00
parent 1a1dfaeae6
commit 9da99a0ddf
3 changed files with 11 additions and 12 deletions

View File

@ -12,14 +12,14 @@ using osuTK.Input;
namespace osu.Game.Tests.Visual.Settings namespace osu.Game.Tests.Visual.Settings
{ {
public class TestSceneLatencyComparer : ScreenTestScene public class TestSceneLatencyCertifierScreen : ScreenTestScene
{ {
private LatencyComparerScreen latencyComparer = null!; private LatencyCertifierScreen latencyCertifier = null!;
public override void SetUpSteps() public override void SetUpSteps()
{ {
base.SetUpSteps(); base.SetUpSteps();
AddStep("Load screen", () => LoadScreen(latencyComparer = new LatencyComparerScreen())); AddStep("Load screen", () => LoadScreen(latencyCertifier = new LatencyCertifierScreen()));
} }
[Test] [Test]
@ -28,20 +28,20 @@ namespace osu.Game.Tests.Visual.Settings
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
{ {
clickCorrectUntilResults(); clickCorrectUntilResults();
AddAssert("check at results", () => !latencyComparer.ChildrenOfType<LatencyArea>().Any()); AddAssert("check at results", () => !latencyCertifier.ChildrenOfType<LatencyArea>().Any());
AddStep("hit c to continue", () => InputManager.Key(Key.C)); AddStep("hit c to continue", () => InputManager.Key(Key.C));
} }
AddAssert("check at results", () => !latencyComparer.ChildrenOfType<LatencyArea>().Any()); AddAssert("check at results", () => !latencyCertifier.ChildrenOfType<LatencyArea>().Any());
AddAssert("check no buttons", () => !latencyComparer.ChildrenOfType<OsuButton>().Any()); AddAssert("check no buttons", () => !latencyCertifier.ChildrenOfType<OsuButton>().Any());
} }
private void clickCorrectUntilResults() private void clickCorrectUntilResults()
{ {
AddUntilStep("click correct button until results", () => AddUntilStep("click correct button until results", () =>
{ {
var latencyArea = latencyComparer var latencyArea = latencyCertifier
.ChildrenOfType<LatencyArea>() .ChildrenOfType<LatencyArea>()
.SingleOrDefault(a => a.TargetFrameRate == 0); .SingleOrDefault(a => a.TargetFrameRate == 0);

View File

@ -40,7 +40,7 @@ namespace osu.Game.Overlays.Settings.Sections.DebugSettings
new SettingsButton new SettingsButton
{ {
Text = @"Run latency comparer", Text = @"Run latency comparer",
Action = () => performer?.PerformFromScreen(menu => menu.Push(new LatencyComparerScreen())) Action = () => performer?.PerformFromScreen(menu => menu.Push(new LatencyCertifierScreen()))
} }
}; };
} }

View File

@ -29,7 +29,7 @@ using osuTK.Input;
namespace osu.Game.Screens.Utility namespace osu.Game.Screens.Utility
{ {
public class LatencyComparerScreen : OsuScreen public class LatencyCertifierScreen : OsuScreen
{ {
private FrameSync previousFrameSyncMode; private FrameSync previousFrameSyncMode;
private double previousActiveHz; private double previousActiveHz;
@ -78,7 +78,7 @@ namespace osu.Game.Screens.Utility
[Resolved] [Resolved]
private GameHost host { get; set; } = null!; private GameHost host { get; set; } = null!;
public LatencyComparerScreen() public LatencyCertifierScreen()
{ {
InternalChildren = new Drawable[] InternalChildren = new Drawable[]
{ {
@ -117,9 +117,8 @@ namespace osu.Game.Screens.Utility
TextAnchor = Anchor.TopCentre, TextAnchor = Anchor.TopCentre,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Text = @"Welcome to the latency comparer! Text = @"Welcome to the latency certifier!
Use the arrow keys, Z/X/J/K to move the square. Use the arrow keys, Z/X/J/K to move the square.
You can click the targets but you don't have to.
Use the Tab key to change focus. Use the Tab key to change focus.
Do whatever you need to try and perceive the difference in latency, then choose your best side. Do whatever you need to try and perceive the difference in latency, then choose your best side.
", ",