The sensor and joystick instance ID generator isn't guarded by a lock.

This commit is contained in:
Sam Lantinga
2023-10-10 15:46:15 -07:00
parent aee4862958
commit 3a47fb7208
2 changed files with 2 additions and 2 deletions

View File

@@ -116,7 +116,7 @@ static SDL_bool SDL_joysticks_initialized;
static SDL_bool SDL_joysticks_quitting;
static SDL_bool SDL_joystick_being_added;
static SDL_Joystick *SDL_joysticks SDL_GUARDED_BY(SDL_joystick_lock) = NULL;
static SDL_AtomicInt SDL_last_joystick_instance_id SDL_GUARDED_BY(SDL_joystick_lock);
static SDL_AtomicInt SDL_last_joystick_instance_id;
static int SDL_joystick_player_count SDL_GUARDED_BY(SDL_joystick_lock) = 0;
static SDL_JoystickID *SDL_joystick_players SDL_GUARDED_BY(SDL_joystick_lock) = NULL;
static SDL_bool SDL_joystick_allows_background_events = SDL_FALSE;