Put back missing CHECK_WINUSBX_AVAILABLE macro.
The subapi is generally set in the backend functions themselves, using
the macro CHECK_WINUSBX_AVAILABLE. However, this macro was (likely
inadvertently) removed from winusbx_copy_transfer_data() in commit
9c28ad2 causing the subapi in this function to always be SUB_API_NOTSET.
This results in the error:
libusb: debug [winusbx_copy_transfer_data] unsupported API call for 'copy_transfer_data' (unrecognized device driver)
https://github.com/libusb/libusb/issues/747#issuecomment-
649619615
References #749
Closes #1095
int i;
if (transfer->type == LIBUSB_TRANSFER_TYPE_ISOCHRONOUS) {
+ struct winusb_device_priv *priv = usbi_get_device_priv(transfer->dev_handle->dev);
+ CHECK_WINUSBX_AVAILABLE(sub_api);
+
// for isochronous, need to copy the individual iso packet actual_lengths and statuses
if ((sub_api == SUB_API_LIBUSBK) || (sub_api == SUB_API_LIBUSB0)) {
// iso only supported on libusbk-based backends for now
-#define LIBUSB_NANO 11712
+#define LIBUSB_NANO 11713