Remove wxHelpers.h from the codeblocks project. Add a define determining if pcsx2 tries to load PS1 games or not.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2239 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2009-11-23 13:15:48 +00:00
parent 4828beb3c3
commit 13e71c413a
3 changed files with 13 additions and 4 deletions

View File

@ -615,3 +615,8 @@ extern SessionOverrideFlags g_Session;
#define EE_CONST_PROP // rec2 - enables constant propagation (faster)
//#define NON_SSE_UNPACKS // Turns off SSE Unpacks (slower)
// Uncomment this if working on getting PS1 emulation working.
// This disables the exception normally caused by trying to load PS1
// games. Note: currently PS1 games will error out even without this
// commented, so this is for development purposes only.
//#define ENABLE_LOADING_PS1_GAMES

View File

@ -322,7 +322,8 @@ struct ElfObject
{
int rsize = 0;
const wxCharBuffer work( filename.ToUTF8() );
if ((strnicmp( work, "cdrom0:", strlen("cdromN:")) == 0) ||
if ((strnicmp( work, "cdrom:", strlen("cdrom:" )) == 0) ||
(strnicmp( work, "cdrom0:", strlen("cdromN:")) == 0) ||
(strnicmp( work, "cdrom1:", strlen("cdromN:")) == 0))
{
IsoFSCDVD isofs;
@ -519,8 +520,10 @@ u32 loadElfCRC( const char* filename )
// of "cdrom0:" or "cdrom1:" then the CDVD is used as the source; otherwise the ELF is loaded
// from the host filesystem.
//
// If it starts with "cdrom:", an exception is thrown, unless PS1 emulation is being attempted.
//
// If the specified filename is empty then no action is taken (PS2 will continue booting
// normally as if it has no CD
// normally as if it has no CD.
//
// Throws exception on error:
//
@ -534,10 +537,12 @@ void loadElfFile(const wxString& filename)
const wxCharBuffer fnptr( filename.ToUTF8() );
bool useCdvdSource = false;
#ifndef ENABLE_LOADING_PS1_GAMES
if( filename.StartsWith( L"cdrom:" ) )
throw Exception::RuntimeError( wxLt("This is not a Ps2 disc. (And we don't currently emulate PS1 games)") );
#endif
if( !filename.StartsWith( L"cdrom0:" ) && !filename.StartsWith( L"cdrom1:" ) )
if( !filename.StartsWith( L"cdrom:" ) && !filename.StartsWith( L"cdrom0:" ) && !filename.StartsWith( L"cdrom1:" ) )
{
DevCon.WriteLn("Loading from a file (or non-cd image)");
elfsize = Path::GetFileSize( filename );

View File

@ -451,7 +451,6 @@
<Unit filename="../gui/Saveslots.cpp" />
<Unit filename="../gui/i18n.cpp" />
<Unit filename="../gui/i18n.h" />
<Unit filename="../gui/wxHelpers.h" />
<Unit filename="../ps2/BiosTools.cpp" />
<Unit filename="../ps2/BiosTools.h" />
<Unit filename="../ps2/GIFpath.cpp" />