@@ -76,17 +76,24 @@ void ffPrintCPUUsage(FFCPUUsageOptions* options)
7676 else
7777 {
7878 FF_STRBUF_AUTO_DESTROY avgNum = ffStrbufCreate ();
79- ffPercentAppendNum (& avgNum , avgValue , options -> percent , false, & options -> moduleArgs );
79+ if (percentType & FF_PERCENTAGE_TYPE_NUM_BIT )
80+ ffPercentAppendNum (& avgNum , avgValue , options -> percent , false, & options -> moduleArgs );
8081 FF_STRBUF_AUTO_DESTROY avgBar = ffStrbufCreate ();
81- ffPercentAppendBar (& avgBar , avgValue , options -> percent , & options -> moduleArgs );
82+ if (percentType & FF_PERCENTAGE_TYPE_BAR_BIT )
83+ ffPercentAppendBar (& avgBar , avgValue , options -> percent , & options -> moduleArgs );
8284 FF_STRBUF_AUTO_DESTROY minNum = ffStrbufCreate ();
83- ffPercentAppendNum (& minNum , minValue , options -> percent , false, & options -> moduleArgs );
85+ if (percentType & FF_PERCENTAGE_TYPE_NUM_BIT )
86+ ffPercentAppendNum (& minNum , minValue , options -> percent , false, & options -> moduleArgs );
8487 FF_STRBUF_AUTO_DESTROY minBar = ffStrbufCreate ();
85- ffPercentAppendBar (& minBar , minValue , options -> percent , & options -> moduleArgs );
88+ if (percentType & FF_PERCENTAGE_TYPE_BAR_BIT )
89+ ffPercentAppendBar (& minBar , minValue , options -> percent , & options -> moduleArgs );
8690 FF_STRBUF_AUTO_DESTROY maxNum = ffStrbufCreate ();
87- ffPercentAppendNum (& maxNum , maxValue , options -> percent , false, & options -> moduleArgs );
91+ if (percentType & FF_PERCENTAGE_TYPE_NUM_BIT )
92+ ffPercentAppendNum (& maxNum , maxValue , options -> percent , false, & options -> moduleArgs );
8893 FF_STRBUF_AUTO_DESTROY maxBar = ffStrbufCreate ();
89- ffPercentAppendBar (& maxBar , maxValue , options -> percent , & options -> moduleArgs );
94+ if (percentType & FF_PERCENTAGE_TYPE_BAR_BIT )
95+ ffPercentAppendBar (& maxBar , maxValue , options -> percent , & options -> moduleArgs );
96+
9097 FF_PRINT_FORMAT_CHECKED (FF_CPUUSAGE_DISPLAY_NAME , 0 , & options -> moduleArgs , FF_PRINT_TYPE_DEFAULT , FF_CPUUSAGE_NUM_FORMAT_ARGS , ((FFformatarg []){
9198 FF_FORMAT_ARG (avgNum , "avg" ),
9299 FF_FORMAT_ARG (maxNum , "max" ),
0 commit comments