From 1c7a36421eb291fb5fb7ca20fbbeaae48db27059 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 7 Aug 2025 06:38:27 +0300 Subject: framebuffer: Add support to deal with raw fourccs --- kms++/src/framebuffer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'kms++/src') diff --git a/kms++/src/framebuffer.cpp b/kms++/src/framebuffer.cpp index 773cf4b..3d251ce 100644 --- a/kms++/src/framebuffer.cpp +++ b/kms++/src/framebuffer.cpp @@ -25,7 +25,12 @@ Framebuffer::Framebuffer(Card& card, uint32_t id) if (fb) { m_width = fb->width; m_height = fb->height; - m_format = fourcc_to_pixel_format(fb->pixel_format); + m_fourcc = fb->pixel_format; + try { + m_format = fourcc_to_pixel_format(m_fourcc); + } catch (const invalid_argument& e) { + m_format = PixelFormat::Undefined; + } drmModeFreeFB2(fb); } else { -- cgit v1.2.3