- output Mac model identifier to startup window

This commit is contained in:
alexey.lysiuk 2018-07-15 14:26:29 +03:00
parent 5c7dd28f7d
commit f554120086

View file

@ -170,6 +170,10 @@ static void I_DetectOS()
size_t size = sizeof release - 1; size_t size = sizeof release - 1;
sysctlbyname("kern.osversion", release, &size, nullptr, 0); sysctlbyname("kern.osversion", release, &size, nullptr, 0);
char model[64] = "Unknown Mac model";
size = sizeof model - 1;
sysctlbyname("hw.model", model, &size, nullptr, 0);
const char* const architecture = const char* const architecture =
#ifdef __i386__ #ifdef __i386__
"32-bit Intel"; "32-bit Intel";
@ -179,7 +183,7 @@ static void I_DetectOS()
"Unknown"; "Unknown";
#endif #endif
Printf("OS: %s %d.%d.%d (%s) %s\n", name, Printf("%s running %s %d.%d.%d (%s) %s\n", model, name,
int(version.majorVersion), int(version.minorVersion), int(version.patchVersion), int(version.majorVersion), int(version.minorVersion), int(version.patchVersion),
release, architecture); release, architecture);
} }