mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
Display: report ppi to 0 if screen size is not available
This commit is contained in:
@@ -148,7 +148,7 @@ void ffPrintDisplay(FFDisplayOptions* options)
|
||||
}
|
||||
else
|
||||
{
|
||||
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;
|
||||
bool hdrEnabled = result->hdrStatus == FF_DISPLAY_HDR_STATUS_ENABLED;
|
||||
bool hdrCompatible = result->hdrStatus == FF_DISPLAY_HDR_STATUS_SUPPORTED || result->hdrStatus == FF_DISPLAY_HDR_STATUS_ENABLED;
|
||||
uint32_t iInch = (uint32_t) (inch + 0.5), iPpi = (uint32_t) (ppi + 0.5);
|
||||
|
||||
Reference in New Issue
Block a user