Display: print [HDR] if enabled

This commit is contained in:
李通洲
2024-07-21 00:05:11 +08:00
parent b89eeaa954
commit 9559db556d
+10 -1
View File
@@ -6,7 +6,7 @@
#include <math.h>
#define FF_DISPLAY_NUM_FORMAT_ARGS 13
#define FF_DISPLAY_NUM_FORMAT_ARGS 16
static int sortByNameAsc(FFDisplayResult* a, FFDisplayResult* b)
{
@@ -126,6 +126,9 @@ void ffPrintDisplay(FFDisplayOptions* options)
if(result->type != FF_DISPLAY_TYPE_UNKNOWN)
ffStrbufAppendS(&buffer, result->type == FF_DISPLAY_TYPE_BUILTIN ? " [Built-in]" : " [External]");
if (result->hdrEnabled)
ffStrbufAppendS(&buffer, " [HDR]");
if(moduleIndex > 0 && result->primary)
ffStrbufAppendS(&buffer, " *");
@@ -150,6 +153,9 @@ void ffPrintDisplay(FFDisplayOptions* options)
{FF_FORMAT_ARG_TYPE_UINT, &result->physicalHeight, "physical-height"},
{FF_FORMAT_ARG_TYPE_DOUBLE, &inch, "inch"},
{FF_FORMAT_ARG_TYPE_DOUBLE, &ppi, "ppi"},
{FF_FORMAT_ARG_TYPE_UINT8, &result->bitDepth, "bit-depth"},
{FF_FORMAT_ARG_TYPE_BOOL, &result->hdrEnabled, "hdr-enabled"},
{FF_FORMAT_ARG_TYPE_BOOL, &result->wcgEnabled, "wcg-enabled"},
}));
}
}
@@ -352,6 +358,9 @@ void ffPrintDisplayHelpFormat(void)
"Screen physical height (in millimeters) - physical-height",
"Physical diagonal length in inches - inch",
"Pixels per inch (PPI) - ppi",
"Bits per color channel - bit-depth",
"True if high dynamic range (HDR) is enabled - hdr-enabled",
"True if wide color gamut (WCG) is enabled - wcg-enabled",
}));
}