diff --git a/pcsx2/gui/App.h b/pcsx2/gui/App.h index bf9ce4024e..6ab4af2a74 100644 --- a/pcsx2/gui/App.h +++ b/pcsx2/gui/App.h @@ -290,11 +290,14 @@ public: // is set to ISO. wxString IsoFile; + wxString ElfFile; + // Specifies the CDVD source type to use when AutoRunning CDVD_SourceType CdvdSource; // Indicates if PCSX2 should autorun the configured CDVD source and/or ISO file. bool SysAutoRun; + bool SysAutoRunElf; StartupOptions() { @@ -303,7 +306,10 @@ public: PortableMode = false; NoFastBoot = false; SysAutoRun = false; + SysAutoRunElf = false; CdvdSource = CDVDsrc_NoDisc; + IsoFile = ""; + ElfFile = ""; } }; diff --git a/pcsx2/gui/AppInit.cpp b/pcsx2/gui/AppInit.cpp index 3e66781808..b0b808d942 100644 --- a/pcsx2/gui/AppInit.cpp +++ b/pcsx2/gui/AppInit.cpp @@ -346,6 +346,14 @@ bool Pcsx2App::OnCmdLineParsed( wxCmdLineParser& parser ) Startup.IsoFile = parser.GetParam( 0 ); Startup.SysAutoRun = true; } + else + { + wxString elf_file; + if (parser.Found(L"elf", &elf_file) && !elf_file.IsEmpty()) { + Startup.SysAutoRunElf = true; + Startup.ElfFile = elf_file; + } + } if( parser.Found(L"usecd") ) { @@ -485,6 +493,15 @@ bool Pcsx2App::OnInit() SysUpdateIsoSrcFile( Startup.IsoFile ); sApp.SysExecute( Startup.CdvdSource ); } + else if ( Startup.SysAutoRunElf ) + { + g_Conf->EmuOptions.UseBOOT2Injection = true; + // Enable iop/ee logging + SysConsole.eeConsole.Enabled = true; + SysConsole.iopConsole.Enabled = true; + + sApp.SysExecute( Startup.CdvdSource, Startup.ElfFile ); + } } // ---------------------------------------------------------------------------- catch( Exception::StartupAborted& ex ) // user-aborted, no popups needed.