/* Get the number of buttons on a joystick  */
int SDL_JoystickNumButtons(SDL_Joystick *joystick)
/* Get the number of buttons on a joystick  */
int SDL_JoystickNumButtons(SDL_Joystick *joystick)
{
	if ( ! ValidJoystick(&joystick) ) {
		return(-1);
	}
	return(joystick->nbuttons);
}