diff --git a/app_pojavlauncher/src/main/java/org/lwjgl/glfw/CallbackBridge.java b/app_pojavlauncher/src/main/java/org/lwjgl/glfw/CallbackBridge.java index aed451c70..b050b59da 100644 --- a/app_pojavlauncher/src/main/java/org/lwjgl/glfw/CallbackBridge.java +++ b/app_pojavlauncher/src/main/java/org/lwjgl/glfw/CallbackBridge.java @@ -179,8 +179,6 @@ public class CallbackBridge { private static native void nativeSendScreenSize(int width, int height); public static native boolean nativeIsGrabbing(); - public static native void nativePutControllerAxes(FloatBuffer axBuf); - public static native void nativePutControllerButtons(ByteBuffer axBuf); static { System.loadLibrary("pojavexec"); } diff --git a/app_pojavlauncher/src/main/jni/input_bridge_v3.c b/app_pojavlauncher/src/main/jni/input_bridge_v3.c index 32d12c96a..4c53c5055 100644 --- a/app_pojavlauncher/src/main/jni/input_bridge_v3.c +++ b/app_pojavlauncher/src/main/jni/input_bridge_v3.c @@ -363,43 +363,3 @@ JNIEXPORT void JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSendScroll(JNIEn JNIEXPORT void JNICALL Java_org_lwjgl_glfw_GLFW_nglfwSetShowingWindow(JNIEnv* env, jclass clazz, jlong window) { showingWindow = (long) window; } -JNIEXPORT void JNICALL -Java_org_lwjgl_glfw_CallbackBridge_nativePutControllerAxes(JNIEnv *env, jclass clazz, - jobject ax_buf) { - // TODO: implement nativePutControllerAxes() - if(isInputReady) { - jbyte *src = (jbyte *)((*env)->GetDirectBufferAddress(*env,ax_buf)); - jclass glfw_joystick_class = (*runtimeJNIEnvPtr_ANDROID)->FindClass(runtimeJNIEnvPtr_ANDROID,"org/lwjgl/glfw/GLFW"); - if(glfw_joystick_class == NULL) { - __android_log_print(ANDROID_LOG_ERROR,"ControllerPipeNative","GLFW is not attached!"); - return; - } - jfieldID glfw_controller_axis_data = (*runtimeJNIEnvPtr_ANDROID)->GetStaticFieldID(runtimeJNIEnvPtr_ANDROID,glfw_joystick_class,"joystickData", - "Ljava/nio/FloatBuffer;"); - if(glfw_controller_axis_data == NULL) { - __android_log_print(ANDROID_LOG_ERROR,"ControllerPipeNative","Unable to find the field!"); - return; - } - (*runtimeJNIEnvPtr_ANDROID)->SetStaticObjectField(runtimeJNIEnvPtr_ANDROID,glfw_joystick_class,glfw_controller_axis_data,(*runtimeJNIEnvPtr_ANDROID)->NewDirectByteBuffer(runtimeJNIEnvPtr_ANDROID,src,(*env)->GetDirectBufferCapacity(env,ax_buf))); - } -} -JNIEXPORT void JNICALL -Java_org_lwjgl_glfw_CallbackBridge_nativePutControllerButtons(JNIEnv *env, jclass clazz, - jobject ax_buf) { - // TODO: implement nativePutControllerButtons() - if(isInputReady) { - jbyte *src = (jbyte *)((*env)->GetDirectBufferAddress(*env,ax_buf)); - jclass glfw_joystick_class = (*runtimeJNIEnvPtr_ANDROID)->FindClass(runtimeJNIEnvPtr_ANDROID,"org/lwjgl/glfw/GLFW"); - if(glfw_joystick_class == NULL) { - __android_log_print(ANDROID_LOG_ERROR,"ControllerPipeNative","GLFW is not attached!"); - return; - } - jfieldID glfw_controller_button_data = (*runtimeJNIEnvPtr_ANDROID)->GetStaticFieldID(runtimeJNIEnvPtr_ANDROID,glfw_joystick_class,"buttonData", - "Ljava/nio/ByteBuffer;"); - if(glfw_controller_button_data == NULL) { - __android_log_print(ANDROID_LOG_ERROR,"ControllerPipeNative","Unable to find the field!"); - return; - } - (*runtimeJNIEnvPtr_ANDROID)->SetStaticObjectField(runtimeJNIEnvPtr_ANDROID,glfw_joystick_class,glfw_controller_button_data,(*runtimeJNIEnvPtr_ANDROID)->NewDirectByteBuffer(runtimeJNIEnvPtr_ANDROID,src,(*env)->GetDirectBufferCapacity(env,ax_buf))); - } -}