Fix ELF loading.

Remove save/load of boot2 injection option (shouldn't be part of the configuration any more as it's determined by the boot type, but I'm not sure where to move it)
Added missing entry point trigger after ELF loading.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2922 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
sudonim1 2010-04-28 00:05:41 +00:00
parent a68c7b2d45
commit 04cf8bcb0f
5 changed files with 13 additions and 15 deletions

View File

@ -275,8 +275,6 @@ void Pcsx2Config::LoadSave( IniInterface& ini )
IniBitBool( EnablePatches );
IniBitBool( ConsoleToStdio );
IniBitBool( UseBOOT2Injection );
IniBitBool( McdEnableEjection );
IniBitBool( MultitapPort0_Enabled );
IniBitBool( MultitapPort1_Enabled );

View File

@ -597,6 +597,7 @@ void __fastcall eeloadReplaceOSDSYS()
if (!elf_override.IsEmpty()) {
loadElfFile(elf_override);
eeGameStarting();
return;
}

View File

@ -844,6 +844,7 @@ class SysExecuteEvent : public SysExecEvent
{
protected:
bool m_UseCDVDsrc;
bool m_UseELFOverride;
CDVD_SourceType m_cdvdsrc_type;
wxString m_elf_override;
@ -862,21 +863,17 @@ public:
}
SysExecuteEvent()
: m_UseCDVDsrc(false)
, m_UseELFOverride(false)
{
m_UseCDVDsrc = false;
}
SysExecuteEvent( const wxString& elf_override )
: m_elf_override( elf_override )
{
m_UseCDVDsrc = false;
}
SysExecuteEvent( CDVD_SourceType srctype, const wxString& elf_override )
: m_elf_override( elf_override )
: m_UseCDVDsrc(true)
, m_UseELFOverride(true)
, m_cdvdsrc_type(srctype)
, m_elf_override( elf_override )
{
m_cdvdsrc_type = srctype;
m_UseCDVDsrc = true;
}
protected:
@ -897,7 +894,7 @@ protected:
else if( CDVD == NULL )
CDVDsys_ChangeSource( CDVDsrc_NoDisc );
if( !CoreThread.HasValidState() )
if( m_UseELFOverride && !CoreThread.HasValidState() )
CoreThread.SetElfOverride( m_elf_override );
CoreThread.Resume();
@ -908,7 +905,7 @@ protected:
// configured CDVD source device.
void Pcsx2App::SysExecute()
{
SysExecutorThread.PostEvent( new SysExecuteEvent(CoreThread.GetElfOverride()) );
SysExecutorThread.PostEvent( new SysExecuteEvent() );
}
// Executes the specified cdvd source and optional elf file. This command performs a
@ -916,7 +913,7 @@ void Pcsx2App::SysExecute()
// sources.
void Pcsx2App::SysExecute( CDVD_SourceType cdvdsrc, const wxString& elf_override )
{
SysExecutorThread.PostEvent( new SysExecuteEvent(cdvdsrc, CoreThread.GetElfOverride()) );
SysExecutorThread.PostEvent( new SysExecuteEvent(cdvdsrc, elf_override) );
}
// --------------------------------------------------------------------------------------

View File

@ -81,6 +81,7 @@ bool IsoDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filen
if( confirmed )
{
g_Conf->EmuOptions.UseBOOT2Injection = true;
sApp.SysExecute( g_Conf->CdvdSource, g_Conf->CurrentELF );
}
else

View File

@ -383,6 +383,7 @@ void MainEmuFrame::Menu_OpenELF_Click(wxCommandEvent&)
ScopedCoreThreadClose stopped_core;
if( _DoSelectELFBrowser() )
{
g_Conf->EmuOptions.UseBOOT2Injection = true;
sApp.SysExecute( g_Conf->CdvdSource, g_Conf->CurrentELF );
}