Skip to content

Commit 9abd651

Browse files
committed
Replaced missing variable - fixes #366
Signed-off-by: Benn Snyder <benn.snyder@gmail.com>
1 parent aca4b8f commit 9abd651

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/usb_libusb10.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ FN_INTERNAL int fnusb_open_subdevices(freenect_device *dev, int index)
215215
break;
216216
}
217217
if (desc.idProduct == PID_K4W_CAMERA || desc.bcdDevice != fn_le32(267)) {
218+
freenect_device_flags requested_devices = ctx->enabled_subdevices;
219+
218220
// Not the old kinect so we only set up the camera
219221
ctx->enabled_subdevices = FREENECT_DEVICE_CAMERA;
220222
ctx->zero_plane_res = 334;
@@ -231,7 +233,8 @@ FN_INTERNAL int fnusb_open_subdevices(freenect_device *dev, int index)
231233
#ifdef BUILD_AUDIO
232234
//for newer devices we need to enable the audio device for motor control
233235
//we only do this though if motor has been requested.
234-
if( (requested_devices & FREENECT_DEVICE_MOTOR) && (requested_devices & FREENECT_DEVICE_AUDIO) == 0 ){
236+
if ((requested_devices & FREENECT_DEVICE_MOTOR) && (requested_devices & FREENECT_DEVICE_AUDIO) == 0)
237+
{
235238
ctx->enabled_subdevices = (freenect_device_flags)(ctx->enabled_subdevices | FREENECT_DEVICE_AUDIO);
236239
}
237240
#endif

0 commit comments

Comments
 (0)