mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
Add error checking to DRM legacy
This commit is contained in:
parent
419400ae00
commit
c8c5aedaa2
1 changed files with 9 additions and 3 deletions
|
@ -9,11 +9,17 @@ static bool legacy_crtc_pageflip(struct wlr_drm_backend *backend,
|
||||||
struct wlr_drm_output *output, struct wlr_drm_crtc *crtc,
|
struct wlr_drm_output *output, struct wlr_drm_crtc *crtc,
|
||||||
uint32_t fb_id, drmModeModeInfo *mode) {
|
uint32_t fb_id, drmModeModeInfo *mode) {
|
||||||
if (mode) {
|
if (mode) {
|
||||||
drmModeSetCrtc(backend->fd, crtc->id, fb_id, 0, 0,
|
if (drmModeSetCrtc(backend->fd, crtc->id, fb_id, 0, 0,
|
||||||
&output->connector, 1, mode);
|
&output->connector, 1, mode)) {
|
||||||
|
wlr_log_errno(L_ERROR, "%s: Failed to set CRTC", output->output.name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
drmModePageFlip(backend->fd, crtc->id, fb_id, DRM_MODE_PAGE_FLIP_EVENT, output);
|
if (drmModePageFlip(backend->fd, crtc->id, fb_id, DRM_MODE_PAGE_FLIP_EVENT, output)) {
|
||||||
|
wlr_log_errno(L_ERROR, "%s: Failed to page flip", output->output.name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue