Windows: Fixed bug in interface autoclaim

* Bug was introduced in f2b19e4a32
* Closes #78
* Closes #80
This commit is contained in:
Benjamin Dobell
2013-02-02 01:42:06 +11:00
committed by Pete Batard
parent 6a445e6a0c
commit aa482f89ac
3 changed files with 4 additions and 3 deletions
+1
View File
@@ -17,6 +17,7 @@ Anthony Clay
Artem Egorkine
Aurelien Jarno
Bastien Nocera
Benjamin Dobell
Dave Camarillo
David Engraf
David Moore
+2 -2
View File
@@ -2732,11 +2732,11 @@ static int winusbx_claim_interface(int sub_api, struct libusb_device_handle *dev
// must first claim the first interface before you claim the others
if ((winusb_handle == 0) || (winusb_handle == INVALID_HANDLE_VALUE)) {
file_handle = handle_priv->interface_handle[0].dev_handle;
if (!WinUSBX[sub_api].Initialize(file_handle, &winusb_handle)) {
if (WinUSBX[sub_api].Initialize(file_handle, &winusb_handle)) {
handle_priv->interface_handle[0].api_handle = winusb_handle;
usbi_warn(ctx, "auto-claimed interface 0 (required to claim %d with WinUSB)", iface);
} else {
usbi_warn(ctx, "failed to auto-claim interface 0 (required to claim %d with WinUSB)", iface);
usbi_warn(ctx, "failed to auto-claim interface 0 (required to claim %d with WinUSB): %s", iface, windows_error_str(0));
return LIBUSB_ERROR_ACCESS;
}
}
+1 -1
View File
@@ -1 +1 @@
#define LIBUSB_NANO 10600
#define LIBUSB_NANO 10601