diff --git a/ravedude/src/console.rs b/ravedude/src/console.rs index 1ec0edd2e2..42cc5c54e7 100644 --- a/ravedude/src/console.rs +++ b/ravedude/src/console.rs @@ -21,7 +21,13 @@ pub fn open(port: &std::path::Path, baudrate: u32) -> anyhow::Result<()> { // Spawn a thread for the receiving end because stdio is not portably non-blocking... std::thread::spawn(move || loop { + #[cfg(not(target_os = "windows"))] let mut buf = [0u8; 4098]; + + // Use buffer size 1 for windows because it blocks on rx.read until the buffer is full + #[cfg(target_os = "windows")] + let mut buf = [0u8; 1]; + match rx.read(&mut buf) { Ok(count) => { stdout.write(&buf[..count]).unwrap();