Display: report platform api used for detection

This commit is contained in:
Carter Li
2024-10-14 14:42:11 +08:00
parent 0f1ad5750d
commit 71a8978f41
13 changed files with 46 additions and 21 deletions
+5 -1
View File
@@ -6,7 +6,7 @@
#include <math.h>
#define FF_DISPLAY_NUM_FORMAT_ARGS 18
#define FF_DISPLAY_NUM_FORMAT_ARGS 19
static int sortByNameAsc(FFDisplayResult* a, FFDisplayResult* b)
{
@@ -181,6 +181,7 @@ void ffPrintDisplay(FFDisplayOptions* options)
FF_FORMAT_ARG(result->manufactureYear, "manufacture-year"),
FF_FORMAT_ARG(result->manufactureWeek, "manufacture-week"),
FF_FORMAT_ARG(buf, "serial"),
FF_FORMAT_ARG(result->platformApi, "platform-api"),
}));
}
}
@@ -395,6 +396,8 @@ void ffGenerateDisplayJsonResult(FF_MAYBE_UNUSED FFDisplayOptions* options, yyjs
yyjson_mut_obj_add_uint(doc, obj, "serial", item->serial);
else
yyjson_mut_obj_add_null(doc, obj, "serial");
yyjson_mut_obj_add_str(doc, obj, "platformApi", item->platformApi);
}
}
@@ -419,6 +422,7 @@ void ffPrintDisplayHelpFormat(void)
"Year of manufacturing - manufacture-year",
"Nth week of manufacturing in the year - manufacture-week",
"Serial number - serial",
"The platform API used when detecting the display - platform-api",
}));
}