diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-08-02 14:00:29 +0200 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-08-02 14:00:29 +0200 |
commit | 4ca90e203584057e3b7a0dc84e6ee8bf8b42f7bf (patch) | |
tree | e41913abb2e8dc7d8fdc852713d632089e4c1d35 | |
parent | 829d7a6afc49e0e35d4c782ab500b7bf64130d95 (diff) | |
parent | be9c8c018690ae83db8317856cb73397eec046e2 (diff) | |
download | glutin-4ca90e203584057e3b7a0dc84e6ee8bf8b42f7bf.tar.gz glutin-4ca90e203584057e3b7a0dc84e6ee8bf8b42f7bf.zip |
Merge pull request #556 from tomaka/egl-lib
Try libEGL.so.1 before libEGL.so
-rw-r--r-- | src/api/x11/xdisplay.rs | 5 |
1 files changed, 4 insertions, 1 deletions
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 |