diff options
author | Tom Crayford <tcrayford@googlemail.com> | 2017-01-08 21:09:02 +0000 |
---|---|---|
committer | Tom Crayford <tcrayford@googlemail.com> | 2017-01-08 21:09:02 +0000 |
commit | d7a59810484015eda26ab34938512c54f6477d4e (patch) | |
tree | 98b62c65a72f3a339ed4175f9bbfbd986dbe41eb /src/cli.rs | |
parent | 9e713189cc6dc83f97e87fa18b66b39d2c7222cc (diff) | |
download | alacritty-d7a59810484015eda26ab34938512c54f6477d4e.tar.gz alacritty-d7a59810484015eda26ab34938512c54f6477d4e.zip |
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 `{:?}`.
Diffstat (limited to 'src/cli.rs')
-rw-r--r-- | src/cli.rs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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() |