From be9c8c018690ae83db8317856cb73397eec046e2 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Tue, 28 Jul 2015 20:44:21 +0200 Subject: Try libEGL.so.1 before libEGL.so --- src/api/x11/xdisplay.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/api/x11/xdisplay.rs b/src/api/x11/xdisplay.rs index 2576b74..c960c00 100644 --- a/src/api/x11/xdisplay.rs +++ b/src/api/x11/xdisplay.rs @@ -63,7 +63,10 @@ impl XConnection { // TODO: use something safer than raw "dlopen" let egl = { - let libegl = unsafe { dlopen::dlopen(b"libEGL.so\0".as_ptr() as *const _, dlopen::RTLD_NOW) }; + let mut libegl = unsafe { dlopen::dlopen(b"libEGL.so.1\0".as_ptr() as *const _, dlopen::RTLD_NOW) }; + if libegl.is_null() { + libegl = unsafe { dlopen::dlopen(b"libEGL.so\0".as_ptr() as *const _, dlopen::RTLD_NOW) }; + } if libegl.is_null() { None -- cgit v1.2.3