[Input pipe] Try to fix thread not attached

This commit is contained in:
khanhduytran0
2020-11-06 05:20:41 +07:00
parent 5428dbdf61
commit 5d67ce24c6
2 changed files with 16 additions and 12 deletions

View File

@@ -28,10 +28,10 @@ public class CallbackBridge {
sendMouseKeycode(button, 0, state == 1);
}
private static boolean attached;
private static boolean threadAttached;
public static void sendCursorPos(int x, int y) {
if (!attached) {
attached = CallbackBridge.nativeAttachThreadToOther(true, MainActivity.isInputStackCall);
if (!threadAttached) {
threadAttached = CallbackBridge.nativeAttachThreadToOther(true, MainActivity.isInputStackCall);
}
DEBUG_STRING.append("CursorPos=" + x + ", " + y + "\n");