From d7a59810484015eda26ab34938512c54f6477d4e Mon Sep 17 00:00:00 2001 From: Tom Crayford Date: Sun, 8 Jan 2017 21:09:02 +0000 Subject: print glutin events if --print-events is passed When debugging many issues, it's often very helpful to have the raw glutin events printed out to stderr as they come in. This does that. Note that since `glutin::Event` doesn't implement `Display`, we just use rust's debugging output for now via `{:?}`. --- src/cli.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/cli.rs') diff --git a/src/cli.rs b/src/cli.rs index e95114c7..8500ebab 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -16,6 +16,7 @@ use index::{Line, Column}; /// Options specified on the command line pub struct Options { + pub print_events: bool, pub ref_test: bool, pub columns: Column, pub lines: Line, @@ -25,6 +26,7 @@ pub struct Options { impl Default for Options { fn default() -> Options { Options { + print_events: false, ref_test: false, columns: Column(80), lines: Line(24), @@ -43,6 +45,7 @@ impl Options { match &arg[..] { // Generate ref test "--ref-test" => options.ref_test = true, + "--print-events" => options.print_events = true, // Set dimensions "-d" | "--dimensions" => { args_iter.next() -- cgit