Wiki Page Content

Differences between revisions 2 and 3
Revision 2 as of 2013-10-05 16:05:44
Size: 1432
Comment: Removed second category line.
Revision 3 as of 2013-10-05 16:18:58
Size: 1432
Comment: Corrected parameter name, see SGFunctions page.
Deletions are marked like this. Additions are marked like this.
Line 22: Line 22:
||'''State'''||can be one of SDL_QUERY, SDL_IGNORE, or SDL_ENABLE|| ||'''state'''||can be one of SDL_QUERY, SDL_IGNORE, or SDL_ENABLE||

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)

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

cout << SDL_GameControllerEventState(SDL_QUERY)  << endl; // 1
cout << SDL_GameControllerEventState(SDL_IGNORE) << endl; // 0
cout << SDL_GameControllerEventState(SDL_QUERY)  << endl; // 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.


CategoryAPI, CategoryGameController

None: SDL_GameControllerEventState (last edited 2016-04-10 22:22:27 by PhilippWiesemann)

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