From 7c55c51408e55f08bfb4ee6930879310030da97e Mon Sep 17 00:00:00 2001 From: Christoph Haag Date: Fri, 4 Mar 2022 16:00:49 +0100 Subject: [PATCH] st/gui: Add warning when v4l driver is disabled on linux "Failed to open camera!" is a very uninformative error --- src/xrt/state_trackers/gui/gui_scene_video.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xrt/state_trackers/gui/gui_scene_video.c b/src/xrt/state_trackers/gui/gui_scene_video.c index eaf3d0e56..8e0eb489a 100644 --- a/src/xrt/state_trackers/gui/gui_scene_video.c +++ b/src/xrt/state_trackers/gui/gui_scene_video.c @@ -11,6 +11,7 @@ #include "xrt/xrt_settings.h" #include "xrt/xrt_frameserver.h" #include "xrt/xrt_config_drivers.h" +#include "xrt/xrt_config_os.h" #include "util/u_misc.h" #include "util/u_format.h" @@ -115,6 +116,9 @@ on_video_device(struct xrt_prober *xp, xrt_prober_open_video_device(xp, pdev, vs->xfctx, &vs->xfs); if (vs->xfs == NULL) { U_LOG_E("Failed to open camera!"); +#if defined(XRT_OS_LINUX) && !defined(XRT_HAVE_V4L2) + U_LOG_E("Monado was built with the v4l driver disabled. Most video devices require this driver!"); +#endif free(vs->xfctx); vs->xfctx = NULL; return;