mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 13:31:29 +11:00
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
|
@ -14,6 +14,7 @@
|
|||
- On Windows, `set_ime_position` is now a no-op instead of a runtime crash.
|
||||
- On Android, `set_fullscreen` is now a no-op instead of a runtime crash.
|
||||
- On iOS and Android, `set_inner_size` is now a no-op instead of a runtime crash.
|
||||
- On Android, fix `ControlFlow::Poll` not polling the Android event queue.
|
||||
- **Breaking:** On Web, `set_cursor_position` and `set_cursor_grab` will now always return an error.
|
||||
- **Breaking:** `PixelDelta` scroll events now return a `PhysicalPosition`.
|
||||
|
||||
|
|
|
@ -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…
Reference in a new issue