mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 22:53:15 -04:00
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:
@@ -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,
|
||||
_ => (),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user