We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d48c76b commit 601b970Copy full SHA for 601b970
src/modules/display/display.c
@@ -148,7 +148,7 @@ void ffPrintDisplay(FFDisplayOptions* options)
148
}
149
else
150
{
151
- double ppi = sqrt(result->width * result->width + result->height * result->height) / inch;
+ double ppi = inch == 0 ? 0 : sqrt(result->width * result->width + result->height * result->height) / inch;
152
bool hdrEnabled = result->hdrStatus == FF_DISPLAY_HDR_STATUS_ENABLED;
153
bool hdrCompatible = result->hdrStatus == FF_DISPLAY_HDR_STATUS_SUPPORTED || result->hdrStatus == FF_DISPLAY_HDR_STATUS_ENABLED;
154
uint32_t iInch = (uint32_t) (inch + 0.5), iPpi = (uint32_t) (ppi + 0.5);
0 commit comments