Skip to content

Commit

Permalink
fix steam detector (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eimaen committed Feb 10, 2023
1 parent 85d976e commit 398aa69
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions JustAsPlanned/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ private void Run()
Thread.Sleep(5000);
Environment.Exit(0);
}
object steamInstallationPath = steamRegKey.GetValue("InstallPath");
actualProgress = 15;
UpdateStatus("Checking for Steam process...");
if (!Process.GetProcessesByName("Steam").Any())
Expand All @@ -83,13 +84,27 @@ private void Run()
Thread.Sleep(5000);
Environment.Exit(0);
}
if (steamInstallationPath == null)
steamInstallationPath = Process.GetProcessesByName("Steam").First().MainModule.FileName;
else
steamInstallationPath = System.IO.Path.Combine(steamInstallationPath.ToString(), "steam.exe");
actualProgress = 20;
UpdateStatus("Starting Muse Dash via Steam...");
Process.Start(new ProcessStartInfo
if (File.Exists(steamInstallationPath as string))
{
FileName = System.IO.Path.Combine(steamRegKey.GetValue("InstallPath") as string, "steam.exe"),
Arguments = "-applaunch 774171"
});
Process.Start(new ProcessStartInfo
{
FileName = steamInstallationPath as string,
Arguments = "-applaunch 774171"
});
}
else
{
DisplayCriticalFailture();
UpdateStatus("How? Steam is running and doesn't exist?! Contact devs NOW.");
Thread.Sleep(5000);
Environment.Exit(0);
}
DateTime waitStart = DateTime.Now;
while (true)
{
Expand Down

0 comments on commit 398aa69

Please sign in to comment.