mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 07:39:00 -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();
|
||||
|
||||
delta--;
|
||||
|
||||
|
||||
try {
|
||||
sleep(Math.max((long) ((1 - delta)/ticks), 0));
|
||||
sleep(Math.max((long) ( (1 - delta) * (1000/ticks) ), 0));
|
||||
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -121,7 +125,7 @@ public class Gamepad {
|
||||
|
||||
}
|
||||
};
|
||||
mouseThread.setPriority(1);
|
||||
mouseThread.setPriority(Thread.MAX_PRIORITY);
|
||||
mouseThread.start();
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user