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

This commit is contained in:
Joshua Groves
2020-04-13 20:56:01 -02:30
committed by Josh Groves
parent c4be28fcd9
commit c3c5d3927a
2 changed files with 2 additions and 4 deletions

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(),

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 {