- reduced string duplication in macOS detection

This commit is contained in:
alexey.lysiuk 2023-06-11 12:14:35 +03:00
parent 245dac814e
commit 170cc8d7ba

View file

@ -151,21 +151,21 @@ void I_DetectOS()
case 10:
switch (version.minorVersion)
{
case 12: name = "macOS Sierra"; break;
case 13: name = "macOS High Sierra"; break;
case 14: name = "macOS Mojave"; break;
case 15: name = "macOS Catalina"; break;
case 16: name = "macOS Big Sur"; break;
case 12: name = "Sierra"; break;
case 13: name = "High Sierra"; break;
case 14: name = "Mojave"; break;
case 15: name = "Catalina"; break;
case 16: name = "Big Sur"; break;
}
break;
case 11:
name = "macOS Big Sur";
name = "Big Sur";
break;
case 12:
name = "macOS Monterey";
name = "Monterey";
break;
case 13:
name = "macOS Ventura";
name = "Ventura";
break;
}
@ -186,7 +186,7 @@ void I_DetectOS()
"Unknown";
#endif
Printf("%s running %s %d.%d.%d (%s) %s\n", model, name,
Printf("%s running macOS %s %d.%d.%d (%s) %s\n", model, name,
int(version.majorVersion), int(version.minorVersion), int(version.patchVersion),
release, architecture);
}