mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 23:03:51 +02:00
Linux fixes
This commit is contained in:
@@ -70,6 +70,26 @@ namespace VRCX
|
||||
|
||||
public override bool StartGame(string arguments)
|
||||
{
|
||||
try
|
||||
{
|
||||
var process = Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = "steam",
|
||||
Arguments = $"-applaunch 438100 {arguments}",
|
||||
UseShellExecute = false,
|
||||
});
|
||||
if (process?.ExitCode == 0)
|
||||
{
|
||||
process.Close();
|
||||
return true;
|
||||
}
|
||||
process?.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.Error($"Failed to start VRChat: {e.Message}, attempting to start via Steam path.");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var steamPath = _steamPath;
|
||||
@@ -104,20 +124,8 @@ namespace VRCX
|
||||
|
||||
public override bool StartGameFromPath(string path, string arguments)
|
||||
{
|
||||
if (!path.EndsWith(".exe"))
|
||||
path = Path.Join(path, "launch.exe");
|
||||
|
||||
if (!path.EndsWith("launch.exe") || !File.Exists(path))
|
||||
return false;
|
||||
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
WorkingDirectory = Path.GetDirectoryName(path),
|
||||
FileName = path,
|
||||
UseShellExecute = false,
|
||||
Arguments = arguments
|
||||
})?.Close();
|
||||
return true;
|
||||
// This method is not used
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user