mirror of https://github.com/PCSX2/pcsx2.git
Fix blockdump reading, the disc type wasn't being properly detected.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/async-iso@5468 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
d8a1534bce
commit
6dcc908884
|
@ -45,8 +45,7 @@ int InputIsoFile::ReadSync(u8* dst, uint lsn)
|
|||
return -1;
|
||||
}
|
||||
|
||||
m_reader->BeginRead(dst+m_blockofs, lsn, 1);
|
||||
return m_reader->FinishRead();
|
||||
return m_reader->ReadSync(dst+m_blockofs, lsn, 1);
|
||||
}
|
||||
|
||||
void InputIsoFile::BeginRead2(uint lsn)
|
||||
|
@ -203,7 +202,8 @@ bool InputIsoFile::Open( const wxString& srcfile, bool testOnly )
|
|||
m_reader = new FlatFileReader();
|
||||
m_reader->Open(m_filename);
|
||||
|
||||
if(BlockdumpFileReader::DetectBlockdump(m_reader))
|
||||
bool isBlockdump;
|
||||
if(isBlockdump = BlockdumpFileReader::DetectBlockdump(m_reader))
|
||||
{
|
||||
delete m_reader;
|
||||
|
||||
|
@ -218,9 +218,6 @@ bool InputIsoFile::Open( const wxString& srcfile, bool testOnly )
|
|||
|
||||
ReadUnit = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ReadUnit = MaxReadUnit;
|
||||
|
||||
bool detected = Detect();
|
||||
|
||||
|
@ -231,6 +228,11 @@ bool InputIsoFile::Open( const wxString& srcfile, bool testOnly )
|
|||
throw Exception::BadStream()
|
||||
.SetUserMsg(_("Unrecognized ISO image file format"))
|
||||
.SetDiagMsg(L"ISO mounting failed: PCSX2 is unable to identify the ISO image type.");
|
||||
|
||||
if(!isBlockdump)
|
||||
{
|
||||
ReadUnit = MaxReadUnit;
|
||||
|
||||
m_reader->SetBlockSize(m_blocksize);
|
||||
|
||||
// Returns the original reader if single-part or a Multipart reader otherwise
|
||||
|
|
Loading…
Reference in New Issue