Skip to content

Commit

Permalink
Request redraw in MainEventsCleared
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Oct 21, 2019
1 parent b5db681 commit 860753b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/game/loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ pub trait Loop<Game: super::Game> {
// Initialization
debug.frame_started();
timer.update();
window.request_redraw();

event_loop.run(move |event, _, control_flow| match event {
winit::event::Event::NewEvents(_) => {
Expand All @@ -87,6 +86,8 @@ pub trait Loop<Game: super::Game> {
debug.update_finished();
}

window.request_redraw();

if game.is_finished() {
*control_flow = winit::event_loop::ControlFlow::Exit;
}
Expand Down

0 comments on commit 860753b

Please sign in to comment.