mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-15 16:13:57 +00:00
Create a global event lock for hardware that generates events
This prevents ABBA deadlocks caused by taking a hardware resource lock then delivering events at the same time another thread is taking a hardware resource lock from an event watch callback. Fixes https://github.com/libsdl-org/SDL/issues/15709
This commit is contained in:
@@ -117,7 +117,7 @@ static int SDL_HIDAPI_numdrivers = 0;
|
||||
static SDL_AtomicInt SDL_HIDAPI_updating_devices;
|
||||
static bool SDL_HIDAPI_hints_changed = false;
|
||||
static Uint32 SDL_HIDAPI_change_count = 0;
|
||||
static SDL_HIDAPI_Device *SDL_HIDAPI_devices SDL_GUARDED_BY(SDL_joystick_lock);
|
||||
static SDL_HIDAPI_Device *SDL_HIDAPI_devices SDL_GUARDED_BY(SDL_event_lock);
|
||||
static int SDL_HIDAPI_numjoysticks = 0;
|
||||
static bool SDL_HIDAPI_combine_joycons = true;
|
||||
static bool initialized = false;
|
||||
|
||||
Reference in New Issue
Block a user