mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +01:00
Percentage: prepare to make threshold configurable
This commit is contained in:
@@ -60,7 +60,7 @@ static void printGPUResult(FFGPUOptions* options, uint8_t index, const FFGPUResu
|
||||
if(gpu->dedicated.used != FF_GPU_VMEM_SIZE_UNSET)
|
||||
{
|
||||
ffStrbufAppendS(&output, ", ");
|
||||
ffPercentAppendNum(&output, (double) gpu->dedicated.used / (double) gpu->dedicated.total * 100.0, 50, 80, false);
|
||||
ffPercentAppendNum(&output, (double) gpu->dedicated.used / (double) gpu->dedicated.total * 100.0, options->percent, false);
|
||||
}
|
||||
ffStrbufAppendC(&output, ')');
|
||||
}
|
||||
@@ -363,6 +363,7 @@ void ffInitGPUOptions(FFGPUOptions* options)
|
||||
options->forceVulkan = false;
|
||||
options->temp = false;
|
||||
options->hideType = FF_GPU_TYPE_UNKNOWN;
|
||||
options->percent = (FFPercentConfig) { 50, 80 };
|
||||
}
|
||||
|
||||
void ffDestroyGPUOptions(FFGPUOptions* options)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// This file will be included in "fastfetch.h", do NOT put unnecessary things here
|
||||
|
||||
#include "common/option.h"
|
||||
#include "common/percent.h"
|
||||
|
||||
typedef enum FFGPUType
|
||||
{
|
||||
@@ -20,4 +21,5 @@ typedef struct FFGPUOptions
|
||||
bool temp;
|
||||
bool driverSpecific;
|
||||
bool forceVulkan;
|
||||
FFPercentConfig percent;
|
||||
} FFGPUOptions;
|
||||
|
||||
Reference in New Issue
Block a user