diff --git a/ErsatzTV-Windows/src/main.rs b/ErsatzTV-Windows/src/main.rs index 0297b2f71..3d425e662 100644 --- a/ErsatzTV-Windows/src/main.rs +++ b/ErsatzTV-Windows/src/main.rs @@ -94,7 +94,10 @@ fn main() { None => {} Some(mut child) => { unsafe { - Console::GenerateConsoleCtrlEvent(Console::CTRL_C_EVENT, 0); + if Console::AttachConsole(child.id()) == true + { + Console::GenerateConsoleCtrlEvent(Console::CTRL_C_EVENT, 0); + } } child.wait().unwrap(); }