android: fix event loop polling (#1638)
* android: poll looper for ControlFlow::Poll and don't exit when no new event received * Add Android ControlFlow:Poll fix to CHANGELOG
This commit is contained in:
parent
05fdcb5b27
commit
68100102be
2 changed files with 7 additions and 3 deletions
|
|
@ -211,9 +211,7 @@ impl<T: 'static> EventLoop<T> {
|
|||
);
|
||||
}
|
||||
}
|
||||
None => {
|
||||
control_flow = ControlFlow::Exit;
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
|
||||
call_event_handler!(
|
||||
|
|
@ -258,6 +256,11 @@ impl<T: 'static> EventLoop<T> {
|
|||
break 'event_loop;
|
||||
}
|
||||
ControlFlow::Poll => {
|
||||
self.first_event = poll(
|
||||
self.looper
|
||||
.poll_all_timeout(Duration::from_millis(0))
|
||||
.unwrap(),
|
||||
);
|
||||
self.start_cause = event::StartCause::Poll;
|
||||
}
|
||||
ControlFlow::Wait => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue