From 57f013bd46ff9161d96d57ab8276e3bb3753fd94 Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Sun, 15 Mar 2015 14:47:16 -0700 Subject: [PATCH] Updated to latest rustc and rustbox. --- Cargo.toml | 10 +++++----- src/term_ui/mod.rs | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6918e41..d127bd3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,17 +11,17 @@ path = "src/main.rs" [dependencies.ropey] git = "https://github.com/cessen/ropey.git" -[dependencies.sdl2] -git = "https://github.com/AngryLawyer/rust-sdl2.git" - [dependencies.docopt] git = "https://github.com/docopt/docopt.rs.git" [dependencies.rustbox] git = "https://github.com/gchp/rustbox.git" -[dependencies.freetype-rs] -git = "https://github.com/PistonDevelopers/freetype-rs.git" +#[dependencies.sdl2] +#git = "https://github.com/AngryLawyer/rust-sdl2.git" + +#[dependencies.freetype-rs] +#git = "https://github.com/PistonDevelopers/freetype-rs.git" [dependencies] rustc-serialize = "0.3.0" diff --git a/src/term_ui/mod.rs b/src/term_ui/mod.rs index 11d87bc..35e7701 100644 --- a/src/term_ui/mod.rs +++ b/src/term_ui/mod.rs @@ -108,10 +108,10 @@ impl TermUI { // program doesn't loop like crazy, but then continue pulling // events in a non-blocking way until we run out of events // to handle. - let mut e = self.rb.poll_event(); // Block until we get an event + let mut e = self.rb.poll_event(true); // Block until we get an event loop { match e { - Ok(rustbox::Event::KeyEvent(_, key, character)) => { + Ok(rustbox::Event::KeyEventRaw(_, key, character)) => { //println!(" {} {} {}", modifier, key, character); match key { K_CTRL_Q => { @@ -200,7 +200,7 @@ impl TermUI { } } - e = self.rb.peek_event(Duration::milliseconds(0)); // Get next event (if any) + e = self.rb.peek_event(Duration::milliseconds(0), true); // Get next event (if any) } if let Some((h, w)) = resize { @@ -245,10 +245,10 @@ impl TermUI { // program doesn't loop like crazy, but then continue pulling // events in a non-blocking way until we run out of events // to handle. - let mut e = self.rb.poll_event(); // Block until we get an event + let mut e = self.rb.poll_event(true); // Block until we get an event loop { match e { - Ok(rustbox::Event::KeyEvent(_, key, character)) => { + Ok(rustbox::Event::KeyEventRaw(_, key, character)) => { match key { K_ESC => { cancel = true; @@ -288,7 +288,7 @@ impl TermUI { } } - e = self.rb.peek_event(Duration::milliseconds(0)); // Get next event (if any) + e = self.rb.peek_event(Duration::milliseconds(0), true); // Get next event (if any) }