diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-02-22 22:38:21 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-02-22 22:38:21 +0100 |
commit | e0e187f172c0a1b61c333694f9e3ebaa9bbef6f8 (patch) | |
tree | d3946b7f1a0c98c33c40e4f886426ef9ff92127d /src | |
parent | 9c8b49fec2210ddd081c97b75236d159b4f9e7b7 (diff) | |
parent | 2da557c0cc94ffd2d68a093dcea6ac9c32f7773c (diff) | |
download | glutin-e0e187f172c0a1b61c333694f9e3ebaa9bbef6f8.tar.gz glutin-e0e187f172c0a1b61c333694f9e3ebaa9bbef6f8.zip |
Merge pull request #295 from ozkriff/master
android: Updated to latest android-rs-glue
Diffstat (limited to 'src')
-rw-r--r-- | src/android/mod.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/android/mod.rs b/src/android/mod.rs index bcf08ad..84d71c2 100644 --- a/src/android/mod.rs +++ b/src/android/mod.rs @@ -86,11 +86,12 @@ impl<'a> Iterator for PollEventsIterator<'a> { fn next(&mut self) -> Option<Event> { match self.window.event_rx.try_recv() { Ok(event) => { - Some(match event { - android_glue::Event::EventDown => MouseInput(Pressed, MouseButton::Left), - android_glue::Event::EventUp => MouseInput(Released, MouseButton::Left), - android_glue::Event::EventMove(x, y) => MouseMoved((x as i32, y as i32)), - }) + match event { + android_glue::Event::EventDown => Some(MouseInput(Pressed, MouseButton::Left)), + android_glue::Event::EventUp => Some(MouseInput(Released, MouseButton::Left)), + android_glue::Event::EventMove(x, y) => Some(MouseMoved((x as i32, y as i32))), + _ => None, + } } Err(_) => { None |