====== (This is the documentation for SDL3, which is under heavy development and the API is changing! SDL2 is the current stable version!) ====== == Draft == '''THIS PAGE IS A WORK IN PROGRESS''' ... Please make edits to this page to improve it! = SDL_GameControllerEventState = Query or change current state of Game Controller events. == Syntax == int SDL_GameControllerEventState(int state); == Function Parameters == {| |'''state''' |can be one of [[SDL_QUERY]], [[SDL_IGNORE]], or [[SDL_ENABLE]] |} == Return Value == Returns the same value passed to the function, with exception to -1 ([[SDL_QUERY]]), which will return the current state. == Remarks == If controller events are disabled, you must call [[SDL_GameControllerUpdate]]() yourself and check the state of the controller when you want controller information. Any number can be passed to [[SDL_GameControllerEventState]](), but only -1, 0, and 1 will have any effect. Other numbers will just be returned. == Version == This function is available since SDL 3.0.0. == 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 */ == Related Functions == :[[SDL_JoystickEventState]] ---- [[CategoryAPI]], [[CategoryGameController]], [[CategoryDraft]]