drm: de-indent loop in find_primary_plane
This commit is contained in:
parent
b2f016dfe5
commit
637e5341d4
1 changed files with 23 additions and 22 deletions
|
@ -180,7 +180,9 @@ static struct plane *find_primary_plane(struct drm_t *drm)
|
||||||
for (size_t i = 0; i < drm->planes.size() && ret == nullptr; i++) {
|
for (size_t i = 0; i < drm->planes.size() && ret == nullptr; i++) {
|
||||||
drmModePlane *plane = drm->planes[i].plane;
|
drmModePlane *plane = drm->planes[i].plane;
|
||||||
|
|
||||||
if (plane->possible_crtcs & (1 << drm->crtc_index)) {
|
if (!(plane->possible_crtcs & (1 << drm->crtc_index)))
|
||||||
|
continue;
|
||||||
|
|
||||||
drmModeObjectPropertiesPtr props =
|
drmModeObjectPropertiesPtr props =
|
||||||
drmModeObjectGetProperties(drm->fd, plane->plane_id, DRM_MODE_OBJECT_PLANE);
|
drmModeObjectGetProperties(drm->fd, plane->plane_id, DRM_MODE_OBJECT_PLANE);
|
||||||
|
|
||||||
|
@ -205,7 +207,6 @@ static struct plane *find_primary_plane(struct drm_t *drm)
|
||||||
|
|
||||||
drmModeFreeObjectProperties(props);
|
drmModeFreeObjectProperties(props);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ( ret == nullptr )
|
if ( ret == nullptr )
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
Loading…
Reference in a new issue