aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2015-07-28 20:44:21 +0200
committerPierre Krieger <pierre.krieger1708@gmail.com>2015-07-28 20:48:12 +0200
commitbe9c8c018690ae83db8317856cb73397eec046e2 (patch)
treee41913abb2e8dc7d8fdc852713d632089e4c1d35 /src
parent829d7a6afc49e0e35d4c782ab500b7bf64130d95 (diff)
downloadglutin-be9c8c018690ae83db8317856cb73397eec046e2.tar.gz
glutin-be9c8c018690ae83db8317856cb73397eec046e2.zip
Try libEGL.so.1 before libEGL.so
Diffstat (limited to 'src')
-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