winit: Close properly, if the window closes
This commit is contained in:
parent
e4298df306
commit
ffd99de7ef
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
_ => {}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue