Android: Changed an internal joystick function to return count instead of id.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Tue, 16 Feb 2016 20:32:22 +0100
changeset 10073 2455bf5d1866
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
--- a/src/joystick/android/SDL_sysjoystick.c	Fri Feb 12 00:27:21 2016 -0500
+++ b/src/joystick/android/SDL_sysjoystick.c	Tue Feb 16 20:32:22 2016 +0100
@@ -340,7 +340,6 @@
         return -1;
     }
 
-    const int retval = item->device_instance;
     if (item->joystick) {
         item->joystick->hwdata = NULL;
     }
@@ -376,7 +375,7 @@
     
     SDL_free(item->name);
     SDL_free(item);
-    return retval;
+    return numjoysticks;
 }