From e166eeb13ddfa70df37610b1d21adf043279b222 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Tue, 8 Jun 2021 10:19:43 +0300 Subject: [PATCH] - added detection of macOS 12 Monterey --- src/common/platform/posix/cocoa/i_main.mm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/common/platform/posix/cocoa/i_main.mm b/src/common/platform/posix/cocoa/i_main.mm index 7159d31ea..732648e5b 100644 --- a/src/common/platform/posix/cocoa/i_main.mm +++ b/src/common/platform/posix/cocoa/i_main.mm @@ -101,8 +101,9 @@ void I_DetectOS() const char* name = "Unknown version"; - if (10 == version.majorVersion) + switch (version.majorVersion) { + case 10: switch (version.minorVersion) { case 9: name = "OS X Mavericks"; break; @@ -114,13 +115,13 @@ void I_DetectOS() case 15: name = "macOS Catalina"; break; case 16: name = "macOS Big Sur"; break; } - } - else if (11 == version.majorVersion) - { - switch (version.minorVersion) - { - case 0: name = "macOS Big Sur"; break; - } + break; + case 11: + name = "macOS Big Sur"; + break; + case 12: + name = "macOS Monterey"; + break; } char release[16] = "unknown";