diff --git a/src/joystick/SDL_gamepad.c b/src/joystick/SDL_gamepad.c index d51e39ba5e..b1b88e8389 100644 --- a/src/joystick/SDL_gamepad.c +++ b/src/joystick/SDL_gamepad.c @@ -3054,7 +3054,7 @@ SDL_GamepadButtonLabel SDL_GetGamepadButtonLabel(SDL_Gamepad *gamepad, SDL_Gamep */ int SDL_GetNumGamepadTouchpads(SDL_Gamepad *gamepad) { - int result = true; + int result = 0; SDL_LockJoysticks(); { @@ -3073,7 +3073,7 @@ int SDL_GetNumGamepadTouchpads(SDL_Gamepad *gamepad) */ int SDL_GetNumGamepadTouchpadFingers(SDL_Gamepad *gamepad, int touchpad) { - int result = true; + int result = 0; SDL_LockJoysticks(); { @@ -3081,8 +3081,6 @@ int SDL_GetNumGamepadTouchpadFingers(SDL_Gamepad *gamepad, int touchpad) if (joystick) { if (touchpad >= 0 && touchpad < joystick->ntouchpads) { result = joystick->touchpads[touchpad].nfingers; - } else { - result = SDL_InvalidParamError("touchpad"); } } } @@ -3326,7 +3324,7 @@ SDL_JoystickID SDL_GetGamepadID(SDL_Gamepad *gamepad) SDL_PropertiesID SDL_GetGamepadProperties(SDL_Gamepad *gamepad) { - SDL_PropertiesID result = true; + SDL_PropertiesID result = 0; SDL_LockJoysticks(); {