GUI: Allow relative elf file paths on command line. (#4451)

This commit is contained in:
Ziemas 2021-11-30 10:06:17 +01:00 committed by GitHub
parent 7a4191e16d
commit bacb860cc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

@ -318,14 +318,15 @@ bool Pcsx2App::OnCmdLineParsed(wxCmdLineParser& parser)
{
wxString elf_file;
if (parser.Found(L"elf", &elf_file) && !elf_file.IsEmpty())
{
Startup.SysAutoRunElf = true;
Startup.ElfFile = elf_file;
}
else if (parser.Found(L"irx", &elf_file) && !elf_file.IsEmpty())
{
Startup.SysAutoRunIrx = true;
Startup.ElfFile = elf_file;
if (!elf_file.IsEmpty())
{
auto path = wxFileName(elf_file);
path.Normalize();
Startup.ElfFile = path.GetFullPath();
}
}