mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 23:59:21 -04:00
Clean up unused native functions
This commit is contained in:
parent
8c17dff2d7
commit
8e2a314c27
@ -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");
|
||||
}
|
||||
|
@ -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)));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user