X-Git-Url: https://codewiz.org/gitweb?p=mandelwow.git;a=blobdiff_plain;f=main.rs;h=0cf1c18fce7db7f1a671c833373152252e9af75a;hp=d00c783ebdaa3c4e6056c1d5f221249a5e0464b7;hb=1c9185a391b011d8d700f34a4d70cf770ac9e71f;hpb=fb92205ecfb5397f4cb3d47baee5da1f063ec892 diff --git a/main.rs b/main.rs index d00c783..0cf1c18 100644 --- a/main.rs +++ b/main.rs @@ -277,7 +277,6 @@ fn main() { let mut fullscreen = false; event_loop.run(move |event, _, control_flow| { - timer.update(); let t = timer.t; let new_hit = sound::hit_event(&mut soundplayer); if new_hit > world.last_hit { @@ -290,6 +289,7 @@ fn main() { *control_flow = ControlFlow::WaitUntil(timer.now + Duration::from_nanos(16_666_667)); match event { Event::MainEventsCleared => { + timer.update(); world.draw_frame(&display, &camera, t); } Event::NewEvents(cause) => { @@ -316,7 +316,7 @@ fn main() { VirtualKeyCode::PageUp => timer.t += 0.1, VirtualKeyCode::PageDown => timer.t -= 0.2, VirtualKeyCode::F10 => screenshot::take_screenshot(&display), - VirtualKeyCode::F | VirtualKeyCode::F11 | VirtualKeyCode::Return => { + VirtualKeyCode::F11 | VirtualKeyCode::Return => { fullscreen ^= true; let fs = if fullscreen { // let monitor_handle = display.gl_window().window()