mirror of
https://github.com/RPCS3/hidapi.git
synced 2026-07-21 00:45:21 -04:00
Remove the extraneous call to IOHIDDeviceClose() in the read_thread()
The call is also made in hid_close(). Thanks to Vitali Lovich for pointing this out.
This commit is contained in:
@@ -704,13 +704,6 @@ static void *read_thread(void *param)
|
||||
pthread_cond_broadcast(&dev->condition);
|
||||
pthread_mutex_unlock(&dev->mutex);
|
||||
|
||||
/* Close the OS handle to the device, but only if it's not
|
||||
been unplugged. If it's been unplugged, then calling
|
||||
IOHIDDeviceClose() will crash. */
|
||||
if (!dev->disconnected) {
|
||||
IOHIDDeviceClose(dev->device_handle, kIOHIDOptionsTypeNone);
|
||||
}
|
||||
|
||||
/* Wait here until hid_close() is called and makes it past
|
||||
the call to CFRunLoopWakeUp(). This thread still needs to
|
||||
be valid when that function is called on the other thread. */
|
||||
|
||||
Reference in New Issue
Block a user