From 0d8bde7e30773652317a470dafe009ba9b6f3ec9 Mon Sep 17 00:00:00 2001 From: khanhduytran0 Date: Tue, 24 Nov 2020 20:02:38 +0700 Subject: [PATCH] [Input pipe] JNI fix --- app/src/main/java/org/lwjgl/glfw/CallbackBridge.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/lwjgl/glfw/CallbackBridge.java b/app/src/main/java/org/lwjgl/glfw/CallbackBridge.java index ed36b8080..a3606e578 100644 --- a/app/src/main/java/org/lwjgl/glfw/CallbackBridge.java +++ b/app/src/main/java/org/lwjgl/glfw/CallbackBridge.java @@ -48,7 +48,7 @@ public class CallbackBridge { public static void sendKeycode(int keycode, char keychar, int modifiers, boolean isDown) { DEBUG_STRING.append("KeyCode=" + keycode + ", Char=" + keychar); // TODO CHECK: This may cause input issue, not receive input! - if (!nativeSendCharMods((int) keychar, modifiers) || !nativeSendChar((int) keychar)) { + if (!nativeSendCharMods((int) keychar, modifiers) || !nativeSendChar(keychar)) { nativeSendKey(keycode, 0 /* scancode */, isDown ? 1 : 0, modifiers); } @@ -124,7 +124,7 @@ public class CallbackBridge { */ public static native boolean nativeAttachThreadToOther(boolean isAndroid, boolean isUsePushPoll); - private static native boolean nativeSendChar(int codepoint); + private static native boolean nativeSendChar(char codepoint /* int codepoint */); // GLFW: GLFWCharModsCallback deprecated, but is Minecraft still use? private static native boolean nativeSendCharMods(int codepoint, int mods); // private static native void nativeSendCursorEnter(int entered);