mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 21:31:29 +11:00
android: Implemented basic poll_events()
This commit is contained in:
parent
e441247d61
commit
9a5f02984d
|
@ -212,16 +212,6 @@ impl Window {
|
|||
}
|
||||
|
||||
pub fn poll_events(&self) -> Vec<Event> {
|
||||
use std::time::Duration;
|
||||
use std::io::timer;
|
||||
timer::sleep(Duration::milliseconds(16));
|
||||
Vec::new()
|
||||
}
|
||||
|
||||
pub fn wait_events(&self) -> Vec<Event> {
|
||||
use std::time::Duration;
|
||||
use std::io::timer;
|
||||
timer::sleep(Duration::milliseconds(16));
|
||||
let mut events = Vec::new();
|
||||
loop {
|
||||
match self.event_rx.try_recv() {
|
||||
|
@ -244,6 +234,13 @@ impl Window {
|
|||
events
|
||||
}
|
||||
|
||||
pub fn wait_events(&self) -> Vec<Event> {
|
||||
use std::time::Duration;
|
||||
use std::io::timer;
|
||||
timer::sleep(Duration::milliseconds(16));
|
||||
self.poll_events()
|
||||
}
|
||||
|
||||
pub fn make_current(&self) {
|
||||
unsafe {
|
||||
ffi::egl::MakeCurrent(self.display, self.surface, self.surface, self.context);
|
||||
|
|
Loading…
Reference in a new issue