Explorar o código

Changed function to return -1 through SDL_Error() instead of plain -1.

Philipp Wiesemann %!s(int64=12) %!d(string=hai) anos
pai
achega
0ab7624cde
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      src/joystick/android/SDL_sysjoystick.c

+ 1 - 2
src/joystick/android/SDL_sysjoystick.c

@@ -170,8 +170,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joystick, int device_index)
         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");
     }
 }