mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 09:47:01 +02:00
fix(usb): check for success on config (oops)
This commit is contained in:
1 parent
dd82099a64
commit
99fa0f3273
1 file changed
+1
-1
@@ -23,7 +23,7 @@ bool wait_usb_handle(usb_handle_t *handle) {
|
||||
if(libusb_init(NULL) == LIBUSB_SUCCESS) {
|
||||
for(;;) {
|
||||
if((handle->device = libusb_open_device_with_vid_pid(NULL, handle->vid, handle->pid)) != NULL) {
|
||||
if(libusb_set_configuration(handle->device, 1)) {
|
||||
if(libusb_set_configuration(handle->device, 1) == LIBUSB_SUCCESS) {
|
||||
return true;
|
||||
}
|
||||
libusb_close(handle->device);
|
||||
|
||||
Reference in new issue
Block a user