mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-13 17:50:13 +01:00
Misc: Fix lastpath updating when using --elf cmdline
This commit is contained in:
1 parent
d7de81aaaa
commit
17c66cc2d3
1 file changed
+18
-2
+18
-2
@@ -472,8 +472,24 @@ bool Pcsx2App::OnInit()
|
||||
else if (Startup.SysAutoRunElf)
|
||||
{
|
||||
g_Conf->EmuOptions.UseBOOT2Injection = true;
|
||||
g_Conf->Folders.RunELF = wxFileName(Startup.ElfFile).GetPath();
|
||||
sApp.SysExecute(Startup.CdvdSource, Startup.ElfFile);
|
||||
|
||||
// wxPATH_NATIVE is broken on msw, it can delete the first directory after the volume
|
||||
// EX: P://dir1/dir2/elf.elf -> P://dir2/ ???
|
||||
#ifdef _WIN32
|
||||
wxFileName elfFile = wxFileName(Startup.ElfFile, wxPATH_WIN);
|
||||
#else
|
||||
wxFileName elfFile = wxFileName(Startup.ElfFile, wxPATH_NATIVE);
|
||||
#endif
|
||||
|
||||
if (!elfFile.FileExists())
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("Specified elf file %s does not exist!"), Startup.ElfFile), "PCSX2", wxICON_ERROR);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_Conf->Folders.RunELF = elfFile.GetPath();
|
||||
sApp.SysExecute(Startup.CdvdSource, Startup.ElfFile);
|
||||
}
|
||||
}
|
||||
else if (Startup.SysAutoRunIrx)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user