src/core/android/SDL_android.c
changeset 11393 3e57ce45a890
parent 11355 6185fb86f046
child 11395 a8c29f5b679f
     1.1 --- a/src/core/android/SDL_android.c	Mon Aug 28 09:54:16 2017 -0700
     1.2 +++ b/src/core/android/SDL_android.c	Mon Aug 28 10:03:39 2017 -0700
     1.3 @@ -84,7 +84,7 @@
     1.4  
     1.5  JNIEXPORT jint JNICALL SDL_JAVA_INTERFACE(nativeAddJoystick)(
     1.6          JNIEnv* env, jclass jcls,
     1.7 -        jint device_id, jstring device_name, jint is_accelerometer,
     1.8 +        jint device_id, jstring device_name, jstring device_desc, jint is_accelerometer,
     1.9          jint nbuttons, jint naxes, jint nhats, jint nballs);
    1.10  
    1.11  JNIEXPORT jint JNICALL SDL_JAVA_INTERFACE(nativeRemoveJoystick)(
    1.12 @@ -365,15 +365,17 @@
    1.13  
    1.14  JNIEXPORT jint JNICALL SDL_JAVA_INTERFACE(nativeAddJoystick)(
    1.15                                      JNIEnv* env, jclass jcls,
    1.16 -                                    jint device_id, jstring device_name, jint is_accelerometer,
    1.17 +                                    jint device_id, jstring device_name, jstring device_desc, jint is_accelerometer,
    1.18                                      jint nbuttons, jint naxes, jint nhats, jint nballs)
    1.19  {
    1.20      int retval;
    1.21      const char *name = (*env)->GetStringUTFChars(env, device_name, NULL);
    1.22 +    const char *desc = (*env)->GetStringUTFChars(env, device_desc, NULL);
    1.23  
    1.24 -    retval = Android_AddJoystick(device_id, name, (SDL_bool) is_accelerometer, nbuttons, naxes, nhats, nballs);
    1.25 +    retval = Android_AddJoystick(device_id, name, desc, (SDL_bool) is_accelerometer, nbuttons, naxes, nhats, nballs);
    1.26  
    1.27      (*env)->ReleaseStringUTFChars(env, device_name, name);
    1.28 +    (*env)->ReleaseStringUTFChars(env, device_desc, desc);
    1.29  
    1.30      return retval;
    1.31  }