Skip to content

Commit

Permalink
Replaced missing variable - fixes #366
Browse files Browse the repository at this point in the history
Signed-off-by: Benn Snyder <benn.snyder@gmail.com>
  • Loading branch information
piedar committed Feb 9, 2014
1 parent aca4b8f commit 9abd651
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/usb_libusb10.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ FN_INTERNAL int fnusb_open_subdevices(freenect_device *dev, int index)
break;
}
if (desc.idProduct == PID_K4W_CAMERA || desc.bcdDevice != fn_le32(267)) {
freenect_device_flags requested_devices = ctx->enabled_subdevices;

// Not the old kinect so we only set up the camera
ctx->enabled_subdevices = FREENECT_DEVICE_CAMERA;
ctx->zero_plane_res = 334;
Expand All @@ -231,7 +233,8 @@ FN_INTERNAL int fnusb_open_subdevices(freenect_device *dev, int index)
#ifdef BUILD_AUDIO
//for newer devices we need to enable the audio device for motor control
//we only do this though if motor has been requested.
if( (requested_devices & FREENECT_DEVICE_MOTOR) && (requested_devices & FREENECT_DEVICE_AUDIO) == 0 ){
if ((requested_devices & FREENECT_DEVICE_MOTOR) && (requested_devices & FREENECT_DEVICE_AUDIO) == 0)
{
ctx->enabled_subdevices = (freenect_device_flags)(ctx->enabled_subdevices | FREENECT_DEVICE_AUDIO);
}
#endif
Expand Down

0 comments on commit 9abd651

Please sign in to comment.