Relaunch on game crash, log udon exceptions

This commit is contained in:
Natsumi
2023-03-23 02:26:12 +13:00
parent 2060e0e3de
commit 11f1f8063e
6 changed files with 194 additions and 77 deletions
+11 -2
View File
@@ -194,18 +194,22 @@ namespace VRCX
}
}
public void StartGameFromPath(string path, string arguments)
public bool StartGameFromPath(string path, string arguments)
{
if (!path.EndsWith(".exe"))
path = Path.Combine(path, "start_protected_game.exe");
if (!File.Exists(path))
return false;
Process.Start(new ProcessStartInfo
{
WorkingDirectory = Path.GetDirectoryName(path),
FileName = path,
UseShellExecute = false,
Arguments = arguments
}).Close();
})?.Close();
return true;
}
public void OpenLink(string url)
@@ -428,6 +432,11 @@ namespace VRCX
return Program.Version;
}
public bool VrcClosedGracefully()
{
return LogWatcher.Instance.VrcClosedGracefully;
}
public void ChangeTheme(int value)
{
WinformThemer.SetGlobalTheme(value);