mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 23:59:21 -04:00
Tweak how the Gamepad Thread sleeps/its priority.
This commit is contained in:
parent
c743662b37
commit
e6d8475a64
@ -88,11 +88,15 @@ public class Gamepad {
|
|||||||
tick();
|
tick();
|
||||||
|
|
||||||
delta--;
|
delta--;
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
sleep(Math.max((long) ((1 - delta)/ticks), 0));
|
sleep(Math.max((long) ( (1 - delta) * (1000/ticks) ), 0));
|
||||||
|
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -121,7 +125,7 @@ public class Gamepad {
|
|||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
mouseThread.setPriority(1);
|
mouseThread.setPriority(Thread.MAX_PRIORITY);
|
||||||
mouseThread.start();
|
mouseThread.start();
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user