Changed function to return -1 through SDL_Error() instead of plain -1.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Sun, 10 Nov 2013 14:47:05 +0100
changeset 7930 5a1a7cdf3fa2
parent 7929 e3b38a3cdd60
child 7931 1989d1cf3cf3
Changed function to return -1 through SDL_Error() instead of plain -1.
src/joystick/android/SDL_sysjoystick.c
--- a/src/joystick/android/SDL_sysjoystick.c	Sun Nov 10 14:44:50 2013 +0100
+++ b/src/joystick/android/SDL_sysjoystick.c	Sun Nov 10 14:47:05 2013 +0100
@@ -170,8 +170,7 @@
         SYS_Joysticks[device_index] = joystick;
         return 0;
     } else {
-        SDL_SetError("No joystick available with that index");
-        return (-1);
+        return SDL_SetError("No joystick available with that index");
     }
 }