Try libEGL.so.1 before libEGL.so

This commit is contained in:
Pierre Krieger 2015-07-28 20:44:21 +02:00
parent 829d7a6afc
commit be9c8c0186

View file

@ -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