Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace legacy code on macOS builds #11428

Merged
merged 5 commits into from
Nov 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
the macos version need to be checked during runtime
  • Loading branch information
FischLu authored and FischLu committed Nov 3, 2024
commit d679b977529b6f76274e46cfa9392a88d9a1a721
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