gbm: don't select opaque pixel formats for cursor

This commit is contained in:
Vaxry 2024-09-08 00:49:01 +01:00
parent a8eb8ae014
commit 9996d365ad
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ static SDRMFormat guessFormatFrom(std::vector<SDRMFormat> formats, bool cursor,
return *it; return *it;
} }
if (!scanout) { if (!scanout || cursor /* don't set opaque for cursor plane */) {
if (auto it = std::find_if(formats.begin(), formats.end(), [](const auto& f) { return f.drmFormat == DRM_FORMAT_ARGB8888 || f.drmFormat == DRM_FORMAT_ABGR8888; }); if (auto it = std::find_if(formats.begin(), formats.end(), [](const auto& f) { return f.drmFormat == DRM_FORMAT_ARGB8888 || f.drmFormat == DRM_FORMAT_ABGR8888; });
it != formats.end()) it != formats.end())
return *it; return *it;