table of contents
other versions
- experimental 3.5~git20260611~7c60bcd+ds-1
| SDL_TryLockJoysticks(3) | SDL3 FUNCTIONS | SDL_TryLockJoysticks(3) |
NAME¶
SDL_TryLockJoysticks - Locking for atomic access to the joystick API.
SYNOPSIS¶
#include <SDL3/SDL_joystick.h>
bool SDL_TryLockJoysticks(void);
DESCRIPTION¶
The SDL joystick functions are thread-safe, however you can lock the joysticks while processing to guarantee that the joystick list won't change and joystick and gamepad events will not be delivered.
RETURN VALUE¶
Returns true if the joysticks were successfully locked, false otherwise.
THREAD SAFETY¶
It is safe to call this function from any thread.
AVAILABILITY¶
This function is available since SDL 3.6.0.
| SDL 3.5.0 | Simple Directmedia Layer |