OS: simplify macOS OS detection code; print BuildID on macOS ( to match neofetch )

This commit is contained in:
Carter Li
2022-10-02 01:50:24 +08:00
parent 01dbd0c266
commit 145e09d164
3 changed files with 23 additions and 50 deletions
+8
View File
@@ -39,6 +39,14 @@ static void buildOutputDefault(const FFOSResult* os, FFstrbuf* result)
ffStrbufAppend(result, &os->version);
}
#ifdef __APPLE__
if(os->buildID.length > 0)
{
ffStrbufAppendC(result, ' ');
ffStrbufAppend(result, &os->buildID);
}
#endif
//Append variant if it is missing
if(os->variant.length > 0 && ffStrbufFirstIndex(result, &os->variant) == result->length)
{