Temp: Display: support better temperature value formatting

Fix #737
This commit is contained in:
李通洲
2024-02-26 10:46:13 +08:00
parent 1c87693867
commit a0c47204bb
10 changed files with 227 additions and 51 deletions
+3 -1
View File
@@ -72,11 +72,13 @@ static void printGPUResult(FFGPUOptions* options, uint8_t index, const FFGPUResu
}
else
{
FF_STRBUF_AUTO_DESTROY tempStr = ffStrbufCreate();
ffParseTemperature(gpu->temperature, &tempStr);
ffPrintFormat(FF_GPU_MODULE_NAME, index, &options->moduleArgs, FF_GPU_NUM_FORMAT_ARGS, (FFformatarg[]){
{FF_FORMAT_ARG_TYPE_STRBUF, &gpu->vendor},
{FF_FORMAT_ARG_TYPE_STRBUF, &gpu->name},
{FF_FORMAT_ARG_TYPE_STRBUF, &gpu->driver},
{FF_FORMAT_ARG_TYPE_DOUBLE, &gpu->temperature},
{FF_FORMAT_ARG_TYPE_STRBUF, &tempStr},
{FF_FORMAT_ARG_TYPE_INT, &gpu->coreCount},
{FF_FORMAT_ARG_TYPE_STRING, type},
{FF_FORMAT_ARG_TYPE_UINT64, &gpu->dedicated.total},