summaryrefslogtreecommitdiff
path: root/kms++/src/extframebuffer.cpp
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2025-02-05 12:03:34 +0200
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2025-03-26 15:44:00 +0200
commita35d57fa9088fbccd468ad095c89aba096b2494e (patch)
tree24b73249e7e741e36ed1b03a9b92461fd36bfa72 /kms++/src/extframebuffer.cpp
parent1936a703bf1a3b27db9bb4d503b861f6d1fa2e74 (diff)
Use the fourcc helpers
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Diffstat (limited to 'kms++/src/extframebuffer.cpp')
-rw-r--r--kms++/src/extframebuffer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kms++/src/extframebuffer.cpp b/kms++/src/extframebuffer.cpp
index 78b6fbb..d67cbad 100644
--- a/kms++/src/extframebuffer.cpp
+++ b/kms++/src/extframebuffer.cpp
@@ -44,10 +44,10 @@ ExtFramebuffer::ExtFramebuffer(Card& card, uint32_t width, uint32_t height, Pixe
int r;
if (modifiers.empty()) {
- r = drmModeAddFB2(card.fd(), width, height, (uint32_t)format, handles.data(), pitches.data(), offsets.data(), &id, 0);
+ r = drmModeAddFB2(card.fd(), width, height, pixel_format_to_fourcc(format), handles.data(), pitches.data(), offsets.data(), &id, 0);
} else {
modifiers.resize(4);
- r = drmModeAddFB2WithModifiers(card.fd(), width, height, (uint32_t)format, handles.data(), pitches.data(), offsets.data(), modifiers.data(), &id, DRM_MODE_FB_MODIFIERS);
+ r = drmModeAddFB2WithModifiers(card.fd(), width, height, pixel_format_to_fourcc(format), handles.data(), pitches.data(), offsets.data(), modifiers.data(), &id, DRM_MODE_FB_MODIFIERS);
}
if (r)