aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCeruleanSky <CeruleanSky@users.noreply.github.com>2020-10-29 18:07:10 -0400
committerGitHub <noreply@github.com>2020-10-29 23:07:10 +0100
commitb5a760bde92df53714907d65cb7826ecb9b00d6a (patch)
tree1e8ac9e54f88bae23c422469e15045cdd581e532
parent423da5cc911bf7545746ad4fd184eff42f32dd9b (diff)
Preserve command line arguments when updater restarts Ryujinx (#1643)
Command line arguements are not preserved by the updater, and this causes an issue when the updater restarts Ryujinx in portable mode as it will create/use/modify its default directory instead. This simple pull addresses the first part of #1594 As far as the second part of the issue, where the updater perhaps overzealously deletes everything but log files and folders, which causes problems in portable installs with a user subfolder or something else inside the Ryujinx folder. Perhaps an UpdateList.txt containing a list of files that the updater deletes is included in the ryujinx.zip/tar.gz/etc and placed in the upacked directory for the updater to use upon the next upgrade. The build system can run something like `forfiles /s /m *.txt /c "cmd /c echo @relpath"` or the correct command for the OS and include it in the distribution, or it could be generated by the updater itself.
-rw-r--r--Ryujinx/Updater/UpdateDialog.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Ryujinx/Updater/UpdateDialog.cs b/Ryujinx/Updater/UpdateDialog.cs
index 5420baf2..768479d9 100644
--- a/Ryujinx/Updater/UpdateDialog.cs
+++ b/Ryujinx/Updater/UpdateDialog.cs
@@ -45,6 +45,7 @@ namespace Ryujinx.Ui
{
string ryuName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "Ryujinx.exe" : "Ryujinx";
string ryuExe = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ryuName);
+ string ryuArg = String.Join(" ", Environment.GetCommandLineArgs());
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
@@ -52,7 +53,7 @@ namespace Ryujinx.Ui
unixFileInfo.FileAccessPermissions |= FileAccessPermissions.UserExecute;
}
- Process.Start(ryuExe);
+ Process.Start(ryuExe, ryuArg);
Environment.Exit(0);
}