|
Size: 1464
Comment: Fixed link (Feedback 2016-03-31).
|
Size: 1469
Comment: Added missing() and fixed typos.
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 9: | Line 9: |
| Use this function to find the current state of, enable, or disable events dealing with Game Controllers. This will not disable Joystick events, which can also be fired by a controller (See [[SDL_JoystickEventState]]) | Use this function to find the current state of, enable, or disable events dealing with Game Controllers. This will not disable Joystick events, which can also be fired by a controller (see [[SDL_JoystickEventState]]()). |
| Line 37: | Line 37: |
| Any number can be passed to [[SDL_GameControllerEventState]], but only -1, 0, and 1 will have any effect. Other numbers will just be returned. | Any number can be passed to [[SDL_GameControllerEventState]](), but only -1, 0, and 1 will have any effect. Other numbers will just be returned. |
DRAFT |
SDL_GameControllerEventState
Use this function to find the current state of, enable, or disable events dealing with Game Controllers. This will not disable Joystick events, which can also be fired by a controller (see SDL_JoystickEventState()).
Contents
Syntax
int SDL_GameControllerEventState(int state)
Function Parameters
state |
can be one of SDL_QUERY, SDL_IGNORE, or SDL_ENABLE |
Note: You may use -1, 0, or 1 in place of SDL_QUERY, SDL_IGNORE, or SDL_ENABLE respectively.
Return Value
Returns the same value passed to the function, with exception to -1 (SDL_QUERY), which will return the current state.
Code Examples
printf("%i\n", SDL_GameControllerEventState(SDL_QUERY)); /* prints 1 */
printf("%i\n", SDL_GameControllerEventState(SDL_IGNORE)); /* prints 0 */
printf("%i\n", SDL_GameControllerEventState(SDL_QUERY)); /* prints 0 */
Remarks
Any number can be passed to SDL_GameControllerEventState(), but only -1, 0, and 1 will have any effect. Other numbers will just be returned.
