UI: Add function to open privacy preferences on macOS
This commit is contained in:
parent
a70dd4d925
commit
b7a20cd5e4
@ -373,6 +373,17 @@ MacPermissionStatus CheckPermissionWithPrompt(MacPermissionType type,
|
||||
return permissionResponse;
|
||||
}
|
||||
|
||||
void OpenMacOSPrivacyPreferences(const char *tab)
|
||||
{
|
||||
NSURL *url = [NSURL
|
||||
URLWithString:
|
||||
[NSString
|
||||
stringWithFormat:
|
||||
@"x-apple.systempreferences:com.apple.preference.security?Privacy_%s",
|
||||
tab]];
|
||||
[[NSWorkspace sharedWorkspace] openURL:url];
|
||||
}
|
||||
|
||||
void TaskbarOverlayInit() {}
|
||||
void TaskbarOverlaySetStatus(TaskbarOverlayStatus status)
|
||||
{
|
||||
|
@ -105,4 +105,5 @@ MacPermissionStatus CheckPermissionWithPrompt(MacPermissionType type,
|
||||
bool prompt_for_permission);
|
||||
#define CheckPermission(x) CheckPermissionWithPrompt(x, false)
|
||||
#define RequestPermission(x) CheckPermissionWithPrompt(x, true)
|
||||
void OpenMacOSPrivacyPreferences(const char *tab);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user