mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-12 06:05:10 -04:00
Input debug
This commit is contained in:
parent
dc327a1845
commit
b83813c79f
@ -21,7 +21,7 @@ public class CallbackBridge {
|
||||
|
||||
public static void sendMouseEvent(int x, int y, int keycode, boolean isDown) {
|
||||
sendCursorPos(x, y);
|
||||
sendKeycode(keycode, isDown);
|
||||
sendMouseKeycode(keycode, isDown);
|
||||
}
|
||||
|
||||
public static void sendCursorPos(int x, int y) {
|
||||
@ -56,7 +56,9 @@ public class CallbackBridge {
|
||||
// Called from JRE side
|
||||
public static void receiveCallback(int type, String data) {
|
||||
switch (type) {
|
||||
case ANDROID_TYPE_GRAB_STATE: isGrabbing = Boolean.parseBoolean(data);
|
||||
case ANDROID_TYPE_GRAB_STATE:
|
||||
isGrabbing = Boolean.parseBoolean(data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,8 +37,11 @@ JNIEXPORT void JNICALL Java_org_lwjgl_glfw_CallbackBridge_sendData(JNIEnv* env,
|
||||
return;
|
||||
}
|
||||
|
||||
printf("[SendData] type=%i, isJVMNull=%p\n", type, secondJavaVM == null);
|
||||
|
||||
if (secondJavaVM != NULL) {
|
||||
char *data_c = (char*)(*env)->GetStringUTFChars(env, data, 0);
|
||||
printf("data=%s\n", data_c);
|
||||
jstring data_jre = (*secondJNIEnv)->NewStringUTF(secondJNIEnv, data_c);
|
||||
(*env)->ReleaseStringUTFChars(env, data, data_c);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user