mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 14:51:30 +11:00
Allow any mode larger than requested dimensions
We were previously allowing only fullscreen modes which were exactly as tall as the requested dimensions, perhaps erroneously.
This commit is contained in:
parent
23a5104098
commit
4f8095816e
|
@ -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.vdisplay == 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