summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2015-07-29 17:19:04 +0100
committerEmil Velikov <[email protected]>2015-08-07 19:14:37 +0100
commitbeddb0a2371059829b20240058931b8c9fd5be40 (patch)
tree73d8babc6643300d68275a6ca8076d720eafbda9 /src
parentbf66988b08786c123804c2be8846a6a21cf200ad (diff)
egl/x11: fetch the device_name prior to driver_name
With the follow up commits we're about to further reshuffle things. Thus we'll honour our our driver_name lookup (src/loader), and use the one provided by xserver as a fall-back. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/egl/drivers/dri2/platform_x11.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 92e733a2330..2e970703774 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -579,17 +579,17 @@ dri2_x11_connect(struct dri2_egl_display *dri2_dpy)
return EGL_FALSE;
}
- driver_name = xcb_dri2_connect_driver_name (connect);
- dri2_dpy->driver_name =
- strndup(driver_name,
- xcb_dri2_connect_driver_name_length(connect));
-
device_name = xcb_dri2_connect_device_name (connect);
dri2_dpy->device_name =
strndup(device_name,
xcb_dri2_connect_device_name_length(connect));
+ driver_name = xcb_dri2_connect_driver_name (connect);
+ dri2_dpy->driver_name =
+ strndup(driver_name,
+ xcb_dri2_connect_driver_name_length(connect));
+
if (dri2_dpy->device_name == NULL || dri2_dpy->driver_name == NULL) {
free(dri2_dpy->device_name);
free(dri2_dpy->driver_name);