mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-12 22:26:56 -04:00
Add debug mouse event use stack trace (will lag) then
This commit is contained in:
parent
20eafa0a64
commit
004626b568
@ -18,7 +18,7 @@ public class CallbackBridge {
|
||||
public static boolean mouseLeft;
|
||||
public static StringBuilder DEBUG_STRING = new StringBuilder();
|
||||
|
||||
volatile private static boolean isGrabbing = false;
|
||||
// volatile private static boolean isGrabbing = false;
|
||||
|
||||
public static void putMouseEventWithCoords(int button, int state, int x, int y, int dz, long nanos) {
|
||||
sendCursorPos(x, y);
|
||||
@ -39,6 +39,7 @@ public class CallbackBridge {
|
||||
|
||||
public static void sendMouseKeycode(int keycode, int modifiers, boolean isDown) {
|
||||
DEBUG_STRING.append("MouseKey=" + keycode + ", down=" + isDown + "\n");
|
||||
if (isGrabbing()) DEBUG_STRING.append("MouseGrabStrace: " + android.util.Log.getStackTraceString(new Throwable()) + "\n");
|
||||
sendData(JRE_TYPE_MOUSE_KEYCODE_CONTROL, keycode, Boolean.toString(isDown), modifiers);
|
||||
}
|
||||
|
||||
@ -60,7 +61,7 @@ public class CallbackBridge {
|
||||
public static void receiveCallback(int type, String data) {
|
||||
switch (type) {
|
||||
case ANDROID_TYPE_GRAB_STATE:
|
||||
isGrabbing = Boolean.parseBoolean(data);
|
||||
// isGrabbing = Boolean.parseBoolean(data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user