From ad17fb9ab462f143e225c56feeecbb19875f06c0 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Sun, 10 Jan 2010 22:30:28 +0000 Subject: [PATCH] Fix to disc type detection. Starting elfs with non-ps2 disk mounted works again. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2424 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/CDVD/CDVDaccess.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pcsx2/CDVD/CDVDaccess.cpp b/pcsx2/CDVD/CDVDaccess.cpp index a354a80809..345dd1c7aa 100644 --- a/pcsx2/CDVD/CDVDaccess.cpp +++ b/pcsx2/CDVD/CDVDaccess.cpp @@ -96,11 +96,21 @@ static int CheckDiskTypeFS(int baseType) { } - if( rootdir.IsFile(L"PSX.EXE;1") ) + try { + IsoFile file( rootdir, L"PSX.EXE;1"); return CDVD_TYPE_PSCD; + } + catch( Exception::FileNotFound& ) + { + } - if( rootdir.IsFile(L"VIDEO_TS/VIDEO_TS.IFO;1") ) + try { + IsoFile file( rootdir, L"VIDEO_TS/VIDEO_TS.IFO;1"); return CDVD_TYPE_DVDV; + } + catch( Exception::FileNotFound& ) + { + } return CDVD_TYPE_ILLEGAL; // << Only for discs which aren't ps2 at all. }