From 44d02b3bfc34072f6e5be397fbdf3662bf0dac73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 9 Aug 2023 11:00:53 +0800 Subject: [PATCH] PhycialDisplay: only print physical sizes if detected successfully --- src/modules/phycialdisplay/phycialdisplay.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/phycialdisplay/phycialdisplay.c b/src/modules/phycialdisplay/phycialdisplay.c index b2df93b77..fa660034c 100644 --- a/src/modules/phycialdisplay/phycialdisplay.c +++ b/src/modules/phycialdisplay/phycialdisplay.c @@ -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 {