mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-14 14:55:12 +01:00
[Core/CD] fixed ISO+WAV support regression (introduced by previous commit)
This commit is contained in:
parent
0e8ac65dc4
commit
eeea2039b6
@ -894,17 +894,17 @@ int cdd_load(char *filename, char *header)
|
|||||||
{
|
{
|
||||||
/* look for 'data' chunk */
|
/* look for 'data' chunk */
|
||||||
int chunkSize, dataOffset = 0;
|
int chunkSize, dataOffset = 0;
|
||||||
cdStreamSeek(cdd.toc.tracks[cdd.toc.last].fd, 12, SEEK_SET);
|
cdStreamSeek(fd, 12, SEEK_SET);
|
||||||
while (cdStreamRead(head, 8, 1, cdd.toc.tracks[cdd.toc.last].fd))
|
while (cdStreamRead(head, 8, 1, fd))
|
||||||
{
|
{
|
||||||
if (!memcmp(head, "data", 4))
|
if (!memcmp(head, "data", 4))
|
||||||
{
|
{
|
||||||
dataOffset = cdStreamTell(cdd.toc.tracks[cdd.toc.last].fd);
|
dataOffset = cdStreamTell(fd);
|
||||||
cdStreamSeek(cdd.toc.tracks[cdd.toc.last].fd, 0, SEEK_SET);
|
cdStreamSeek(fd, 0, SEEK_SET);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
chunkSize = head[4] + (head[5] << 8) + (head[6] << 16) + (head[7] << 24);
|
chunkSize = head[4] + (head[5] << 8) + (head[6] << 16) + (head[7] << 24);
|
||||||
cdStreamSeek(cdd.toc.tracks[cdd.toc.last].fd, chunkSize, SEEK_CUR);
|
cdStreamSeek(fd, chunkSize, SEEK_CUR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check if 'data' chunk has not been found */
|
/* check if 'data' chunk has not been found */
|
||||||
|
Loading…
Reference in New Issue
Block a user