aboutsummaryrefslogtreecommitdiffstats
path: root/src/android
diff options
context:
space:
mode:
authorAndrey Lesnikov <ozkriff@gmail.com>2014-12-26 01:29:54 +0300
committerAndrey Lesnikov <ozkriff@gmail.com>2014-12-26 01:29:54 +0300
commit9a5f02984d3c157c962f493c981d1f8e7bd4ac81 (patch)
tree3d5d5ac66cc29ad3091111d7c7ccf1f467a02821 /src/android
parente441247d61d48caab62902858ccb69a9a7316e8a (diff)
downloadglutin-9a5f02984d3c157c962f493c981d1f8e7bd4ac81.tar.gz
glutin-9a5f02984d3c157c962f493c981d1f8e7bd4ac81.zip
android: Implemented basic poll_events()
Diffstat (limited to 'src/android')
-rw-r--r--src/android/mod.rs17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/android/mod.rs b/src/android/mod.rs
index 3a86779..7279f99 100644
--- a/src/android/mod.rs
+++ b/src/android/mod.rs
@@ -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);