summaryrefslogtreecommitdiff
path: root/kms++/src
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2025-08-07 06:38:27 +0300
committerTomi Valkeinen <tomi.valkeinen@iki.fi>2025-08-07 18:33:23 +0300
commit1c7a36421eb291fb5fb7ca20fbbeaae48db27059 (patch)
treec4739c80d6151e5139bb4f50434a5c1136bfb62f /kms++/src
parent0f18e6d0616b597fc32bba78b38dfc5c922ec9a4 (diff)
framebuffer: Add support to deal with raw fourccs
Diffstat (limited to 'kms++/src')
-rw-r--r--kms++/src/framebuffer.cpp7
1 files changed, 6 insertions, 1 deletions
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 {