Skip to content

Commit

Permalink
the macos version need to be checked during runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
FischLu authored and FischLu committed Nov 3, 2024
1 parent 2dc39d1 commit d679b97
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/osutils/macutils/AppKitImpl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ - (bool) enableAccessibility
- (bool) enableScreenRecording
{
#if __clang_major__ >= 13 && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_12_3
if (@available(macOS 12.3, *)) {
__block BOOL hasPermission = NO;
dispatch_semaphore_t sema = dispatch_semaphore_create(0);

Expand All @@ -210,6 +211,7 @@ - (bool) enableScreenRecording

// Return the final result
return hasPermission;
}
#endif
return YES; // Return YES for macOS versions that do not support ScreenCaptureKit
}
Expand Down

0 comments on commit d679b97

Please sign in to comment.