diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-10-25 07:27:10 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-10-25 07:27:10 +0100 |
commit | 188b8f5c081011e6a2dfe7b0ff9d72e7a0bb2566 (patch) | |
tree | 071957c4ff920ed8c61847ba83994a8482650045 /examples | |
parent | 7f2c161704deb4a51a355bd7cc9b7f25451b569a (diff) | |
parent | 9493458b8ed4e79b77f039ec03d298510dd91549 (diff) | |
download | glutin-188b8f5c081011e6a2dfe7b0ff9d72e7a0bb2566.tar.gz glutin-188b8f5c081011e6a2dfe7b0ff9d72e7a0bb2566.zip |
Merge pull request #645 from adambadawy/master
Improve fullscreen example
Diffstat (limited to 'examples')
-rw-r--r-- | examples/fullscreen.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/fullscreen.rs b/examples/fullscreen.rs index 977e084..92d32a3 100644 --- a/examples/fullscreen.rs +++ b/examples/fullscreen.rs @@ -4,7 +4,7 @@ extern crate android_glue; extern crate glutin; -use std::io; +use std::io::{self, Write}; mod support; @@ -19,6 +19,7 @@ fn main() { } print!("Please write the number of the monitor to use: "); + io::stdout().flush().unwrap(); let mut num = String::new(); io::stdin().read_line(&mut num).unwrap(); @@ -49,6 +50,7 @@ fn main() { match event { glutin::Event::Closed => break, + glutin::Event::KeyboardInput(_, _, Some(glutin::VirtualKeyCode::Escape)) => break, _ => () } } |