summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Batard <pbatard@gmail.com>2010-05-21 12:13:08 +0100
committerPete Batard <pbatard@gmail.com>2010-05-21 12:13:08 +0100
commitc8a7c320b6c2d0db115c552eda25e3fe0ae53356 (patch)
tree26ecf6fd4417067527181a13c8455d6de792dbdc
parent77fb9c63d74d70d0f7407fbd3b32ff85fc27b086 (diff)
downloadlibusb-c8a7c320b6c2d0db115c552eda25e3fe0ae53356.tar.gz
re-enabled autoclaim + fixed autoclaim related ifdefs
-rw-r--r--libusb/os/windows_usb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c
index af74464..e0c7dd3 100644
--- a/libusb/os/windows_usb.c
+++ b/libusb/os/windows_usb.c
@@ -29,7 +29,7 @@
// option below is enabled.
#define USE_HIDD_FOR_REPORTS
// - Should libusb automatically claim the interfaces it requires?
-//#define AUTO_CLAIM
+#define AUTO_CLAIM
// - Forces instant overlapped completion on timeouts: can prevents extensive
// wait in poll, after a timeout, but might affect subsequent API calls.
// ***USE AT YOUR OWN RISKS***
@@ -2543,7 +2543,7 @@ static int winusb_submit_control_transfer(struct usbi_transfer *itransfer)
struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
struct windows_transfer_priv *transfer_priv = usbi_transfer_get_os_priv(itransfer);
struct windows_device_handle_priv *handle_priv = (struct windows_device_handle_priv *)transfer->dev_handle->os_priv;
-#ifndef USE_HIDD_FOR_REPORTS
+#ifdef AUTO_CLAIM
struct windows_device_priv *priv = __device_priv(transfer->dev_handle->dev);
#endif
WINUSB_SETUP_PACKET *setup = (WINUSB_SETUP_PACKET *) transfer->buffer;
@@ -3649,7 +3649,7 @@ static int hid_set_interface_altsetting(struct libusb_device_handle *dev_handle,
static int hid_submit_control_transfer(struct usbi_transfer *itransfer)
{
struct libusb_transfer *transfer = __USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
-#ifndef USE_HIDD_FOR_REPORTS
+#ifdef AUTO_CLAIM
struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
#endif
struct windows_transfer_priv *transfer_priv = usbi_transfer_get_os_priv(itransfer);