mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 11:58:12 +00:00
Disable all camera drivers if SDL_CAMERA_DISABLED is defined
Fixes https://github.com/libsdl-org/SDL/issues/12182
This commit is contained in:
@@ -203,6 +203,17 @@
|
|||||||
#define SDL_HAVE_YUV 1
|
#define SDL_HAVE_YUV 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SDL_CAMERA_DISABLED
|
||||||
|
#undef SDL_CAMERA_DRIVER_ANDROID
|
||||||
|
#undef SDL_CAMERA_DRIVER_COREMEDIA
|
||||||
|
#undef SDL_CAMERA_DRIVER_DUMMY
|
||||||
|
#undef SDL_CAMERA_DRIVER_EMSCRIPTEN
|
||||||
|
#undef SDL_CAMERA_DRIVER_MEDIAFOUNDATION
|
||||||
|
#undef SDL_CAMERA_DRIVER_PIPEWIRE
|
||||||
|
#undef SDL_CAMERA_DRIVER_V4L2
|
||||||
|
#undef SDL_CAMERA_DRIVER_VITA
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef SDL_RENDER_DISABLED
|
#ifdef SDL_RENDER_DISABLED
|
||||||
#undef SDL_VIDEO_RENDER_SW
|
#undef SDL_VIDEO_RENDER_SW
|
||||||
#undef SDL_VIDEO_RENDER_D3D
|
#undef SDL_VIDEO_RENDER_D3D
|
||||||
|
@@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
// Available camera drivers
|
// Available camera drivers
|
||||||
static const CameraBootStrap *const bootstrap[] = {
|
static const CameraBootStrap *const bootstrap[] = {
|
||||||
#ifndef SDL_CAMERA_DISABLED
|
|
||||||
#ifdef SDL_CAMERA_DRIVER_V4L2
|
#ifdef SDL_CAMERA_DRIVER_V4L2
|
||||||
&V4L2_bootstrap,
|
&V4L2_bootstrap,
|
||||||
#endif
|
#endif
|
||||||
@@ -56,7 +55,6 @@ static const CameraBootStrap *const bootstrap[] = {
|
|||||||
#endif
|
#endif
|
||||||
#ifdef SDL_CAMERA_DRIVER_DUMMY
|
#ifdef SDL_CAMERA_DRIVER_DUMMY
|
||||||
&DUMMYCAMERA_bootstrap,
|
&DUMMYCAMERA_bootstrap,
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user