diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2020-05-31 06:53:09 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2020-05-31 06:53:09 +0200 |
commit | bc368174cb015f2291cb8dc2f3e2a5782b22cdc8 (patch) | |
tree | 6e2ca18a028a7aa236d04f18195a5f9377485c22 /video-ps3eye | |
parent | 05e2bb37e39fb6c61d5d73c609de19058df05c5a (diff) |
video/ps3eye: disable when system driver exists
The driver is enabled on Linux merely for testing purposes.
Diffstat (limited to 'video-ps3eye')
-rw-r--r-- | video-ps3eye/module.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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 <unistd.h> +#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; } |