From 06f070c3ec118a6f1b8df8430c5c046b0c4bed3f Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sat, 11 Jun 2022 14:58:16 +0300 Subject: [PATCH] Fix latency certifier potentially reporting infinite mouse polling rate --- osu.Game/Screens/Utility/LatencyCertifierScreen.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Utility/LatencyCertifierScreen.cs b/osu.Game/Screens/Utility/LatencyCertifierScreen.cs index 0a9d98450f..5c12dd3a83 100644 --- a/osu.Game/Screens/Utility/LatencyCertifierScreen.cs +++ b/osu.Game/Screens/Utility/LatencyCertifierScreen.cs @@ -147,7 +147,7 @@ Do whatever you need to try and perceive the difference in latency, then choose protected override bool OnMouseMove(MouseMoveEvent e) { - if (lastPoll > 0) + if (lastPoll > 0 && Clock.CurrentTime != lastPoll) pollingMax = (int)Math.Max(pollingMax, 1000 / (Clock.CurrentTime - lastPoll)); lastPoll = Clock.CurrentTime; return base.OnMouseMove(e);