mirror of https://github.com/PCSX2/pcsx2.git
Minor changes to how the commandline auorun feature works, so that it initializes in the same general order/pattern as using the GUI. May fix some spotty problems.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1732 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
ac58ea42e3
commit
592781e7fc
|
@ -851,7 +851,11 @@ bool OpenCDVD( const char* pTitleFilename )
|
||||||
// if this assertion fails it means you didn't call CDVDsys_ChangeSource. You should.
|
// if this assertion fails it means you didn't call CDVDsys_ChangeSource. You should.
|
||||||
// You really should. Really.
|
// You really should. Really.
|
||||||
jASSUME( CDVD != NULL );
|
jASSUME( CDVD != NULL );
|
||||||
|
|
||||||
|
// hack to fix the new cdvd system, to ensure the plugin is always initialized when it's manually
|
||||||
|
// opened separately from the rest.
|
||||||
|
if( InitPlugins() == -1 ) return -1;
|
||||||
|
|
||||||
// Don't repetitively open the CDVD plugin if directly loading an elf file and open failed once already.
|
// Don't repetitively open the CDVD plugin if directly loading an elf file and open failed once already.
|
||||||
if (!OpenStatus.CDVD)
|
if (!OpenStatus.CDVD)
|
||||||
{
|
{
|
||||||
|
@ -861,7 +865,7 @@ bool OpenCDVD( const char* pTitleFilename )
|
||||||
pTitleFilename = cdvd_FileNameParam.c_str();
|
pTitleFilename = cdvd_FileNameParam.c_str();
|
||||||
|
|
||||||
if (DoCDVDopen(pTitleFilename) != 0)
|
if (DoCDVDopen(pTitleFilename) != 0)
|
||||||
{
|
{
|
||||||
Msgbox::Alert("Error Opening CDVD Plugin");
|
Msgbox::Alert("Error Opening CDVD Plugin");
|
||||||
ClosePlugins(true);
|
ClosePlugins(true);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -48,7 +48,8 @@ static void _loadStateOrExcept( const string& file )
|
||||||
|
|
||||||
// Make sure the cpu and plugins are ready to be state-ified!
|
// Make sure the cpu and plugins are ready to be state-ified!
|
||||||
cpuReset();
|
cpuReset();
|
||||||
OpenPlugins();
|
if( OpenPlugins() == -1 )
|
||||||
|
throw Exception::PluginFailure( "Could not open all configured plugins." );
|
||||||
|
|
||||||
joe.FreezeAll();
|
joe.FreezeAll();
|
||||||
|
|
||||||
|
|
|
@ -368,8 +368,6 @@ static std::string str_Default( "default" );
|
||||||
|
|
||||||
void RunGui()
|
void RunGui()
|
||||||
{
|
{
|
||||||
MSG msg;
|
|
||||||
|
|
||||||
PCSX2_MEM_PROTECT_BEGIN();
|
PCSX2_MEM_PROTECT_BEGIN();
|
||||||
|
|
||||||
LoadPatch( str_Default );
|
LoadPatch( str_Default );
|
||||||
|
@ -378,9 +376,19 @@ void RunGui()
|
||||||
{
|
{
|
||||||
// Initially bypass GUI and start PCSX2 directly.
|
// Initially bypass GUI and start PCSX2 directly.
|
||||||
|
|
||||||
|
SysReset();
|
||||||
CDVDsys_ChangeSource( g_Startup.CdvdSource );
|
CDVDsys_ChangeSource( g_Startup.CdvdSource );
|
||||||
if( !OpenCDVD( g_Startup.ImageName ) ) return;
|
if( !OpenCDVD( g_Startup.ImageName ) )
|
||||||
if( OpenPlugins() == -1 ) return;
|
{
|
||||||
|
Console::Error( "CDVD Initialization returned error, aborting autorun..." );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( OpenPlugins() == -1 )
|
||||||
|
{
|
||||||
|
Console::Error( "Some plugin failed to open, aborting autorun..." );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SysPrepareExecution( (g_Startup.StartupMode == Startup_FromELF) ? g_Startup.ImageName : NULL, !g_Startup.SkipBios );
|
SysPrepareExecution( (g_Startup.StartupMode == Startup_FromELF) ? g_Startup.ImageName : NULL, !g_Startup.SkipBios );
|
||||||
}
|
}
|
||||||
|
@ -395,6 +403,7 @@ void RunGui()
|
||||||
|
|
||||||
while( true )
|
while( true )
|
||||||
{
|
{
|
||||||
|
MSG msg;
|
||||||
if( PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE) != 0 )
|
if( PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE) != 0 )
|
||||||
{
|
{
|
||||||
if( msg.message == WM_QUIT )
|
if( msg.message == WM_QUIT )
|
||||||
|
|
Loading…
Reference in New Issue