mirror of https://github.com/PCSX2/pcsx2.git
CDVD: Get rid of negative data offsets
It doesn't make sense. Code was written in 2009 with no explaination.
This commit is contained in:
parent
776cdd60fa
commit
97cedb311a
|
@ -299,16 +299,16 @@ bool InputIsoFile::IsOpened() const
|
||||||
return m_reader != NULL;
|
return m_reader != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputIsoFile::tryIsoType(u32 _size, s32 _offset, s32 _blockofs)
|
bool InputIsoFile::tryIsoType(u32 size, u32 offset, u32 blockofs)
|
||||||
{
|
{
|
||||||
static u8 buf[2456];
|
u8 buf[2456];
|
||||||
|
|
||||||
m_blocksize = _size;
|
m_blocksize = size;
|
||||||
m_offset = _offset;
|
m_offset = offset;
|
||||||
m_blockofs = _blockofs;
|
m_blockofs = blockofs;
|
||||||
|
|
||||||
m_reader->SetDataOffset(_offset);
|
m_reader->SetDataOffset(offset);
|
||||||
m_reader->SetBlockSize(_size);
|
m_reader->SetBlockSize(size);
|
||||||
|
|
||||||
if (ReadSync(buf, 16) < 0)
|
if (ReadSync(buf, 16) < 0)
|
||||||
return false;
|
return false;
|
||||||
|
@ -359,13 +359,6 @@ bool InputIsoFile::Detect(bool readType)
|
||||||
if (tryIsoType(2448, 150 * 2048, 0))
|
if (tryIsoType(2448, 150 * 2048, 0))
|
||||||
return true; // NERO RAWQ 2448
|
return true; // NERO RAWQ 2448
|
||||||
|
|
||||||
if (tryIsoType(2048, -8, 24))
|
|
||||||
return true; // ISO 2048
|
|
||||||
if (tryIsoType(2352, -8, 0))
|
|
||||||
return true; // RAW 2352
|
|
||||||
if (tryIsoType(2448, -8, 0))
|
|
||||||
return true; // RAWQ 2448
|
|
||||||
|
|
||||||
m_offset = 0;
|
m_offset = 0;
|
||||||
m_blocksize = CD_FRAMESIZE_RAW;
|
m_blocksize = CD_FRAMESIZE_RAW;
|
||||||
m_blockofs = 0;
|
m_blockofs = 0;
|
||||||
|
|
|
@ -95,7 +95,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
void _init();
|
void _init();
|
||||||
|
|
||||||
bool tryIsoType(u32 _size, s32 _offset, s32 _blockofs);
|
bool tryIsoType(u32 size, u32 offset, u32 blockofs);
|
||||||
void FindParts();
|
void FindParts();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue