10#include "../../stdafx.h"
12#include "../../3rdparty/fmt/format.h"
13#include "../../survey.h"
16#include <mach-o/arch.h>
19#include "../../safeguards.h"
21void SurveyOS(nlohmann::json &json)
23 int ver_maj, ver_min, ver_bug;
24 GetMacOSVersion(&ver_maj, &ver_min, &ver_bug);
26 const NXArchInfo *arch = NXGetLocalArchInfo();
29 json[
"release"] = fmt::format(
"{}.{}.{}", ver_maj, ver_min, ver_bug);
30 json[
"machine"] = arch !=
nullptr ? arch->description :
"unknown";
31 json[
"min_ver"] = MAC_OS_X_VERSION_MIN_REQUIRED;
32 json[
"max_ver"] = MAC_OS_X_VERSION_MAX_ALLOWED;
35 json[
"hardware_concurrency"] = std::thread::hardware_concurrency();
Functions related to MacOS support.
std::string SurveyMemoryToText(uint64_t memory)
Change the bytes of memory into a textual version rounded up to the biggest unit.