* Re-enabled PCH in release builds; fixes various mysterious crashes.

* Restored Run->Execute's old behavior when the emu is in a reset condition (plain jane bootup using CDVD plugin).
 * Fixed some CDVD init stuff on the Linux side of things.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1691 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-08-27 19:38:09 +00:00
parent 7265d33526
commit 4c39dd35a7
5 changed files with 32 additions and 25 deletions

View File

@ -118,7 +118,7 @@ static int FindDiskType(int mType)
}
else if (mType < 0)
{
static char bleh[2352];
static u8 bleh[2352];
cdvdTD td;
CDVD->getTD(0,&td);
@ -126,14 +126,14 @@ static int FindDiskType(int mType)
{
iCDType = CDVD_TYPE_DETCTDVDS;
}
else if (DoCDVDreadSector((u8*)bleh,16,CDVD_MODE_2048) == 0)
else
{
struct cdVolDesc* volDesc=(struct cdVolDesc *)bleh;
if (volDesc)
{
if(volDesc->rootToc.tocSize==2048)
if (DoCDVDreadSector(bleh, 16, CDVD_MODE_2048) == 0)
{
const cdVolDesc& volDesc = (cdVolDesc&)bleh;
if(volDesc.rootToc.tocSize == 2048)
iCDType = CDVD_TYPE_DETCTCD;
else
else
iCDType = CDVD_TYPE_DETCTDVDS;
}
}

View File

@ -132,7 +132,7 @@ int main(int argc, const char *argv[])
}
CDVDsys_ChangeSource( g_Startup.CdvdSource );
DoCDVDopen( g_Startup.ImageName );
if( !OpenCDVD( g_Startup.ImageName ) ) return -1;
if (OpenPlugins() == -1) return -1;
SysPrepareExecution( (g_Startup.StartupMode == Startup_FromELF) ? g_Startup.ImageName : NULL, !g_Startup.SkipBios );
@ -329,8 +329,8 @@ void OnFile_RunCD(GtkMenuItem *menuitem, gpointer user_data)
{
SysReset();
CDVDsys_ChangeSource( CDVDsrc_Plugin );
DoCDVDopen( NULL );
SysPrepareExecution(NULL);
if( OpenCDVD( NULL ) )
SysPrepareExecution(NULL);
}
void OnFile_RunBIOS(GtkMenuItem *menuitem, gpointer user_data)
@ -350,8 +350,8 @@ void OnRunIso_Ok(GtkButton* button, gpointer user_data)
SysReset();
CDVDsys_ChangeSource( CDVDsrc_Iso );
DoCDVDopen( File );
SysPrepareExecution( NULL );
if( OpenCDVD( File ) );
SysPrepareExecution( NULL );
}
void OnRunIso_Cancel(GtkButton* button, gpointer user_data)
@ -398,8 +398,8 @@ void OnRunElf_Ok(GtkButton* button, gpointer user_data)
SysReset();
CDVDsys_ChangeSource( source );
OpenCDVD( NULL );
SysPrepareExecution(elf_name);
if( OpenCDVD( NULL ) )
SysPrepareExecution(elf_name);
}
void OnRunElf_Cancel(GtkButton* button, gpointer user_data)

View File

@ -814,6 +814,7 @@ void ShutdownPlugins()
if (CDVDshutdown != NULL) CDVDshutdown();
cdvd_FileNameParam.clear();
CDVD = NULL;
if (DEV9shutdown != NULL) DEV9shutdown();
if (USBshutdown != NULL) USBshutdown();

View File

@ -215,7 +215,7 @@
PreprocessorDefinitions="NDEBUG"
ExceptionHandling="2"
EnableEnhancedInstructionSet="0"
UsePrecompiledHeader="0"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="PrecompiledHeader.h"
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
CompileAs="2"
@ -2254,7 +2254,6 @@
RelativePath="..\..\Gif.cpp"
>
</File>
<File
RelativePath="..\..\Gif.h"
>

View File

@ -689,8 +689,8 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
SysReset();
CDVDsys_ChangeSource( CDVDsrc_Iso );
OpenCDVD( isostr.c_str() );
SysPrepareExecution( outstr.c_str() );
if( OpenCDVD( isostr.c_str() ) )
SysPrepareExecution( outstr.c_str() );
}
}
break;
@ -702,8 +702,8 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
SysReset();
CDVDsys_ChangeSource( CDVDsrc_Plugin );
OpenCDVD( NULL ); // manually open the CDVD plugin even though we don't really have to. (See RUNCD for details)
SysPrepareExecution( outstr.c_str() );
if( OpenCDVD( NULL ) ) // manually open the CDVD plugin even though we don't really have to. (See RUNCD for details)
SysPrepareExecution( outstr.c_str() );
}
}
break;
@ -715,8 +715,8 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
SysReset();
CDVDsys_ChangeSource( CDVDsrc_Iso );
OpenCDVD( outstr.c_str() );
SysPrepareExecution( NULL );
if( OpenCDVD( outstr.c_str() ) )
SysPrepareExecution( NULL );
}
}
break;
@ -729,7 +729,14 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
case ID_RUN_EXECUTE:
// Execute without reset -- resumes existing states or runs the BIOS if
// the state is cleared/reset.
// the state is cleared/reset. If the CDVD is NULL (system reset), then
// assume the cdvd plugin as the source. (retains legacy behavior)
if( CDVD == NULL )
{
CDVDsys_ChangeSource( CDVDsrc_Plugin );
if( !OpenCDVD( NULL ) ) break;
}
SysPrepareExecution( NULL, true );
break;
@ -739,8 +746,8 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
// Note: manually open the CDVD plugin here, even though we don't really have to.
// This ensures that the CDVD plugin's popups (like cdvdiso's browser) don't get obscured
// by the GS window.
OpenCDVD( NULL );
SysPrepareExecution( NULL );
if( OpenCDVD( NULL ) )
SysPrepareExecution( NULL );
break;
case ID_RUN_RESET: