This is new wiki software and old wiki content. It's a work in progress!
Here's the explanation.
Be gentle, report bugs, leave feedback on pages, or just edit them yourself! Thanks!

SDL Wiki

Draft

THIS PAGE IS A WORK IN PROGRESS ... Please make edits to this page to improve it!

SDL_JoystickEventState

Enable/disable joystick event polling.

Syntax

int SDL_JoystickEventState(int state);

Function Parameters

state

can be one of SDL_QUERY, SDL_IGNORE, or SDL_ENABLE

Return Value

Returns 1 if enabled, 0 if disabled, or a negative error code on failure; call SDL_GetError() for more information.

If state is SDL_QUERY then the current state is returned, otherwise the new processing state is returned.

Remarks

If joystick events are disabled, you must call SDL_JoystickUpdate() yourself and manually check the state of the joystick when you want joystick information.

It is recommended that you leave joystick event handling enabled.

WARNING: Calling this function may delete all events currently in SDL's event queue.

Code Examples

printf("%i\n", SDL_JoystickEventState(SDL_QUERY));  /* prints 1 */
printf("%i\n", SDL_JoystickEventState(SDL_IGNORE)); /* prints 0 */
printf("%i\n", SDL_JoystickEventState(SDL_QUERY));  /* prints 0 */
SDL_GameControllerEventState

CategoryAPI, CategoryJoystick, CategoryDraft


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.