mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-24 09:27:31 +09:00
Issue #2022 - Part 2 - Add Ventura version detection. Also add Monterey and Ventura to the graphics driver blocklist.
This commit is contained in:
parent
069b11c14c
commit
70727d0a0b
5 changed files with 63 additions and 8 deletions
|
|
@ -27,6 +27,7 @@
|
|||
#define MACOS_VERSION_10_16_HEX 0x000A1000
|
||||
#define MACOS_VERSION_11_0_HEX 0x000B0000
|
||||
#define MACOS_VERSION_12_0_HEX 0x000C0000
|
||||
#define MACOS_VERSION_13_0_HEX 0x000D0000
|
||||
|
||||
#include "nsCocoaFeatures.h"
|
||||
#include "nsCocoaUtils.h"
|
||||
|
|
@ -212,7 +213,8 @@ nsCocoaFeatures::OnBigSurOrLater()
|
|||
(macOSVersion() >= MACOS_VERSION_11_0_HEX));
|
||||
}
|
||||
|
||||
/* static */ bool nsCocoaFeatures::OnMontereyOrLater()
|
||||
/* static */ bool
|
||||
nsCocoaFeatures::OnMontereyOrLater()
|
||||
{
|
||||
// Monterey pretends to be 10.16 and is indistinguishable from Big Sur.
|
||||
// In practice, this means that an Intel build can return false
|
||||
|
|
@ -221,6 +223,12 @@ nsCocoaFeatures::OnBigSurOrLater()
|
|||
return (macOSVersion() >= MACOS_VERSION_12_0_HEX);
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
nsCocoaFeatures::OnVenturaOrLater()
|
||||
{
|
||||
return (macOSVersion() >= MACOS_VERSION_13_0_HEX);
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
nsCocoaFeatures::IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix)
|
||||
{
|
||||
|
|
@ -234,7 +242,8 @@ nsCocoaFeatures::IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFi
|
|||
* for this purpose. Note: using this in a sandboxed process requires allowing
|
||||
* the sysctl in the sandbox policy.
|
||||
*/
|
||||
/* static */ bool nsCocoaFeatures::ProcessIsRosettaTranslated()
|
||||
/* static */ bool
|
||||
nsCocoaFeatures::ProcessIsRosettaTranslated()
|
||||
{
|
||||
int ret = 0;
|
||||
size_t size = sizeof(ret);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue