From 41cff490ad2de249258ec033501c611ea364f066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Wed, 30 Oct 2024 04:50:27 +0100 Subject: [PATCH] drm: don't print extra newline on connectors/modes help --- video/out/drm_common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/video/out/drm_common.c b/video/out/drm_common.c index 5961df52f2..e53f0d5d41 100644 --- a/video/out/drm_common.c +++ b/video/out/drm_common.c @@ -1135,11 +1135,12 @@ static void drm_show_connector_name_and_state_callback(struct mp_log *log, int c static void drm_show_available_connectors(struct mp_log *log, int card_no, const char *card_path) { + if (card_no) + mp_info(log, "\n"); mp_info(log, "Available connectors for card %d (%s):\n", card_no, card_path); drm_show_foreach_connector(log, card_no, card_path, drm_show_connector_name_and_state_callback); - mp_info(log, "\n"); } static void drm_show_connector_modes_callback(struct mp_log *log, int card_no, @@ -1150,10 +1151,11 @@ static void drm_show_connector_modes_callback(struct mp_log *log, int card_no, char other_connector_name[MAX_CONNECTOR_NAME_LEN]; get_connector_name(connector, other_connector_name); + if (card_no) + mp_info(log, "\n"); mp_info(log, "Available modes for drm-connector=%d.%s\n", card_no, other_connector_name); drm_show_available_modes(log, connector); - mp_info(log, "\n"); } static void drm_show_available_connectors_and_modes(struct mp_log *log,