From bc368174cb015f2291cb8dc2f3e2a5782b22cdc8 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 31 May 2020 06:53:09 +0200 Subject: video/ps3eye: disable when system driver exists The driver is enabled on Linux merely for testing purposes. --- video-ps3eye/module.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/video-ps3eye/module.cpp b/video-ps3eye/module.cpp index 97dd370e..812e523c 100644 --- a/video-ps3eye/module.cpp +++ b/video-ps3eye/module.cpp @@ -57,8 +57,18 @@ end: return cnt; } +#ifdef __linux__ +# include +#endif + bool check_device_exists() { +#ifdef __linux__ + // don't show when system driver exists + if (!access("/sys/module/gspca_ov534", R_OK|X_OK)) + return false; +#endif + static bool ret = device_count() > 0; return ret; } -- cgit v1.2.3