summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Stone <[email protected]>2017-06-10 14:54:44 +0100
committerDaniel Stone <[email protected]>2017-07-14 14:14:05 +0100
commit5295df63ad7822e14e7dabfc107bc416271bfcdc (patch)
tree70a1a6cefe39c894fe22bbd555caff6ccb330ce0
parent4b8ef27e849311b8559ef77a37004e1370ce3dac (diff)
egl/wayland: Use MIN2 for wl_drm version
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 <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index b3574e03b28..ee68284217b 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -986,11 +986,9 @@ registry_handle_global_drm(void *data, struct wl_registry *registry,
{
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);
}
}