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
change timeout of asynchronous callback to 5s
  • Loading branch information
FischLu authored and FischLu committed Nov 2, 2024
commit 2b83e1b523fd1c839972cbc091bd057488c1dd32
3 changes: 2 additions & 1 deletion src/gui/osutils/macutils/AppKitImpl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ - (bool)enableScreenRecording
}];

// Wait for the asynchronous callback to complete
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
dispatch_time_t timeout = dispatch_time(DISPATCH_TIME_NOW, 5 * NSEC_PER_SEC);
dispatch_semaphore_wait(sema, timeout);

// Return the final result
return hasPermission;
Expand Down