Skip to content

Commit

Permalink
Camera (macOS): fix crashing on old macOS version
Browse files Browse the repository at this point in the history
Fix #1594
  • Loading branch information
CarterLi committed Mar 2, 2025
1 parent 64f9e53 commit 334afc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/detection/camera/camera_apple.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
AVCaptureDeviceType deviceType = NULL;

#ifdef MAC_OS_VERSION_14_0
if (@available(macOS 14.0, *))
// Strangely `@available(macOS 14.0, *)` doesn't work here (#1594)
if (@available(macOS 14.0, *) && &AVCaptureDeviceTypeExternal)
{
deviceType = AVCaptureDeviceTypeExternal;
}
Expand Down

0 comments on commit 334afc9

Please sign in to comment.