-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review joystick locking #6063
Milestone
Comments
slouken
added a commit
that referenced
this issue
Aug 16, 2022
This prevents crashes when calling SDL joystick API functions from a different thread while disconnection is happening. See #6063 for a more thorough review of joystick locking.
Consider #6150 when reviewing locking |
Also look at the similar issue in #6145 |
PJB3005
pushed a commit
to PJB3005/SDL
that referenced
this issue
Oct 5, 2022
This prevents crashes when calling SDL joystick API functions from a different thread while disconnection is happening. See libsdl-org#6063 for a more thorough review of joystick locking.
PJB3005
pushed a commit
to PJB3005/SDL
that referenced
this issue
Oct 5, 2022
This makes the joystick locking more robust by holding the lock while updating joysticks. The lock should be held when calling any SDL joystick function on a different thread than the one calling SDL_PumpEvents() and SDL_JoystickUpdate(). It is now possible to hold the lock while reinitializing the joystick subsystem, however any open joysticks will become invalid and potentially cause crashes if used afterwards. Fixes libsdl-org#6063
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are some potential issues where joystick data structures aren't locked while delivering events. This was intentional to avoid a deadlock in Steam, but we should review this and see if we can leave the lock held during all accesses to joystick data structures.
The text was updated successfully, but these errors were encountered: