From ccbe85a46ad8ba7ae2e526563bc71b96a854fb28 Mon Sep 17 00:00:00 2001 From: Jason Dove Date: Sun, 1 Jan 2023 14:12:41 -0600 Subject: [PATCH] also hide the main server window --- ErsatzTV-Windows/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ErsatzTV-Windows/src/main.rs b/ErsatzTV-Windows/src/main.rs index 529907869..0297b2f71 100644 --- a/ErsatzTV-Windows/src/main.rs +++ b/ErsatzTV-Windows/src/main.rs @@ -2,11 +2,14 @@ use special_folder::SpecialFolder; use std::fs; +use std::os::windows::process::CommandExt; use std::process::Child; use std::process::Command; use std::process::Stdio; -use {std::sync::mpsc, tray_item::TrayItem}; use windows::Win32::System::Console; +use {std::sync::mpsc, tray_item::TrayItem}; + +const CREATE_NO_WINDOW: u32 = 0x08000000; enum Message { Exit, @@ -71,6 +74,7 @@ fn main() { Some(etv) => { child = Some( Command::new(etv) + .creation_flags(CREATE_NO_WINDOW) .stdin(Stdio::null()) .stdout(Stdio::null()) .stderr(Stdio::null())