Android: Changed an internal joystick function to return count instead of id.
authorPhilipp Wiesemann
Tue, 16 Feb 2016 20:32:22 +0100
changeset 100732455bf5d1866
parent 10072 d2a1cd694861
child 10074 1b9a2beb3e02
Android: Changed an internal joystick function to return count instead of id.

The returned value is currently not used by the caller. The instance id would
also not be needed on Java side and providing it just complicated the function.

Partially fixes Bugzilla #3234.
src/joystick/android/SDL_sysjoystick.c
     1.1 --- a/src/joystick/android/SDL_sysjoystick.c	Fri Feb 12 00:27:21 2016 -0500
     1.2 +++ b/src/joystick/android/SDL_sysjoystick.c	Tue Feb 16 20:32:22 2016 +0100
     1.3 @@ -340,7 +340,6 @@
     1.4          return -1;
     1.5      }
     1.6  
     1.7 -    const int retval = item->device_instance;
     1.8      if (item->joystick) {
     1.9          item->joystick->hwdata = NULL;
    1.10      }
    1.11 @@ -376,7 +375,7 @@
    1.12      
    1.13      SDL_free(item->name);
    1.14      SDL_free(item);
    1.15 -    return retval;
    1.16 +    return numjoysticks;
    1.17  }
    1.18  
    1.19