mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 16:27:26 +08:00
Fix latency certifier potentially reporting infinite mouse polling rate
This commit is contained in:
parent
75a96bbac1
commit
06f070c3ec
@ -147,7 +147,7 @@ Do whatever you need to try and perceive the difference in latency, then choose
|
|||||||
|
|
||||||
protected override bool OnMouseMove(MouseMoveEvent e)
|
protected override bool OnMouseMove(MouseMoveEvent e)
|
||||||
{
|
{
|
||||||
if (lastPoll > 0)
|
if (lastPoll > 0 && Clock.CurrentTime != lastPoll)
|
||||||
pollingMax = (int)Math.Max(pollingMax, 1000 / (Clock.CurrentTime - lastPoll));
|
pollingMax = (int)Math.Max(pollingMax, 1000 / (Clock.CurrentTime - lastPoll));
|
||||||
lastPoll = Clock.CurrentTime;
|
lastPoll = Clock.CurrentTime;
|
||||||
return base.OnMouseMove(e);
|
return base.OnMouseMove(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user