diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs index a13c158709bfe..3947b5020a867 100644 --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -441,6 +441,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);