Skip to content

Commit

Permalink
Log when entering/exiting render/events loops
Browse files Browse the repository at this point in the history
  • Loading branch information
iceiix committed Jan 2, 2021
1 parent 66c47c8 commit 542fa1b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ fn main2() {
let ui_container = Rc::clone(&ui_container);

render_loop.run(move |running: &mut bool| {
info!("render_loop start");
let winit_window = winit_window.borrow_mut();
let mut game = game.borrow_mut();
let mut ui_container = ui_container.borrow_mut();
Expand All @@ -424,7 +425,7 @@ fn main2() {
&mut last_resource_version,
&mut vsync,
);
println!("render_loop");
info!("render_loop end");
});
}

Expand All @@ -433,6 +434,7 @@ fn main2() {
let game = Rc::clone(&game);
let ui_container = Rc::clone(&ui_container);
events_loop.run(move |event, _event_loop, control_flow| {
info!("events_loop start");
let winit_window = winit_window.borrow_mut();
let mut game = game.borrow_mut();
let mut ui_container = ui_container.borrow_mut();
Expand Down Expand Up @@ -480,6 +482,7 @@ fn main2() {
if game.should_close {
*control_flow = winit::event_loop::ControlFlow::Exit;
}
info!("events_loop end");
});
}

Expand Down

0 comments on commit 542fa1b

Please sign in to comment.