diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-05-07 13:49:33 +0200 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-05-07 13:49:33 +0200 |
commit | 7ee416ab883add82afd3ab96eb5616472c8cdfcd (patch) | |
tree | 135ebb64bc963064d71e613637d246de1d43afbd /src/api/x11 | |
parent | 2414f87cebac12c6cde36ff6436642a50d122ed8 (diff) | |
download | glutin-7ee416ab883add82afd3ab96eb5616472c8cdfcd.tar.gz glutin-7ee416ab883add82afd3ab96eb5616472c8cdfcd.zip |
Make it work under the raspi
Diffstat (limited to 'src/api/x11')
-rw-r--r-- | src/api/x11/mod.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/api/x11/mod.rs b/src/api/x11/mod.rs index e615314..29f2bba 100644 --- a/src/api/x11/mod.rs +++ b/src/api/x11/mod.rs @@ -315,10 +315,14 @@ impl Window { let xf86vmode = ffi::Xf86vmode::open().unwrap(); // FIXME: gracious handling let glx = { - let libglx = unsafe { dlopen::dlopen(b"libGL.so\0".as_ptr() as *const _, dlopen::RTLD_NOW) }; + let mut libglx = unsafe { dlopen::dlopen(b"libGL.so.1\0".as_ptr() as *const _, dlopen::RTLD_NOW) }; + if libglx.is_null() { + libglx = unsafe { dlopen::dlopen(b"libGL.so\0".as_ptr() as *const _, dlopen::RTLD_NOW) }; + } if libglx.is_null() { return Err(CreationError::NotSupported); } + ffi::glx::Glx::load_with(|sym| { let sym = CString::new(sym).unwrap(); unsafe { dlopen::dlsym(libglx, sym.as_ptr()) } |