diff options
author | Nikias Bassen | 2023-12-08 11:14:04 +0100 |
---|---|---|
committer | Nikias Bassen | 2023-12-08 11:14:04 +0100 |
commit | 010b3b08c87bb3586e7b31668c62b8848a1bb759 (patch) | |
tree | f77412f63c49e16634552fc12a5b413d60da733d /src | |
parent | 1a12fc2877a5aac5ef28b196753c83188fc13ef0 (diff) | |
download | libirecovery-010b3b08c87bb3586e7b31668c62b8848a1bb759.tar.gz libirecovery-010b3b08c87bb3586e7b31668c62b8848a1bb759.tar.bz2 |
win32: Only try to set alt interface for interface 1
This is the same as we do for the other platforms, so I assume this is OK
Diffstat (limited to 'src')
-rw-r--r-- | src/libirecovery.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index 046c8ec..f6ff480 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c @@ -2064,8 +2064,10 @@ irecv_error_t irecv_usb_set_interface(irecv_client_t client, int usb_interface, } #endif #else - if (irecv_usb_control_transfer(client, 0, 0x0B, usb_alt_interface, usb_interface, NULL, 0, USB_TIMEOUT) < 0) { - return IRECV_E_USB_INTERFACE; + if (usb_interface == 1) { + if (irecv_usb_control_transfer(client, 0, 0x0B, usb_alt_interface, usb_interface, NULL, 0, USB_TIMEOUT) < 0) { + return IRECV_E_USB_INTERFACE; + } } #endif client->usb_interface = usb_interface; |