Fix gamepad thread crashing when unfocused.

This commit is contained in:
SerpentSpirale 2021-05-21 17:44:58 +02:00
parent 7b8526c929
commit 78df3709ae

View File

@ -80,7 +80,7 @@ public class Gamepad {
delta--;
try {
sleep((long) ((1 - delta)/ticks));
sleep(Math.max((long) ((1 - delta)/ticks), 0));
} catch (InterruptedException e) {
e.printStackTrace();
}