mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 08:35:37 -04:00
Set a lower priority for the mouseGrab thread.
This commit is contained in:
parent
af1f0d678b
commit
2d818e8786
@ -213,7 +213,7 @@ public class BaseMainActivity extends LoggableActivity {
|
|||||||
this.drawerLayout.closeDrawers();
|
this.drawerLayout.closeDrawers();
|
||||||
|
|
||||||
placeMouseAt(CallbackBridge.physicalWidth / 2, CallbackBridge.physicalHeight / 2);
|
placeMouseAt(CallbackBridge.physicalWidth / 2, CallbackBridge.physicalHeight / 2);
|
||||||
new Thread(() -> {
|
Thread virtualMouseGrabThread = new Thread(() -> {
|
||||||
while (!isExited) {
|
while (!isExited) {
|
||||||
if (lastGrab != CallbackBridge.isGrabbing())
|
if (lastGrab != CallbackBridge.isGrabbing())
|
||||||
mousePointer.post(() -> {
|
mousePointer.post(() -> {
|
||||||
@ -230,8 +230,9 @@ public class BaseMainActivity extends LoggableActivity {
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}, "VirtualMouseGrabThread").start();
|
}, "VirtualMouseGrabThread");
|
||||||
|
virtualMouseGrabThread.setPriority(Thread.MIN_PRIORITY);
|
||||||
|
virtualMouseGrabThread.start();
|
||||||
|
|
||||||
if (isAndroid8OrHigher()) {
|
if (isAndroid8OrHigher()) {
|
||||||
touchPad.setDefaultFocusHighlightEnabled(false);
|
touchPad.setDefaultFocusHighlightEnabled(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user