1
1
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2025-08-31 22:06:27 -05:00

Fix the restart after an update. (#4869)

* Fix the restart after an update.

* Fix the updater for the Ava UI too.

* Fixing up the code after some change requests.
Removed a line of code that was accidentally left in.

* Fix restarting on Linux Avalonia.

* Fix issues with escaped arguments.
This commit is contained in:
John
2023-05-11 17:14:29 -07:00
committed by GitHub
parent 531da8a1c0
commit 49c63ea077
2 changed files with 45 additions and 12 deletions

View File

@@ -1,5 +1,6 @@
using Gdk;
using Gtk;
using Ryujinx.Common;
using Ryujinx.Ui;
using Ryujinx.Ui.Common.Configuration;
using Ryujinx.Ui.Common.Helper;
@@ -47,9 +48,19 @@ namespace Ryujinx.Modules
if (_restartQuery)
{
string ryuName = OperatingSystem.IsWindows() ? "Ryujinx.exe" : "Ryujinx";
string ryuExe = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ryuName);
Process.Start(ryuExe, CommandLineState.Arguments);
ProcessStartInfo processStart = new(ryuName)
{
UseShellExecute = true,
WorkingDirectory = ReleaseInformation.GetBaseApplicationDirectory()
};
foreach (string argument in CommandLineState.Arguments)
{
processStart.ArgumentList.Add(argument);
}
Process.Start(processStart);
Environment.Exit(0);
}