Commit 9670d2bb9ed19e3720c58378fe3eadab1ea0c40e

Sam Lantinga 2022-08-15T17:27:33

Make sure we hold the joystick lock when disconnecting a HIDAPI joystick This prevents crashes when calling SDL joystick API functions from a different thread while disconnection is happening. See https://github.com/libsdl-org/SDL/issues/6063 for a more thorough review of joystick locking.