Add interrupting the events loop

This commit is contained in:
Pierre Krieger 2017-01-28 15:09:01 +01:00
parent e7d43174e7
commit 0242daa242
3 changed files with 17 additions and 1 deletions

View file

@ -12,7 +12,7 @@ fn main() {
println!("{:?}", event);
match event {
winit::Event::WindowEvent { event: winit::WindowEvent::Closed, .. } => return,
winit::Event::WindowEvent { event: winit::WindowEvent::Closed, .. } => events_loop.interrupt(),
_ => ()
}
});