[rs] Switch event loop back to ControlFlow::Poll

This commit is contained in:
Joshua Groves authored and Josh Groves committed 2020-04-18 01:04:28 -02:30
1 parent c4be28fcd9
commit c3c5d3927a
2 files changed
+2 -4

No files matched your search

+1 -2
View File
@@ -94,8 +94,7 @@ async fn run_async<E: Example>(event_loop: EventLoop<()>, window: Window) {
*control_flow = if cfg!(feature = "metal-auto-capture") {
ControlFlow::Exit
} else {
// TODO: ControlFlow::Poll
ControlFlow::Wait
ControlFlow::Poll
};
match event {
event::Event::MainEventsCleared => window.request_redraw(),
+1 -2
View File
@@ -93,8 +93,7 @@ async fn run(event_loop: EventLoop<()>, window: Window) {
let mut swap_chain = device.create_swap_chain(&surface, &sc_desc);
event_loop.run(move |event, _, control_flow| {
// TODO: ControlFlow::Poll;
*control_flow = ControlFlow::Wait;
*control_flow = ControlFlow::Poll;
match event {
Event::MainEventsCleared => window.request_redraw(),
Event::WindowEvent {