Get the number of joysitck buttons
#include "SDL.h"
int SDL_JoystickNumButtons(SDL_Joystick *joystick);
Return the number of buttons available from a previously opened SDL_Joystick.
Number of buttons.
SDL_JoystickGetButton, SDL_JoystickOpen