Update run_forever to hijack thread

This commit is contained in:
Osspial
2018-07-13 01:39:53 -04:00
parent 2e83bac99c
commit 9feada206f
14 changed files with 100 additions and 64 deletions

View File

@@ -1,14 +1,14 @@
extern crate winit;
fn main() {
let mut events_loop = winit::EventLoop::new();
let events_loop = winit::EventLoop::new();
let _window = winit::WindowBuilder::new()
.with_title("A fantastic window!")
.build(&events_loop)
.unwrap();
events_loop.run_forever(|event| {
events_loop.run_forever(move |event, _: &winit::EventLoop| {
println!("{:?}", event);
match event {