Use a slightly more explicit version cap for binding wl_drm, so we can
add other interfaces with different versioning schemes later.
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
{
struct dri2_egl_display *dri2_dpy = data;
- if (version > 1)
- version = 2;
if (strcmp(interface, "wl_drm") == 0) {
dri2_dpy->wl_drm =
- wl_registry_bind(registry, name, &wl_drm_interface, version);
+ wl_registry_bind(registry, name, &wl_drm_interface, MIN2(version, 2));
wl_drm_add_listener(dri2_dpy->wl_drm, &drm_listener, dri2_dpy);
}
}