mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Fix winit resize event on macOS 14 (#9905)
Co-Authored-By: Marco Buono <418473+coreh@users.noreply.github.com>
This commit is contained in:
parent
12c6fa7e59
commit
e396f11e9d
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue