Make examples set control_flow in a more realistic way (#1363)

* Make examples set control_flow in a more realistic way

* Format
This commit is contained in:
Osspial
2020-01-05 02:12:03 -05:00
committed by GitHub
parent d1c6506865
commit 028d3ec16d
13 changed files with 96 additions and 70 deletions

View File

@@ -13,6 +13,7 @@ fn main() {
.unwrap();
event_loop.run(move |event, _, control_flow| {
*control_flow = ControlFlow::Wait;
println!("{:?}", event);
match event {
@@ -23,7 +24,7 @@ fn main() {
Event::MainEventsCleared => {
window.request_redraw();
}
_ => *control_flow = ControlFlow::Poll,
_ => (),
}
});
}