Skip to content

Commit

Permalink
Use raw_tty crate only on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
tomm committed Oct 27, 2023
1 parent 28bf540 commit 6d2a6e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ libloading = "0.8.0"

#agon-cpu-emulator = { path = "../agon-cpu-emulator" }
#agon-light-emulator-debugger = { path = "../agon-light-emulator-debugger" }

[target.'cfg(target_os = "linux")'.dependencies]
raw_tty = "0.1.0"
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub fn main() -> Result<(), pico_args::Error> {
let vsync_counter = std::sync::Arc::new(std::sync::atomic::AtomicU32::new(0));

// Preserve stdin state, as debugger can leave stdin in raw mode
#[cfg(target_os = "linux")]
let _tty = raw_tty::TtyWithGuard::new(std::io::stdin()).unwrap();

let debugger_con = if args.debugger {
Expand Down

0 comments on commit 6d2a6e3

Please sign in to comment.