Skip to content

Commit

Permalink
drm: Fix metadata blob for nested
Browse files Browse the repository at this point in the history
  • Loading branch information
misyltoad committed Oct 18, 2023
1 parent 2f8edeb commit 37c6e16
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/drm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3107,18 +3107,19 @@ std::pair<uint32_t, uint32_t> drm_get_connector_identifier(struct drm_t *drm)
std::shared_ptr<wlserver_hdr_metadata> drm_create_hdr_metadata_blob(struct drm_t *drm, hdr_output_metadata *metadata)
{
uint32_t blob = 0;
if (BIsNested())
if (!BIsNested())
{
int ret = drmModeCreatePropertyBlob(drm->fd, metadata, sizeof(*metadata), &blob);

if (ret != 0) {
drm_log.errorf("Failed to create blob for HDR_OUTPUT_METADATA. (%s) Falling back to null blob.", strerror(-ret));
blob = 0;
}
}

if (!blob)
return nullptr;

if (!blob)
return nullptr;
}

return std::make_shared<wlserver_hdr_metadata>(metadata, blob);
}
Expand Down

0 comments on commit 37c6e16

Please sign in to comment.