mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 21:31:29 +11:00
Make it work under the raspi
This commit is contained in:
parent
2414f87ceb
commit
7ee416ab88
|
@ -66,6 +66,7 @@ features = ["dynamic"]
|
||||||
|
|
||||||
[target.arm-unknown-linux-gnueabihf.dependencies]
|
[target.arm-unknown-linux-gnueabihf.dependencies]
|
||||||
osmesa-sys = "0.0.5"
|
osmesa-sys = "0.0.5"
|
||||||
|
wayland-client = "*"
|
||||||
|
|
||||||
[target.arm-unknown-linux-gnueabihf.dependencies.x11]
|
[target.arm-unknown-linux-gnueabihf.dependencies.x11]
|
||||||
version = "*"
|
version = "*"
|
||||||
|
|
|
@ -315,10 +315,14 @@ impl Window {
|
||||||
let xf86vmode = ffi::Xf86vmode::open().unwrap(); // FIXME: gracious handling
|
let xf86vmode = ffi::Xf86vmode::open().unwrap(); // FIXME: gracious handling
|
||||||
|
|
||||||
let glx = {
|
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() {
|
if libglx.is_null() {
|
||||||
return Err(CreationError::NotSupported);
|
return Err(CreationError::NotSupported);
|
||||||
}
|
}
|
||||||
|
|
||||||
ffi::glx::Glx::load_with(|sym| {
|
ffi::glx::Glx::load_with(|sym| {
|
||||||
let sym = CString::new(sym).unwrap();
|
let sym = CString::new(sym).unwrap();
|
||||||
unsafe { dlopen::dlsym(libglx, sym.as_ptr()) }
|
unsafe { dlopen::dlsym(libglx, sym.as_ptr()) }
|
||||||
|
|
Loading…
Reference in a new issue