aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-08-02 14:00:29 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-08-02 14:00:29 +0200
commit4ca90e203584057e3b7a0dc84e6ee8bf8b42f7bf (patch)
treee41913abb2e8dc7d8fdc852713d632089e4c1d35
parent829d7a6afc49e0e35d4c782ab500b7bf64130d95 (diff)
parentbe9c8c018690ae83db8317856cb73397eec046e2 (diff)
downloadglutin-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.rs5
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