state = sdl.GetButton(port, button)
button
must be the index of the
desired button (starting from 0). The number of joystick buttons can be found out by
calling sdl.GetNumButtons().
If the device at the specified port is a game controller, button
must be one of
the following predefined constants:
#SDL_BUTTON_A #SDL_BUTTON_B #SDL_BUTTON_X #SDL_BUTTON_Y #SDL_BUTTON_BACK #SDL_BUTTON_GUIDE #SDL_BUTTON_START #SDL_BUTTON_LEFTSTICK #SDL_BUTTON_RIGHTSTICK #SDL_BUTTON_LEFTSHOULDER #SDL_BUTTON_RIGHTSHOULDER #SDL_BUTTON_DPAD_UP #SDL_BUTTON_DPAD_DOWN #SDL_BUTTON_DPAD_LEFT #SDL_BUTTON_DPAD_RIGHT |