From 7ee416ab883add82afd3ab96eb5616472c8cdfcd Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Thu, 7 May 2015 13:49:33 +0200 Subject: Make it work under the raspi --- Cargo.toml | 1 + src/api/x11/mod.rs | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 593a4a8..d959351 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,6 +66,7 @@ features = ["dynamic"] [target.arm-unknown-linux-gnueabihf.dependencies] osmesa-sys = "0.0.5" +wayland-client = "*" [target.arm-unknown-linux-gnueabihf.dependencies.x11] version = "*" 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()) } -- cgit v1.2.3