mirror of
https://github.com/storytold/winit.git
synced 2026-11-23 04:40:45 +01:00
Fix two warnings on X11
This commit is contained in:
1 parent
cbf07d3190
commit
3f69cbb189
1 file changed
+4
-4
+4
-4
@@ -154,12 +154,12 @@ impl Window {
|
||||
|
||||
// getting the pointer
|
||||
let fn_ptr = {
|
||||
let mut addr = unsafe { ffi::glXGetProcAddress(b"glXCreateContextAttribs".as_ptr()
|
||||
as *const u8) } as *const ();
|
||||
let mut addr = ffi::glXGetProcAddress(b"glXCreateContextAttribs".as_ptr()
|
||||
as *const u8) as *const ();
|
||||
|
||||
if addr.is_null() {
|
||||
addr = unsafe { ffi::glXGetProcAddress(b"glXCreateContextAttribsARB".as_ptr()
|
||||
as *const u8) } as *const ();
|
||||
addr = ffi::glXGetProcAddress(b"glXCreateContextAttribsARB".as_ptr()
|
||||
as *const u8) as *const ();
|
||||
}
|
||||
|
||||
addr.to_option().map(|addr| {
|
||||
|
||||
Reference in new issue
Block a user