Skip to content

Commit

Permalink
win32: Only try to set alt interface for interface 1
Browse files Browse the repository at this point in the history
This is the same as we do for the other platforms, so I assume this is OK
  • Loading branch information
nikias committed Dec 8, 2023
1 parent 1a12fc2 commit 010b3b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/libirecovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 010b3b0

Please sign in to comment.