Host (macOS): prefers hw.product than hw.model

... because `HW_MODEL` is deprecated
This commit is contained in:
李通洲
2025-12-17 13:55:57 +08:00
parent 1d4d68f6e0
commit 945aed7160
+2 -1
View File
@@ -45,7 +45,8 @@ const char* getOthersByIokit(FFHostResult* host)
const char* ffDetectHost(FFHostResult* host)
{
const char* error = ffSysctlGetString("hw.model", &host->family);
const char* error = ffSysctlGetString("hw.product", &host->family);
if (error) error = ffSysctlGetString("hw.model", &host->family);
if (error) return error;
ffStrbufSetStatic(&host->name, ffHostGetMacProductNameWithHwModel(&host->family));