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

This commit is contained in:
Carter Li committed 2022-10-02 01:54:43 +08:00
1 parent 01dbd0c266
commit 145e09d164
3 files changed
+23 -50

No files matched your search

+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)
{