diff options
| author | Tomaka17 <pierre.krieger1708@gmail.com> | 2014-07-31 10:52:05 +0200 | 
|---|---|---|
| committer | Tomaka17 <pierre.krieger1708@gmail.com> | 2014-07-31 11:13:40 +0200 | 
| commit | d9d293667a7b5934ba923f578ffbfd2c12d121be (patch) | |
| tree | 6ac0c7ed6bb98b8eeda249141afac0928fdd0cec /examples | |
| parent | db8955a9d85d7e44e63dd3fd7634230bc1aed635 (diff) | |
| download | glutin-d9d293667a7b5934ba923f578ffbfd2c12d121be.tar.gz glutin-d9d293667a7b5934ba923f578ffbfd2c12d121be.zip  | |
Add monitor support for win32
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/fullscreen.rs | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/fullscreen.rs b/examples/fullscreen.rs index cfbc35c..b6141a0 100644 --- a/examples/fullscreen.rs +++ b/examples/fullscreen.rs @@ -14,8 +14,9 @@ fn main() {          }          print!("Please write the number of the monitor to use: "); -        let num = from_str(stdin().read_line().unwrap().as_slice()).unwrap(); -        let monitor = init::get_available_monitors().nth(num).unwrap(); +        let num = from_str(stdin().read_line().unwrap().as_slice().trim()) +            .expect("Plase enter a number"); +        let monitor = init::get_available_monitors().nth(num).expect("Please enter a valid ID");          println!("Using {}", monitor.get_name());  | 
