Open trevordblack opened 2 months ago
In newer versions of winit (0.29) this is done slightly differently:
event_loop.run(|event, control_target| {
control_target.set_control_flow(ControlFlow::Poll);
match event {
Event::WindowEvent { event, .. } => match event {
WindowEvent::CloseRequested => control_target.exit(),
...
}
...
I.e., you can replace *control_flow = ControlFlow::Exit
with control_target.exit()
.