Attempt fix crash on send input event

This commit is contained in:
khanhduytran0 2020-09-08 19:54:43 +07:00
parent 5af6e527bf
commit c61d361d4e
2 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ LOCAL_MODULE := pojavexec
# LOCAL_CFLAGS += -DGLES_TEST # LOCAL_CFLAGS += -DGLES_TEST
LOCAL_SRC_FILES := \ LOCAL_SRC_FILES := \
egl_bridge.c \ egl_bridge.c \
input_bridge.c \
jre_launcher.c \ jre_launcher.c \
utils.c utils.c
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)

View File

@ -2,7 +2,7 @@
#include "utils.h" #include "utils.h"
JNIEXPORT void JNICALL Java_net_kdt_pojavlaunch_LWJGLInputSender(JNIEnv* env, jclass clazz, jint type, jstring data) { JNIEXPORT void JNICALL Java_net_kdt_pojavlaunch_LWJGLInputSender_sendDataToJRE(JNIEnv* env, jclass clazz, jint type, jstring data) {
if (isEglMakeCurrentCalled == 1) { if (isEglMakeCurrentCalled == 1) {
// Convert Dalvik string to JRE string: should or use directly? // Convert Dalvik string to JRE string: should or use directly?
char *data_c = (char*)(*env)->GetStringUTFChars(env, data, 0); char *data_c = (char*)(*env)->GetStringUTFChars(env, data, 0);