|
@@ -927,6 +927,26 @@ JNIEXPORT void JNICALL Java_com_retroarch_browser_retroactivity_RetroActivityCom
|
|
|
JNIEXPORT void JNICALL Java_com_retroarch_browser_retroactivity_RetroActivityCommon_setJoystickBindJoyKeyNative
|
|
|
(JNIEnv *env, jobject thiz, jint port, jint id, jint joy_key) {
|
|
|
input_config_binds[port][id].joykey = joy_key;
|
|
|
+ input_config_binds[port][id].joyaxis = AXIS_NONE;
|
|
|
+}
|
|
|
+JNIEXPORT void JNICALL Java_com_retroarch_browser_retroactivity_RetroActivityCommon_setJoystickBindJoyAxisNative
|
|
|
+ (JNIEnv *env, jobject thiz, jint port, jint id, jint joy_axis) {
|
|
|
+ input_config_binds[port][id].joykey = NO_BTN;
|
|
|
+ input_config_binds[port][id].joyaxis = joy_axis;
|
|
|
+}
|
|
|
+JNIEXPORT void JNICALL Java_com_retroarch_browser_retroactivity_RetroActivityCommon_setJoystickBindJoypadNative
|
|
|
+ (JNIEnv *env, jobject thiz, jint port, jintArray jjoy_keys, jintArray jjoy_axiss) {
|
|
|
+ int i;
|
|
|
+ int* cjoyaxiss = (*env)->GetIntArrayElements(env, jjoy_axiss, NULL);
|
|
|
+ int* cjoykeys = (*env)->GetIntArrayElements(env, jjoy_keys, NULL);
|
|
|
+
|
|
|
+ for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; ++i) {
|
|
|
+ input_config_binds[port][i].joykey = cjoykeys[i];
|
|
|
+ input_config_binds[port][i].joyaxis = cjoyaxiss[i];
|
|
|
+ }
|
|
|
+
|
|
|
+ (*env)->ReleaseIntArrayElements(env, jjoy_keys, cjoykeys, 0);
|
|
|
+ (*env)->ReleaseIntArrayElements(env, jjoy_axiss, cjoyaxiss, 0);
|
|
|
}
|
|
|
/*
|
|
|
* Native activity interaction (called from main thread)
|