mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 18:46:18 +00:00
st/gui: Add warning when v4l driver is disabled on linux
"Failed to open camera!" is a very uninformative error
This commit is contained in:
parent
bf1edf96eb
commit
7c55c51408
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue