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:
msiglreith 2020-08-12 20:56:28 +02:00 committed by GitHub
parent 05fdcb5b27
commit 68100102be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -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 => {