Global: fix percent formatting for --*-format

fix #535
This commit is contained in:
李通洲
2023-08-24 09:12:24 +08:00
parent 7218164088
commit 326d83f25b
6 changed files with 25 additions and 13 deletions
+3 -1
View File
@@ -36,8 +36,10 @@ void ffPrintCPUUsage(FFCPUUsageOptions* options)
}
else
{
FF_STRBUF_AUTO_DESTROY percentageStr = ffStrbufCreate();
ffAppendPercentNum(&percentageStr, percentage, 50, 80, false);
ffPrintFormat(FF_CPUUSAGE_DISPLAY_NAME, 0, &options->moduleArgs, FF_CPUUSAGE_NUM_FORMAT_ARGS, (FFformatarg[]){
{FF_FORMAT_ARG_TYPE_DOUBLE, &percentage}
{FF_FORMAT_ARG_TYPE_STRBUF, &percentageStr}
});
}
}