Always lock the HIDAPI device when closing, in case rumble is pending
This commit is contained in:
parent
907b8eebc3
commit
e2f46ed8ef
9 changed files with 103 additions and 59 deletions
|
@ -1221,9 +1221,7 @@ HIDAPI_JoystickClose(SDL_Joystick * joystick)
|
|||
SDL_LockMutex(device->dev_lock);
|
||||
}
|
||||
|
||||
SDL_LockMutex(device->dev_lock);
|
||||
device->driver->CloseJoystick(device, joystick);
|
||||
SDL_UnlockMutex(device->dev_lock);
|
||||
|
||||
SDL_free(joystick->hwdata);
|
||||
joystick->hwdata = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue