mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Merge pull request #322 from nicholasbishop/bishop-range-fix
Fix compilation by replacing "range" with ".." syntax
This commit is contained in:
commit
09e00564a9
|
@ -348,7 +348,7 @@ impl Window {
|
||||||
return Err(OsError(format!("Could not query the video modes")));
|
return Err(OsError(format!("Could not query the video modes")));
|
||||||
}
|
}
|
||||||
|
|
||||||
for i in range(0, mode_num) {
|
for i in 0..mode_num {
|
||||||
let mode: ffi::XF86VidModeModeInfo = ptr::read(*modes.offset(i as isize) as *const _);
|
let mode: ffi::XF86VidModeModeInfo = ptr::read(*modes.offset(i as isize) as *const _);
|
||||||
if mode.hdisplay == dimensions.0 as u16 && mode.vdisplay == dimensions.1 as u16 {
|
if mode.hdisplay == dimensions.0 as u16 && mode.vdisplay == dimensions.1 as u16 {
|
||||||
best_mode = i;
|
best_mode = i;
|
||||||
|
|
|
@ -18,7 +18,7 @@ pub fn get_available_monitors() -> VecDeque<MonitorID> {
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut monitors = VecDeque::new();
|
let mut monitors = VecDeque::new();
|
||||||
monitors.extend(range(0, nb_monitors).map(|i| MonitorID(i as u32)));
|
monitors.extend((0..nb_monitors).map(|i| MonitorID(i as u32)));
|
||||||
monitors
|
monitors
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue