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:
Adam Badawy 2015-10-27 00:33:48 -04:00
parent 23a5104098
commit 4f8095816e

View file

@ -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),