Skip to content

Commit

Permalink
Fixes #4 Terminal flashes when game starts
Browse files Browse the repository at this point in the history
  • Loading branch information
mika76 committed Aug 7, 2018
1 parent 076726e commit 91b7d86
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Mamesaver/Mamesaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit 91b7d86

Please sign in to comment.