aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx/Modules/Updater/UpdateDialog.cs
diff options
context:
space:
mode:
authorJohn <loneboco@gmail.com>2023-05-11 17:14:29 -0700
committerGitHub <noreply@github.com>2023-05-12 02:14:29 +0200
commit49c63ea07779eb27674ae8c4a14e1dcf4b794a95 (patch)
treeacac13e26053e2b0862635884b45d38693f91d6d /src/Ryujinx/Modules/Updater/UpdateDialog.cs
parent531da8a1c0760c8ebf121ac83ba4c840ead9e443 (diff)
Fix the restart after an update. (#4869)1.1.790
* 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.
Diffstat (limited to 'src/Ryujinx/Modules/Updater/UpdateDialog.cs')
-rw-r--r--src/Ryujinx/Modules/Updater/UpdateDialog.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/Ryujinx/Modules/Updater/UpdateDialog.cs b/src/Ryujinx/Modules/Updater/UpdateDialog.cs
index 4957b681..e0a257fd 100644
--- a/src/Ryujinx/Modules/Updater/UpdateDialog.cs
+++ b/src/Ryujinx/Modules/Updater/UpdateDialog.cs
@@ -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);
}