mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Fix issue #582
I switched `vsyncstart` and `vdisplay` again, as per the discussion on issue #582.
This commit is contained in:
parent
188b8f5c08
commit
918dc67992
|
@ -325,7 +325,7 @@ impl Window {
|
||||||
let mode_to_switch_to = if window_attrs.monitor.is_some() {
|
let mode_to_switch_to = if window_attrs.monitor.is_some() {
|
||||||
let matching_mode = (0 .. mode_num).map(|i| {
|
let matching_mode = (0 .. mode_num).map(|i| {
|
||||||
let m: ffi::XF86VidModeModeInfo = ptr::read(*modes.offset(i as isize) as *const _); m
|
let m: ffi::XF86VidModeModeInfo = ptr::read(*modes.offset(i as isize) as *const _); m
|
||||||
}).find(|m| m.hdisplay == dimensions.0 as u16 && m.vsyncstart == dimensions.1 as u16);
|
}).find(|m| m.hdisplay == dimensions.0 as u16 && m.vdisplay == dimensions.1 as u16);
|
||||||
|
|
||||||
if let Some(matching_mode) = matching_mode {
|
if let Some(matching_mode) = matching_mode {
|
||||||
Some(matching_mode)
|
Some(matching_mode)
|
||||||
|
@ -333,7 +333,7 @@ impl Window {
|
||||||
} else {
|
} else {
|
||||||
let m = (0 .. mode_num).map(|i| {
|
let m = (0 .. mode_num).map(|i| {
|
||||||
let m: ffi::XF86VidModeModeInfo = ptr::read(*modes.offset(i as isize) as *const _); m
|
let m: ffi::XF86VidModeModeInfo = ptr::read(*modes.offset(i as isize) as *const _); m
|
||||||
}).find(|m| m.hdisplay >= dimensions.0 as u16 && m.vsyncstart == dimensions.1 as u16);
|
}).find(|m| m.hdisplay >= dimensions.0 as u16 && m.vdisplay == dimensions.1 as u16);
|
||||||
|
|
||||||
match m {
|
match m {
|
||||||
Some(m) => Some(m),
|
Some(m) => Some(m),
|
||||||
|
|
Loading…
Reference in a new issue