mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 06:41:31 +11:00
Merge pull request #392 from tomaka/fix-example
Fix and re-enable the fullscreen example
This commit is contained in:
commit
fa4aa36c9e
|
@ -4,7 +4,7 @@ extern crate android_glue;
|
||||||
|
|
||||||
extern crate glutin;
|
extern crate glutin;
|
||||||
|
|
||||||
use std::old_io::stdio::stdin;
|
use std::io;
|
||||||
|
|
||||||
mod support;
|
mod support;
|
||||||
|
|
||||||
|
@ -23,8 +23,10 @@ fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
print!("Please write the number of the monitor to use: ");
|
print!("Please write the number of the monitor to use: ");
|
||||||
let num = stdin().read_line().unwrap().as_slice().trim().parse()
|
|
||||||
.ok().expect("Please enter a number");
|
let mut num = String::new();
|
||||||
|
io::stdin().read_line(&mut num).unwrap();
|
||||||
|
let num = num.trim().parse().ok().expect("Please enter a number");
|
||||||
let monitor = glutin::get_available_monitors().nth(num).expect("Please enter a valid ID");
|
let monitor = glutin::get_available_monitors().nth(num).expect("Please enter a valid ID");
|
||||||
|
|
||||||
println!("Using {:?}", monitor.get_name());
|
println!("Using {:?}", monitor.get_name());
|
Loading…
Reference in a new issue