mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-26 19:21:49 +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 */
|
||||
int chunkSize, dataOffset = 0;
|
||||
cdStreamSeek(cdd.toc.tracks[cdd.toc.last].fd, 12, SEEK_SET);
|
||||
while (cdStreamRead(head, 8, 1, cdd.toc.tracks[cdd.toc.last].fd))
|
||||
cdStreamSeek(fd, 12, SEEK_SET);
|
||||
while (cdStreamRead(head, 8, 1, fd))
|
||||
{
|
||||
if (!memcmp(head, "data", 4))
|
||||
{
|
||||
dataOffset = cdStreamTell(cdd.toc.tracks[cdd.toc.last].fd);
|
||||
cdStreamSeek(cdd.toc.tracks[cdd.toc.last].fd, 0, SEEK_SET);
|
||||
dataOffset = cdStreamTell(fd);
|
||||
cdStreamSeek(fd, 0, SEEK_SET);
|
||||
break;
|
||||
}
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user