Commit b10cdce3 authored by Martin Storsjo's avatar Martin Storsjo Committed by Alexandre Julliard

avicap32: Fix compilation with older videodev2.h.

Older videodev2.h lack the V4L2_CAP_DEVICE_CAPS define and the device_caps field in the v4l2_capability struct. Signed-off-by: 's avatarMartin Storsjo <martin@martin.st> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent df9a047a
...@@ -129,9 +129,11 @@ static BOOL query_video_device(int devnum, char *name, int namesize, char *versi ...@@ -129,9 +129,11 @@ static BOOL query_video_device(int devnum, char *name, int namesize, char *versi
memset(&caps, 0, sizeof(caps)); memset(&caps, 0, sizeof(caps));
if (xioctl(fd, VIDIOC_QUERYCAP, &caps) != -1) { if (xioctl(fd, VIDIOC_QUERYCAP, &caps) != -1) {
BOOL isCaptureDevice; BOOL isCaptureDevice;
#ifdef V4L2_CAP_DEVICE_CAPS
if (caps.capabilities & V4L2_CAP_DEVICE_CAPS) if (caps.capabilities & V4L2_CAP_DEVICE_CAPS)
isCaptureDevice = caps.device_caps & V4L2_CAP_VIDEO_CAPTURE; isCaptureDevice = caps.device_caps & V4L2_CAP_VIDEO_CAPTURE;
else else
#endif
isCaptureDevice = caps.capabilities & V4L2_CAP_VIDEO_CAPTURE; isCaptureDevice = caps.capabilities & V4L2_CAP_VIDEO_CAPTURE;
if (isCaptureDevice) { if (isCaptureDevice) {
lstrcpynA(name, (char *)caps.card, namesize); lstrcpynA(name, (char *)caps.card, namesize);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment