mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-04-26 13:05:34 -06:00
log macOS version
This commit is contained in:
parent
b2c34fb1df
commit
e41d63ffba
@ -539,7 +539,23 @@ namespace CafeSystem
|
||||
else
|
||||
platform = "Linux";
|
||||
#elif BOOST_OS_MACOS
|
||||
platform = "MacOS";
|
||||
char productVersion[256]{};
|
||||
size_t productVersionSize = sizeof(productVersion);
|
||||
const int productVersionResult = sysctlbyname("kern.osproductversion", productVersion, &productVersionSize, nullptr, 0);
|
||||
|
||||
char buildVersion[256]{};
|
||||
size_t buildVersionSize = sizeof(buildVersion);
|
||||
const int buildVersionResult = sysctlbyname("kern.osversion", buildVersion, &buildVersionSize, nullptr, 0);
|
||||
|
||||
if (productVersionResult == 0 && buildVersionResult == 0)
|
||||
buffer = fmt::format("macOS {} ({})", productVersion, buildVersion);
|
||||
else if (productVersionResult == 0)
|
||||
buffer = fmt::format("macOS {}", productVersion);
|
||||
else
|
||||
buffer = "macOS";
|
||||
|
||||
platform = buffer.c_str();
|
||||
|
||||
#elif BOOST_OS_BSD
|
||||
#if defined(__FreeBSD__)
|
||||
platform = "FreeBSD";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user