diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-09-14 21:14:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-14 21:14:18 -0400 |
commit | df991a55ab23017d4c5d90d344d472e904dc682f (patch) | |
tree | b1c1ab11c651f0ec614446244bf29e371e6aa898 /backend/drm/drm.c | |
parent | 0210905eef94216c42a070b638c6f3e6d81512e2 (diff) | |
parent | cb293f09e774d179cdd3d9351a2834d473fd823c (diff) |
Merge pull request #1241 from emersion/output-enable-error-checking
output: make wlr_output_enable return a bool
Diffstat (limited to 'backend/drm/drm.c')
-rw-r--r-- | backend/drm/drm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index e37eba74..e61e624d 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -342,17 +342,17 @@ static void drm_connector_start_renderer(struct wlr_drm_connector *conn) { } } -void enable_drm_connector(struct wlr_output *output, bool enable) { +bool enable_drm_connector(struct wlr_output *output, bool enable) { struct wlr_drm_connector *conn = (struct wlr_drm_connector *)output; if (conn->state != WLR_DRM_CONN_CONNECTED && conn->state != WLR_DRM_CONN_NEEDS_MODESET) { - return; + return false; } struct wlr_drm_backend *drm = (struct wlr_drm_backend *)output->backend; bool ok = drm->iface->conn_enable(drm, conn, enable); if (!ok) { - return; + return false; } if (enable) { @@ -360,6 +360,7 @@ void enable_drm_connector(struct wlr_output *output, bool enable) { } wlr_output_update_enabled(&conn->output, enable); + return true; } static void realloc_planes(struct wlr_drm_backend *drm, const uint32_t *crtc_in, |