winit-core: move monitor handle

This commit is contained in:
Kirill Chibisov 2025-05-01 19:35:04 +09:00
parent 3493a20173
commit 3142355417
10 changed files with 43 additions and 32 deletions

View file

@ -79,14 +79,14 @@ impl VideoModeHandle {
unimplemented!()
};
let mode = VideoMode {
size: PhysicalSize::new(
let mode = VideoMode::new(
PhysicalSize::new(
CGDisplayMode::pixel_width(Some(&native_mode.0)) as u32,
CGDisplayMode::pixel_height(Some(&native_mode.0)) as u32,
),
NonZeroU16::new(bit_depth),
refresh_rate_millihertz,
bit_depth: NonZeroU16::new(bit_depth),
};
);
VideoModeHandle { mode, monitor: monitor.clone(), native_mode }
}