aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2024-08-30 02:10:38 +0200
committerSimon Ser <contact@emersion.fr>2024-09-20 19:48:33 +0200
commita8b6d028689735655a2fd948de1f34999a8ac40b (patch)
treebb48b16ef79b0b9bbc1280574f5194d35701345a
parent12796fb0b364dcd43a5a500a92b9fb1ab653fb8c (diff)
config/output: Stringify render format when logging it
(cherry picked from commit 9765c29be11f04f903a45f34b9142a865784fc46)
-rw-r--r--sway/config/output.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/config/output.c b/sway/config/output.c
index 3fdbfe0b..3e7d8ebd 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -10,6 +10,7 @@
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_output_swapchain_manager.h>
+#include <xf86drm.h>
#include "sway/config.h"
#include "sway/input/cursor.h"
#include "sway/output.h"
@@ -685,7 +686,9 @@ static void dump_output_state(struct wlr_output *wlr_output, struct wlr_output_s
sway_log(SWAY_DEBUG, " enabled: %s", state->enabled ? "yes" : "no");
}
if (state->committed & WLR_OUTPUT_STATE_RENDER_FORMAT) {
- sway_log(SWAY_DEBUG, " render_format: %d", state->render_format);
+ char *format_name = drmGetFormatName(state->render_format);
+ sway_log(SWAY_DEBUG, " render_format: %s", format_name);
+ free(format_name);
}
if (state->committed & WLR_OUTPUT_STATE_MODE) {
if (state->mode_type == WLR_OUTPUT_STATE_MODE_CUSTOM) {