Преглед изворни кода

UI: Fix macOS permissions availability check

Documentation appears to wrongly claim that this is available in 10.15,
while in reality it's only 11+. This would lead to a crash on 10.15
since the symbol doesn't exist there.
gxalpha пре 3 година
родитељ
комит
f8b31f6f90
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      UI/platform-osx.mm

+ 1 - 1
UI/platform-osx.mm

@@ -323,7 +323,7 @@ MacPermissionStatus CheckPermissionWithPrompt(MacPermissionType type,
 		break;
 		break;
 	}
 	}
 	case kScreenCapture: {
 	case kScreenCapture: {
-		if (@available(macOS 10.15, *)) {
+		if (@available(macOS 11.0, *)) {
 			permissionResponse = (CGPreflightScreenCaptureAccess()
 			permissionResponse = (CGPreflightScreenCaptureAccess()
 						      ? kPermissionAuthorized
 						      ? kPermissionAuthorized
 						      : kPermissionDenied);
 						      : kPermissionDenied);