From 1984c68516dd4cdbd16043dcbe5b587520c037d8 Mon Sep 17 00:00:00 2001 From: AKuHAK <621640+AKuHAK@users.noreply.github.com> Date: Fri, 21 May 2021 01:02:16 +0300 Subject: [PATCH] PCSX2: Add ability to combine CLI options --elf or --irx with --gameargs Exception: if full path to host: contains spaces, then arguments will be ignored. To avoid this you can use relative paths when possible. --- pcsx2/gui/AppInit.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcsx2/gui/AppInit.cpp b/pcsx2/gui/AppInit.cpp index abc1daaa83..3e0796be2f 100644 --- a/pcsx2/gui/AppInit.cpp +++ b/pcsx2/gui/AppInit.cpp @@ -463,6 +463,8 @@ bool Pcsx2App::OnInit() { g_Conf->Folders.RunELF = elfFile.GetPath(); sApp.SysExecute(Startup.CdvdSource, Startup.ElfFile); + if (Startup.ElfFile.Find(' ') == NULL) + EmuConfig.CurrentGameArgs = StringUtil::wxStringToUTF8String(Startup.GameLaunchArgs); } } else if (Startup.SysAutoRunIrx) @@ -473,6 +475,8 @@ bool Pcsx2App::OnInit() // FIXME: ElfFile is an irx it will crash sApp.SysExecute(Startup.CdvdSource, Startup.ElfFile); + if (Startup.ElfFile.Find(' ') == NULL) + EmuConfig.CurrentGameArgs = StringUtil::wxStringToUTF8String(Startup.GameLaunchArgs); } } // ----------------------------------------------------------------------------