Wiki Page Content

DRAFT

SDL_GameControllerGetButton

Use this function to get the current state of a button on a game controller.

Syntax

Uint8 SDL_GameControllerGetButton(SDL_GameController*      gamecontroller,
                                  SDL_GameControllerButton button)

Function Parameters

gamecontroller

a game controller

button

a button index (one of the SDL_GameControllerButton values)

Return Value

Returns 1 for pressed state or 0 for not pressed state or error; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

The button indices start at index 0.

Version

This function is available since SDL 2.0.0.


CategoryAPI, CategoryGameController

None: SDL_GameControllerGetButton (last edited 2014-09-22 18:23:19 by PhilippWiesemann)

Feedback
Please include your contact information if you'd like to receive a reply.
Submit