mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-23 18:36:34 +11:00
Merge pull request #68 from tomaka/fix-native-win
Add `platform_display` impls for win32 and android
This commit is contained in:
commit
5c31daf7e2
3 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
extern crate android_glue;
|
extern crate android_glue;
|
||||||
extern crate native;
|
extern crate native;
|
||||||
|
|
||||||
|
use libc;
|
||||||
use {Event, WindowBuilder};
|
use {Event, WindowBuilder};
|
||||||
|
|
||||||
pub struct Window {
|
pub struct Window {
|
||||||
|
@ -188,7 +189,7 @@ impl Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn platform_display(&self) -> *mut libc::c_void {
|
pub fn platform_display(&self) -> *mut libc::c_void {
|
||||||
unimplemented!()
|
self.surface as *mut libc::c_void
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
use Event;
|
use Event;
|
||||||
|
use libc;
|
||||||
use std::sync::atomic::AtomicBool;
|
use std::sync::atomic::AtomicBool;
|
||||||
|
|
||||||
#[cfg(feature = "window")]
|
#[cfg(feature = "window")]
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
use std::sync::atomic::AtomicBool;
|
use std::sync::atomic::AtomicBool;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
use libc;
|
||||||
use Event;
|
use Event;
|
||||||
|
|
||||||
#[cfg(feature = "window")]
|
#[cfg(feature = "window")]
|
||||||
|
@ -235,7 +236,7 @@ impl Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn platform_display(&self) -> *mut libc::c_void {
|
pub fn platform_display(&self) -> *mut libc::c_void {
|
||||||
unimplemented!()
|
self.window as *mut libc::c_void
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue