mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Change some uses of c_void to avoid libc version conflicts.
This commit is contained in:
parent
188b8f5c08
commit
7e4f795a53
|
@ -89,7 +89,7 @@ impl GlContext for OsMesaContext {
|
||||||
#[inline]
|
#[inline]
|
||||||
unsafe fn make_current(&self) -> Result<(), ContextError> {
|
unsafe fn make_current(&self) -> Result<(), ContextError> {
|
||||||
let ret = osmesa_sys::OSMesaMakeCurrent(self.context, self.buffer.as_ptr()
|
let ret = osmesa_sys::OSMesaMakeCurrent(self.context, self.buffer.as_ptr()
|
||||||
as *mut libc::c_void, 0x1401, self.width
|
as *mut _, 0x1401, self.width
|
||||||
as libc::c_int, self.height as libc::c_int);
|
as libc::c_int, self.height as libc::c_int);
|
||||||
|
|
||||||
// an error can only happen in case of invalid parameter, which would indicate a bug
|
// an error can only happen in case of invalid parameter, which would indicate a bug
|
||||||
|
|
|
@ -354,8 +354,8 @@ impl Window {
|
||||||
Glx(::api::glx::ContextPrototype<'a>),
|
Glx(::api::glx::ContextPrototype<'a>),
|
||||||
Egl(::api::egl::ContextPrototype<'a>),
|
Egl(::api::egl::ContextPrototype<'a>),
|
||||||
}
|
}
|
||||||
let builder_clone_opengl_glx = opengl.clone().map_sharing(|_| unimplemented!()); // FIXME:
|
let builder_clone_opengl_glx = opengl.clone().map_sharing(|_| unimplemented!()); // FIXME:
|
||||||
let builder_clone_opengl_egl = opengl.clone().map_sharing(|_| unimplemented!()); // FIXME:
|
let builder_clone_opengl_egl = opengl.clone().map_sharing(|_| unimplemented!()); // FIXME:
|
||||||
let context = match opengl.version {
|
let context = match opengl.version {
|
||||||
GlRequest::Latest | GlRequest::Specific(Api::OpenGl, _) | GlRequest::GlThenGles { .. } => {
|
GlRequest::Latest | GlRequest::Specific(Api::OpenGl, _) | GlRequest::GlThenGles { .. } => {
|
||||||
// GLX should be preferred over EGL, otherwise crashes may occur
|
// GLX should be preferred over EGL, otherwise crashes may occur
|
||||||
|
@ -521,7 +521,7 @@ impl Window {
|
||||||
(*hint).res_name = c_name as *mut libc::c_char;
|
(*hint).res_name = c_name as *mut libc::c_char;
|
||||||
(*hint).res_class = c_name as *mut libc::c_char;
|
(*hint).res_class = c_name as *mut libc::c_char;
|
||||||
(display.xlib.XSetClassHint)(display.display, window, hint);
|
(display.xlib.XSetClassHint)(display.display, window, hint);
|
||||||
(display.xlib.XFree)(hint as *mut libc::c_void);
|
(display.xlib.XFree)(hint as *mut _);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue