@@ -76,17 +76,24 @@ void ffPrintCPUUsage(FFCPUUsageOptions* options)
76
76
else
77
77
{
78
78
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 );
80
81
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 );
82
84
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 );
84
87
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 );
86
90
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 );
88
93
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
+
90
97
FF_PRINT_FORMAT_CHECKED (FF_CPUUSAGE_DISPLAY_NAME , 0 , & options -> moduleArgs , FF_PRINT_TYPE_DEFAULT , FF_CPUUSAGE_NUM_FORMAT_ARGS , ((FFformatarg []){
91
98
FF_FORMAT_ARG (avgNum , "avg" ),
92
99
FF_FORMAT_ARG (maxNum , "max" ),
0 commit comments