diff options
| author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2025-02-05 12:13:36 +0200 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2025-03-26 15:44:00 +0200 |
| commit | d08ecb56e9779d5190bc6423a1cad596756881ef (patch) | |
| tree | 176bad270f9a57c2de0885818c99489ea2afb2fd /kms++/src/plane.cpp | |
| parent | a35d57fa9088fbccd468ad095c89aba096b2494e (diff) | |
PixelFormats: Switch to non-fourcc PixelFormat enum
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, 5 insertions, 1 deletions
diff --git a/kms++/src/plane.cpp b/kms++/src/plane.cpp index 93b3479..7a4f26d 100644 --- a/kms++/src/plane.cpp +++ b/kms++/src/plane.cpp @@ -96,7 +96,11 @@ vector<PixelFormat> Plane::get_formats() const vector<PixelFormat> r; for (unsigned i = 0; i < p->count_formats; ++i) - r.push_back(fourcc_to_pixel_format(p->formats[i])); + try { + r.push_back(fourcc_to_pixel_format(p->formats[i])); + } catch (const std::invalid_argument&) { + // skip formats that are not supported + } return r; } |
