Skip to content

Commit 211fd4b

Browse files
committed
Display: add hdr-compatible
Fix #1376
1 parent 7220634 commit 211fd4b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/modules/display/display.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include <math.h>
88

9-
#define FF_DISPLAY_NUM_FORMAT_ARGS 19
9+
#define FF_DISPLAY_NUM_FORMAT_ARGS 20
1010

1111
static int sortByNameAsc(FFDisplayResult* a, FFDisplayResult* b)
1212
{
@@ -140,6 +140,7 @@ void ffPrintDisplay(FFDisplayOptions* options)
140140
{
141141
double ppi = sqrt(result->width * result->width + result->height * result->height) / inch;
142142
bool hdrEnabled = result->hdrStatus == FF_DISPLAY_HDR_STATUS_ENABLED;
143+
bool hdrCompatible = result->hdrStatus == FF_DISPLAY_HDR_STATUS_SUPPORTED || result->hdrStatus == FF_DISPLAY_HDR_STATUS_ENABLED;
143144
uint32_t iInch = (uint32_t) (inch + 0.5), iPpi = (uint32_t) (ppi + 0.5);
144145

145146
char refreshRate[16];
@@ -182,6 +183,7 @@ void ffPrintDisplay(FFDisplayOptions* options)
182183
FF_FORMAT_ARG(result->manufactureWeek, "manufacture-week"),
183184
FF_FORMAT_ARG(buf, "serial"),
184185
FF_FORMAT_ARG(result->platformApi, "platform-api"),
186+
FF_FORMAT_ARG(hdrCompatible, "hdr-compatible"),
185187
}));
186188
}
187189
}
@@ -423,6 +425,7 @@ void ffPrintDisplayHelpFormat(void)
423425
"Nth week of manufacturing in the year - manufacture-week",
424426
"Serial number - serial",
425427
"The platform API used when detecting the display - platform-api",
428+
"True if the display is HDR compatible - hdr-compatible",
426429
}));
427430
}
428431

0 commit comments

Comments
 (0)