Skip to content

Commit

Permalink
Fixed an issue with the launch button.
Browse files Browse the repository at this point in the history
  • Loading branch information
RussDev7 committed Nov 20, 2022
1 parent 1ec4f27 commit 29c2ba3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/TerrariaDepotDownloader/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,10 @@ private void Button2_Click(object sender, EventArgs e)
{
try
{
// Start Terraria Though Steam
Process.Start("steam://rungameid/105600");

// Do logging If Enabled
if (checkBox1.Checked)
{
Console.WriteLine("Successfully launched Terraria v" + File.ReadLines(Properties.Settings.Default.DepotPath + @"\changelog.txt").First().Split(' ')[1].ToString() + " Through Steam!");
Expand All @@ -771,7 +774,13 @@ private void Button2_Click(object sender, EventArgs e)
{
try
{
Process.Start(Properties.Settings.Default.DepotPath + @"\Terraria-v" + itemRow.SubItems[0].Text + @"\Terraria.exe");
// Start Terraria By File
Process startPath = new Process();
startPath.StartInfo.WorkingDirectory = Properties.Settings.Default.DepotPath + @"\Terraria-v" + itemRow.SubItems[0].Text;
startPath.StartInfo.FileName = Properties.Settings.Default.DepotPath + @"\Terraria-v" + itemRow.SubItems[0].Text + @"\Terraria.exe";
startPath.Start();

// Do Logging If Enabled
if (checkBox1.Checked)
{
Console.WriteLine("Successfully launched Terraria v" + itemRow.SubItems[0].Text);
Expand Down

0 comments on commit 29c2ba3

Please sign in to comment.