diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-07-28 20:44:21 +0200 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-07-28 20:48:12 +0200 |
commit | be9c8c018690ae83db8317856cb73397eec046e2 (patch) | |
tree | e41913abb2e8dc7d8fdc852713d632089e4c1d35 /src/api/x11 | |
parent | 829d7a6afc49e0e35d4c782ab500b7bf64130d95 (diff) | |
download | glutin-be9c8c018690ae83db8317856cb73397eec046e2.tar.gz glutin-be9c8c018690ae83db8317856cb73397eec046e2.zip |
Try libEGL.so.1 before libEGL.so
Diffstat (limited to 'src/api/x11')
-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 |