Update [broken]
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 0s

This commit is contained in:
Florian RICHER 2024-11-20 17:45:26 +01:00
parent 8f1172e888
commit 1dc9da0d61
8 changed files with 222 additions and 31 deletions

View file

@ -32,6 +32,11 @@ impl ApplicationHandler for App {
fn window_event(&mut self, event_loop: &ActiveEventLoop, _id: WindowId, event: WindowEvent) {
match event {
WindowEvent::CloseRequested => {
match self.render_context.as_ref() {
Some(render_context) => render_context.exit(),
None => log::warn!("Window closed but no render context found"),
};
log::debug!("The close button was pressed; stopping");
event_loop.exit();
}