the right way:
another way:
bool CPSFMactel::IsRosetta() {
bool isRosetta = false;
char model[32];
size_t len = sizeof(model);
int mib[2] = { CTL_HW, HW_MODEL };
if (sysctl(mib, 2, &model, &len, NULL, 0) == 0) {
isRosetta = (len == 9 && strcmp(model, "PowerMac") == 0);
}
return isRosetta;
}

You must be logged in to post a comment.