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

... because `HW_MODEL` is deprecated
This commit is contained in:
李通洲 committed 2025-12-18 10:00:05 +08:00
1 parent 1d4d68f6e0
commit 945aed7160
1 file changed
+2 -1
+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));