Update examples and tests to addition of ControlFlow
This commit is contained in:
parent
f2dd2f0752
commit
db9e80bdb6
9 changed files with 43 additions and 41 deletions
|
|
@ -1,9 +1,9 @@
|
|||
extern crate winit;
|
||||
|
||||
fn main() {
|
||||
let events_loop = winit::EventsLoop::new();
|
||||
let mut events_loop = winit::EventsLoop::new();
|
||||
|
||||
let window = winit::WindowBuilder::new()
|
||||
let _window = winit::WindowBuilder::new()
|
||||
.with_title("A fantastic window!")
|
||||
.build(&events_loop)
|
||||
.unwrap();
|
||||
|
|
@ -22,8 +22,8 @@ fn main() {
|
|||
println!("{:?}", event);
|
||||
match event {
|
||||
winit::Event::WindowEvent { event: winit::WindowEvent::Closed, .. } =>
|
||||
events_loop.interrupt(),
|
||||
_ => ()
|
||||
winit::ControlFlow::Complete,
|
||||
_ => winit::ControlFlow::Continue,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue