mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
UI: Add functions to check for and request macOS permissions
Adds functions to check and/or request specific macOS permissions (audio device access, video device access, accessibility access, and screen capture access). By default only audio capture, video capture, and accessibility are requested on launch - the first two have straight-forward "Yes/No" prompts, the latter requires people to enable OBS in the settings application (but is required for hotkey functionality, independent of scene setups).
This commit is contained in:
@@ -2185,6 +2185,15 @@ static int run_program(fstream &logFile, int argc, char *argv[])
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
MacPermissionStatus audio_permission =
|
||||
CheckPermission(kAudioDeviceAccess);
|
||||
MacPermissionStatus video_permission =
|
||||
CheckPermission(kVideoDeviceAccess);
|
||||
MacPermissionStatus accessibility_permission =
|
||||
CheckPermission(kAccessibility);
|
||||
MacPermissionStatus screen_permission =
|
||||
CheckPermission(kScreenCapture);
|
||||
|
||||
bool rosettaTranslated = os_get_emulation_status();
|
||||
blog(LOG_INFO, "Rosetta translation used: %s",
|
||||
rosettaTranslated ? "true" : "false");
|
||||
|
||||
Reference in New Issue
Block a user