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

SDL_HINT_JOYSTICK_ASYNC

A variable controlling whether a separate thread should be used for joystick detection and updates.

Header File

Defined in <SDL3/SDL_hints.h>

Syntax

#define SDL_HINT_JOYSTICK_ASYNC "SDL_JOYSTICK_ASYNC"

Remarks

If this is enabled, joystick initialization will return immediately. Connected joysticks and gamepads will not be immediately visible, they will come in as hotplug events in the background. SDL_UpdateJoysticks() will also return immediately and joystick state will be updated asynchronously in the background. Joystick and gamepad events are delivered off the main thread.

If you enable this hint, you should not hold the joystick lock while quitting the joystick subsystem.

The variable can be set to the following values:

This hint should be set before SDL is initialized.

Version

This hint is available since SDL 3.6.0.


CategoryAPI, CategoryAPIMacro, CategoryHints


[ edit | delete | history | feedback | raw ]

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