From 91b7d86297b37d06072a68584183310182aa9929 Mon Sep 17 00:00:00 2001 From: Mladen Mihajlovic Date: Tue, 7 Aug 2018 12:10:21 +0200 Subject: [PATCH] Fixes #4 Terminal flashes when game starts --- Mamesaver/Mamesaver.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Mamesaver/Mamesaver.cs b/Mamesaver/Mamesaver.cs index ad18108..75ee0a6 100644 --- a/Mamesaver/Mamesaver.cs +++ b/Mamesaver/Mamesaver.cs @@ -224,8 +224,10 @@ private Process RunGame(Game game) // Set up the process string execPath = Settings.ExecutablePath; ProcessStartInfo psi = new ProcessStartInfo(execPath); - psi.Arguments = game.Name + " " + Settings.CommandLineOptions; ; + psi.Arguments = game.Name + " " + Settings.CommandLineOptions; psi.WorkingDirectory = Directory.GetParent(execPath).ToString(); + psi.CreateNoWindow = true; + psi.WindowStyle = ProcessWindowStyle.Hidden; // Start the timer and the process timer.Start(); @@ -244,6 +246,8 @@ private string GetFullGameList() psi.WorkingDirectory = Directory.GetParent(execPath).ToString(); psi.RedirectStandardOutput = true; psi.UseShellExecute = false; + psi.CreateNoWindow = true; + psi.WindowStyle = ProcessWindowStyle.Hidden; Process p = Process.Start(psi); string output = p.StandardOutput.ReadToEnd(); p.WaitForExit(); @@ -265,6 +269,8 @@ private Hashtable GetVerifiedSets() psi.WorkingDirectory = Directory.GetParent(execPath).ToString(); psi.RedirectStandardOutput = true; psi.UseShellExecute = false; + psi.CreateNoWindow = true; + psi.WindowStyle = ProcessWindowStyle.Hidden; Process p = Process.Start(psi); string output = p.StandardOutput.ReadToEnd(); p.WaitForExit();