diff --git a/src/api/x11/xdisplay.rs b/src/api/x11/xdisplay.rs index 2576b745..c960c004 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