winit: Close properly, if the window closes

This commit is contained in:
Victoria Brekenfeld 2023-12-22 15:40:11 +00:00 committed by Victoria Brekenfeld
parent e4298df306
commit ffd99de7ef

View file

@ -348,6 +348,9 @@ impl State {
}
WinitEvent::Redraw => render_ping.ping(),
WinitEvent::Input(event) => self.process_input_event(event, false),
WinitEvent::CloseRequested => {
self.common.should_stop = true;
}
_ => {}
};
}