mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Update README to addition of ControlFlow
This commit is contained in:
parent
cd71271f0d
commit
24d6f8da49
|
@ -28,15 +28,15 @@ another library.
|
||||||
extern crate winit;
|
extern crate winit;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let events_loop = winit::EventsLoop::new();
|
let mut events_loop = winit::EventsLoop::new();
|
||||||
let window = winit::Window::new(&events_loop).unwrap();
|
let window = winit::Window::new(&events_loop).unwrap();
|
||||||
|
|
||||||
events_loop.run_forever(|event| {
|
events_loop.run_forever(|event| {
|
||||||
match event {
|
match event {
|
||||||
winit::Event::WindowEvent { event: winit::WindowEvent::Closed, .. } => {
|
winit::Event::WindowEvent { event: winit::WindowEvent::Closed, .. } => {
|
||||||
events_loop.interrupt();
|
winit::ControlFlow::Complete
|
||||||
},
|
},
|
||||||
_ => ()
|
_ => winit::ControlFlow::Continue,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue