diff options
| author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2025-02-05 12:03:34 +0200 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2025-03-26 15:44:00 +0200 |
| commit | a35d57fa9088fbccd468ad095c89aba096b2494e (patch) | |
| tree | 24b73249e7e741e36ed1b03a9b92461fd36bfa72 /kms++/src/plane.cpp | |
| parent | 1936a703bf1a3b27db9bb4d503b861f6d1fa2e74 (diff) | |
Use the fourcc helpers
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Diffstat (limited to 'kms++/src/plane.cpp')
| -rw-r--r-- | kms++/src/plane.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kms++/src/plane.cpp b/kms++/src/plane.cpp index bd426dd..93b3479 100644 --- a/kms++/src/plane.cpp +++ b/kms++/src/plane.cpp @@ -40,8 +40,10 @@ bool Plane::supports_format(PixelFormat fmt) const { auto p = m_priv->drm_plane; + uint32_t fcc = pixel_format_to_fourcc(fmt); + for (unsigned i = 0; i < p->count_formats; ++i) - if ((uint32_t)fmt == p->formats[i]) + if (fcc == p->formats[i]) return true; return false; @@ -94,7 +96,7 @@ vector<PixelFormat> Plane::get_formats() const vector<PixelFormat> r; for (unsigned i = 0; i < p->count_formats; ++i) - r.push_back((PixelFormat)p->formats[i]); + r.push_back(fourcc_to_pixel_format(p->formats[i])); return r; } |
