Locking for atomic access to the joystick API.
Defined in <SDL3/SDL_joystick.h>
bool SDL_TryLockJoysticks(void);(bool) Returns true if the joysticks were successfully locked, false otherwise.
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.
It is safe to call this function from any thread.
This function is available since SDL 3.6.0.