Skip to content

Commit

Permalink
Fix andoid compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Nov 11, 2023
1 parent 730a4b7 commit 922c372
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions crates/eframe/src/native/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2022,17 +2022,12 @@ mod wgpu_integration {
Ok(())
}

#[allow(unsafe_code)]
#[cfg(target_os = "android")]
fn drop_window(&mut self) -> std::result::Result<(), egui_wgpu::WgpuError> {
if let Some(running) = &mut self.running {
running.viewports.borrow_mut().remove(&ViewportId::ROOT);
pollster::block_on(
running
.painter
.borrow_mut()
.set_window(ViewportId::ROOT, None),
)?;
let mut shared = running.shared.borrow_mut();
shared.viewports.remove(&ViewportId::ROOT);
pollster::block_on(shared.painter.set_window(ViewportId::ROOT, None))?;
}
Ok(())
}
Expand Down

0 comments on commit 922c372

Please sign in to comment.