|
⇤ ← Revision 1 as of 2013-10-29 20:26:58
Size: 1501
Comment: Added page for SDL_GameControllerGetButton() using content from headers.
|
← Revision 2 as of 2014-09-22 18:23:19 ⇥
Size: 1550
Comment: Added link to SDL_GameControllerButton.
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 24: | Line 24: |
| ||'''button'''||a button index|| | ||'''button'''||a button index (one of the [[SDL_GameControllerButton]] values)|| |
DRAFT |
SDL_GameControllerGetButton
Use this function to get the current state of a button on a game controller.
Contents
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.
