aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/allocator/allocator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/render/allocator/allocator.c b/render/allocator/allocator.c
index 15d55a0d..5108ad04 100644
--- a/render/allocator/allocator.c
+++ b/render/allocator/allocator.c
@@ -139,6 +139,9 @@ struct wlr_allocator *wlr_allocator_autocreate(struct wlr_backend *backend,
struct wlr_renderer *renderer) {
// Note, drm_fd may be negative if unavailable
int drm_fd = wlr_backend_get_drm_fd(backend);
+ if (drm_fd < 0) {
+ drm_fd = wlr_renderer_get_drm_fd(renderer);
+ }
return allocator_autocreate_with_drm_fd(backend, renderer, drm_fd);
}