winit-core: move monitor handle
This commit is contained in:
parent
3493a20173
commit
3142355417
10 changed files with 43 additions and 32 deletions
|
|
@ -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 }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,11 +55,11 @@ impl VideoModeHandle {
|
|||
) -> VideoModeHandle {
|
||||
let refresh_rate_millihertz = refresh_rate_millihertz(&uiscreen);
|
||||
let size = screen_mode.size();
|
||||
let mode = VideoMode {
|
||||
size: (size.width as u32, size.height as u32).into(),
|
||||
bit_depth: None,
|
||||
let mode = VideoMode::new(
|
||||
(size.width as u32, size.height as u32).into(),
|
||||
None,
|
||||
refresh_rate_millihertz,
|
||||
};
|
||||
);
|
||||
|
||||
VideoModeHandle {
|
||||
mode,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue