mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 00:46:25 +00:00
Removed public joystick locking API
All joystick functions are thread-safe and you can now get an atomic list of joysticks with SDL_GetJoysticks() Fixes https://github.com/libsdl-org/SDL/issues/6956
This commit is contained in:
@@ -43,6 +43,16 @@ extern SDL_bool SDL_JoysticksInitialized(void);
|
||||
/* Return whether the joystick system is shutting down */
|
||||
extern SDL_bool SDL_JoysticksQuitting(void);
|
||||
|
||||
#ifdef SDL_THREAD_SAFETY_ANALYSIS
|
||||
extern SDL_mutex *SDL_joystick_lock;
|
||||
#endif
|
||||
|
||||
/* Locking for atomic access to the joystick API */
|
||||
extern void SDL_LockJoysticks(void) SDL_ACQUIRE(SDL_joystick_lock);
|
||||
|
||||
/* Unlocking for atomic access to the joystick API */
|
||||
extern void SDL_UnlockJoysticks(void) SDL_RELEASE(SDL_joystick_lock);
|
||||
|
||||
/* Return whether the joysticks are currently locked */
|
||||
extern SDL_bool SDL_JoysticksLocked(void);
|
||||
|
||||
|
Reference in New Issue
Block a user