mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 21:31:29 +11:00
android: Updated for Rust ea6f65c5f 2015-01-06
This commit is contained in:
parent
181e4a1d8f
commit
dbe38ff49a
|
@ -1,6 +1,7 @@
|
|||
extern crate android_glue;
|
||||
|
||||
use libc;
|
||||
use std::ffi::{CString};
|
||||
use std::sync::mpsc::{Receiver, channel};
|
||||
use {CreationError, Event, WindowBuilder};
|
||||
use CreationError::OsError;
|
||||
|
@ -257,12 +258,9 @@ impl Window {
|
|||
}
|
||||
|
||||
pub fn get_proc_address(&self, addr: &str) -> *const () {
|
||||
use std::c_str::ToCStr;
|
||||
|
||||
let addr = CString::from_slice(addr.as_bytes()).as_slice_with_nul().as_ptr();
|
||||
unsafe {
|
||||
addr.with_c_str(|s| {
|
||||
ffi::egl::GetProcAddress(s) as *const ()
|
||||
})
|
||||
ffi::egl::GetProcAddress(addr) as *const ()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue