Zhiyi Zhang : avicap32: Use the correct return type for get_device_desc().
Alexandre Julliard
julliard at winehq.org
Tue Sep 14 16:00:13 CDT 2021
Module: wine
Branch: master
Commit: ea15a5445fcb8922524ca8c8502a08e7d3572f3d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ea15a5445fcb8922524ca8c8502a08e7d3572f3d
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Tue Sep 14 21:10:46 2021 +0800
avicap32: Use the correct return type for get_device_desc().
get_device_desc() should return a NTSTATUS instead of a BOOL. Fix a regression that video capture
devices cannot be opened because of the changes in abb1757.
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/avicap32/v4l.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/avicap32/v4l.c b/dlls/avicap32/v4l.c
index ab2694ae041..0b004e17e58 100644
--- a/dlls/avicap32/v4l.c
+++ b/dlls/avicap32/v4l.c
@@ -119,14 +119,14 @@ static NTSTATUS get_device_desc(void *args)
v4l_umbstowcs(version, ret, params->version, ARRAY_SIZE(params->version));
}
close(fd);
- return is_capture_device;
+ return is_capture_device ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL;
}
/* errno 515 is used by some webcam drivers for unknown IOCTL commands. */
ERR("Failed to get capabilities for %s: %s\n", device, strerror(errno));
close(fd);
- return FALSE;
+ return STATUS_UNSUCCESSFUL;
}
const unixlib_entry_t __wine_unix_call_funcs[] =
More information about the wine-cvs
mailing list