More clean up

This commit is contained in:
Thinkofdeath 2016-03-16 18:22:03 +00:00
parent 86fa3d4006
commit eb9b61f023
1 changed files with 3 additions and 6 deletions

View File

@ -94,11 +94,10 @@ fn main() {
.with_stencil_buffer(0) .with_stencil_buffer(0)
.with_vsync() .with_vsync()
.build() .build()
.ok()
.expect("Could not create Glutin window."); .expect("Could not create Glutin window.");
unsafe { unsafe {
window.make_current().ok().expect("Could not set current context."); window.make_current().expect("Could not set current context.");
} }
gl::init(&mut window); gl::init(&mut window);
@ -179,10 +178,8 @@ fn handle_window_event(window: &glutin::Window,
game.screen_sys.on_scroll(x as f64, y as f64); game.screen_sys.on_scroll(x as f64, y as f64);
} }
Event::KeyboardInput(glutin::ElementState::Pressed, 41 /* ` GRAVE */, _) => { Event::KeyboardInput(glutin::ElementState::Pressed, 41 /* ` GRAVE */, _)
game.console.lock().unwrap().toggle(); | Event::KeyboardInput(glutin::ElementState::Pressed, _, Some(VirtualKeyCode::Grave)) => {
}
Event::KeyboardInput(glutin::ElementState::Pressed, _, Some(VirtualKeyCode::Grave)) => {
game.console.lock().unwrap().toggle(); game.console.lock().unwrap().toggle();
} }
Event::KeyboardInput(glutin::ElementState::Pressed, key, virt) => { Event::KeyboardInput(glutin::ElementState::Pressed, key, virt) => {