fix(android): properly destroy windows on suspend
This commit is contained in:
parent
e50409943c
commit
cc3c82d412
1 changed files with 7 additions and 0 deletions
|
@ -493,6 +493,9 @@ impl ApplicationHandler for App<'_> {
|
||||||
self.windows.insert(window_id, window_ctx);
|
self.windows.insert(window_id, window_ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fn suspended(&mut self, _event_loop: &ActiveEventLoop) {
|
||||||
|
self.windows.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pub fn main() -> Result<(), terminator::Terminator> {
|
pub fn main() -> Result<(), terminator::Terminator> {
|
||||||
let config = LoggerConfig::default()
|
let config = LoggerConfig::default()
|
||||||
|
@ -507,6 +510,10 @@ pub fn main() -> Result<(), terminator::Terminator> {
|
||||||
{
|
{
|
||||||
_main()
|
_main()
|
||||||
}
|
}
|
||||||
|
#[cfg(target_os = "android")]
|
||||||
|
{
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pub fn run_app(event_loop: winit::event_loop::EventLoop<()>) -> Result<(), terminator::Terminator> {
|
pub fn run_app(event_loop: winit::event_loop::EventLoop<()>) -> Result<(), terminator::Terminator> {
|
||||||
let mut app = App::new();
|
let mut app = App::new();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue