From d6f44a7f56acf2ced22c00e8cd204c66da96c8da Mon Sep 17 00:00:00 2001 From: Adam Badawy Date: Sat, 24 Oct 2015 21:32:46 -0400 Subject: Flush monitor prompt --- examples/fullscreen.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/fullscreen.rs b/examples/fullscreen.rs index 977e084..aecfe62 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(); -- cgit v1.2.3 From 9493458b8ed4e79b77f039ec03d298510dd91549 Mon Sep 17 00:00:00 2001 From: Adam Badawy Date: Sat, 24 Oct 2015 21:39:13 -0400 Subject: Fix issue #543 I added a match arm for the Escape key. --- examples/fullscreen.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/fullscreen.rs b/examples/fullscreen.rs index aecfe62..92d32a3 100644 --- a/examples/fullscreen.rs +++ b/examples/fullscreen.rs @@ -50,6 +50,7 @@ fn main() { match event { glutin::Event::Closed => break, + glutin::Event::KeyboardInput(_, _, Some(glutin::VirtualKeyCode::Escape)) => break, _ => () } } -- cgit v1.2.3