PhycialDisplay: only print physical sizes if detected successfully

This commit is contained in:
李通洲 2023-08-09 11:00:53 +08:00
parent 008c9a597e
commit 44d02b3bfc
No known key found for this signature in database
GPG Key ID: 269AD4F5325A22A3

View File

@ -48,7 +48,11 @@ void ffPrintPhycialDisplay(FFPhycialDisplayOptions* options)
}
ffPrintLogoAndKey(key.chars, 0, NULL, &options->moduleArgs.keyColor);
printf("%upx x %upx - %umm x %umm (%.2f inches)\n", display->width, display->height, display->phycialWidth, display->phycialHeight, inch);
printf("%upx x %upx", display->width, display->height);
if (inch > 0)
printf(" - %umm x %umm (%.2f inches)\n", display->phycialWidth, display->phycialHeight, inch);
else
putchar('\n');
}
else
{