diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs index 46b3e3e195f59..234b43feb5f8e 100644 --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -435,6 +435,14 @@ pub fn winit_runner(mut app: App) { match event { WindowEvent::Resized(size) => { + // TODO: Remove this once we upgrade winit to a version with the fix + #[cfg(target_os = "macos")] + if size.width == u32::MAX || size.height == u32::MAX { + // HACK to fix a bug on Macos 14 + // https://github.com/rust-windowing/winit/issues/2876 + return; + } + window .resolution .set_physical_resolution(size.width, size.height);