render: use dev_t when creating renderer

We don't actually need to open a DRM node here. We just need a way
to reference a DRM node. A dev_t is better suited for this.
This commit is contained in:
Simon Ser 2023-10-04 15:05:19 +02:00
parent 986a2d9f66
commit 03c344de59
9 changed files with 86 additions and 79 deletions

View file

@ -476,8 +476,8 @@ static void load_gl_proc(void *proc_ptr, const char *name) {
*(void **)proc_ptr = proc;
}
struct wlr_renderer *wlr_gles2_renderer_create_with_drm_fd(int drm_fd) {
struct wlr_egl *egl = wlr_egl_create_with_drm_fd(drm_fd);
struct wlr_renderer *wlr_gles2_renderer_create_with_drm_dev_id(dev_t dev_id) {
struct wlr_egl *egl = wlr_egl_create_with_drm_dev_id(dev_id);
if (egl == NULL) {
wlr_log(WLR_ERROR, "Could not initialize EGL");
return NULL;