Skip to content

Commit

Permalink
src/usb_libusb.c: Wrap the libusb detach-the-kernel-driver routines i…
Browse files Browse the repository at this point in the history
…nside ifdefs; these functions aren't provided on Windows.

Signed-off-by: Drew Fisher <[email protected]>
zarvox committed Apr 18, 2011
1 parent 73084d9 commit f863d9a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/usb_libusb10.c
Original file line number Diff line number Diff line change
@@ -126,6 +126,7 @@ int fnusb_open_subdevices(freenect_device *dev, int index)
dev->usb_cam.dev = NULL;
break;
}
#ifndef _WIN32
// Detach an existing kernel driver for the device
res = libusb_kernel_driver_active(dev->usb_cam.dev, 0);
if (res == 1) {
@@ -137,6 +138,7 @@ int fnusb_open_subdevices(freenect_device *dev, int index)
break;
}
}
#endif
res = libusb_claim_interface (dev->usb_cam.dev, 0);
if (res < 0) {
FN_ERROR("Could not claim interface on camera: %d\n", res);

0 comments on commit f863d9a

Please sign in to comment.