From eed48bd102980a6ba664eb795e46ecf4b754eb2c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 28 Aug 2015 09:58:44 +1000 Subject: [PATCH] tools: resolutions with dpi 0 are disabled, print it as that Signed-off-by: Peter Hutterer --- tools/ratbag-command.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/ratbag-command.c b/tools/ratbag-command.c index f5327771..d1785bdb 100644 --- a/tools/ratbag-command.c +++ b/tools/ratbag-command.c @@ -330,9 +330,12 @@ ratbag_cmd_info(struct ratbag *ratbag, uint32_t flags, int argc, char **argv) res = ratbag_profile_get_resolution(profile, j); dpi = ratbag_resolution_get_dpi(res); rate = ratbag_resolution_get_report_rate(res); - printf(" %d: %ddpi @ %dHz%s%s\n", j, dpi, rate, - ratbag_resolution_is_active(res) ? " (active)" : "", - ratbag_resolution_is_default(res) ? " (default)" : ""); + if (dpi == 0) + printf(" %d: \n", j); + else + printf(" %d: %ddpi @ %dHz%s%s\n", j, dpi, rate, + ratbag_resolution_is_active(res) ? " (active)" : "", + ratbag_resolution_is_default(res) ? " (default)" : ""); ratbag_resolution_unref(res); }