From 4e00f37be9efe9b21484db4470390f702bcec5c6 Mon Sep 17 00:00:00 2001 From: Carter Li Date: Sun, 2 Mar 2025 10:43:54 +0800 Subject: [PATCH] Camera (macOS): silence compiler warnings --- src/detection/camera/camera_apple.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/detection/camera/camera_apple.m b/src/detection/camera/camera_apple.m index 5d6319560..49a296fbb 100644 --- a/src/detection/camera/camera_apple.m +++ b/src/detection/camera/camera_apple.m @@ -20,9 +20,10 @@ const char* ffDetectCamera(FFlist* result) #ifdef MAC_OS_VERSION_14_0 // Strangely `@available(macOS 14.0, *)` doesn't work here (#1594) - if (@available(macOS 14.0, *) && &AVCaptureDeviceTypeExternal) + if (@available(macOS 14.0, *)) { - deviceType = AVCaptureDeviceTypeExternal; + if (&AVCaptureDeviceTypeExternal) + deviceType = AVCaptureDeviceTypeExternal; } #endif if (deviceType == NULL)