mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-14 06:45:09 +01:00
[Core/CD] fixed track index when decoding CUE file MegaSD specific loop commands
This commit is contained in:
parent
543e17f818
commit
0c63be93f7
@ -623,6 +623,7 @@ int cdd_load(char *filename, char *header)
|
|||||||
if (fd)
|
if (fd)
|
||||||
{
|
{
|
||||||
int mm, ss, bb, pregap = 0;
|
int mm, ss, bb, pregap = 0;
|
||||||
|
int index = 0;
|
||||||
|
|
||||||
/* DATA track already loaded ? */
|
/* DATA track already loaded ? */
|
||||||
if (cdd.toc.last)
|
if (cdd.toc.last)
|
||||||
@ -795,27 +796,30 @@ int cdd_load(char *filename, char *header)
|
|||||||
cdd.toc.tracks[cdd.toc.last - 1].end = 0;
|
cdd.toc.tracks[cdd.toc.last - 1].end = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* save current track index */
|
||||||
|
index = cdd.toc.last;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* decode REM LOOP xxx command (MegaSD specific command) */
|
/* decode REM LOOP xxx command (MegaSD specific command) */
|
||||||
else if (sscanf(lptr, "REM LOOP %d", &bb) == 1)
|
else if (sscanf(lptr, "REM LOOP %d", &bb) == 1)
|
||||||
{
|
{
|
||||||
cdd.toc.tracks[cdd.toc.last].loopEnabled = 1;
|
cdd.toc.tracks[index].loopEnabled = 1;
|
||||||
cdd.toc.tracks[cdd.toc.last].loopOffset = bb;
|
cdd.toc.tracks[index].loopOffset = bb;
|
||||||
isMSDfile = 1;
|
isMSDfile = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* decode REM LOOP command (MegaSD specific command) */
|
/* decode REM LOOP command (MegaSD specific command) */
|
||||||
else if (strstr(lptr,"REM LOOP"))
|
else if (strstr(lptr,"REM LOOP"))
|
||||||
{
|
{
|
||||||
cdd.toc.tracks[cdd.toc.last].loopEnabled = 1;
|
cdd.toc.tracks[index].loopEnabled = 1;
|
||||||
isMSDfile = 1;
|
isMSDfile = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* decode REM NOLOOP command (MegaSD specific command) */
|
/* decode REM NOLOOP command (MegaSD specific command) */
|
||||||
else if (strstr(lptr,"REM NOLOOP"))
|
else if (strstr(lptr,"REM NOLOOP"))
|
||||||
{
|
{
|
||||||
cdd.toc.tracks[cdd.toc.last].loopEnabled = -1;
|
cdd.toc.tracks[index].loopEnabled = -1;
|
||||||
isMSDfile = 1;
|
isMSDfile = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user