1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 04:02:57 +08:00

Merge pull request #18644 from frenzibyte/latency-certifier-infinite-polling-rate

Fix latency certifier potentially reporting infinite mouse polling rate
This commit is contained in:
Dean Herbert 2022-06-11 22:01:45 +09:00 committed by GitHub
commit 74b4878530
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);