diff --git a/crates/egui-winit/src/lib.rs b/crates/egui-winit/src/lib.rs index 1980376b97a..3998e6f4153 100644 --- a/crates/egui-winit/src/lib.rs +++ b/crates/egui-winit/src/lib.rs @@ -36,6 +36,9 @@ use winit::{ }; pub fn screen_size_in_pixels(window: &Window) -> egui::Vec2 { + #[cfg(target_os = "ios")] + let size = window.outer_size(); + #[cfg(not(target_os = "ios"))] let size = window.inner_size(); egui::vec2(size.width as f32, size.height as f32) }