mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-28 10:55:28 +01:00
[Core/CD] improved CUE file parsing (fixes issue with CUE files mixing single-track and multiple-tracks files)
This commit is contained in:
parent
863c7254c9
commit
e455861255
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 3.7 MiB After Width: | Height: | Size: 3.7 MiB |
Binary file not shown.
Before Width: | Height: | Size: 3.9 MiB After Width: | Height: | Size: 3.9 MiB |
@ -758,16 +758,16 @@ int cdd_load(char *filename, char *header)
|
|||||||
cdd.toc.tracks[cdd.toc.last].offset += pregap * 2352;
|
cdd.toc.tracks[cdd.toc.last].offset += pregap * 2352;
|
||||||
|
|
||||||
/* check if a single file is used for consecutive tracks */
|
/* check if a single file is used for consecutive tracks */
|
||||||
if (!cdd.toc.tracks[cdd.toc.last].fd)
|
if (!cdd.toc.tracks[cdd.toc.last].fd && cdd.toc.last)
|
||||||
{
|
{
|
||||||
/* use common file descriptor */
|
/* use common file descriptor */
|
||||||
cdd.toc.tracks[cdd.toc.last].fd = cdd.toc.tracks[0].fd;
|
cdd.toc.tracks[cdd.toc.last].fd = cdd.toc.tracks[cdd.toc.last - 1].fd;
|
||||||
|
|
||||||
/* current track start time (based on current file absolute time + PREGAP length) */
|
/* current track start time (based on current file absolute time + PREGAP length) */
|
||||||
cdd.toc.tracks[cdd.toc.last].start = bb + ss*75 + mm*60*75 + pregap;
|
cdd.toc.tracks[cdd.toc.last].start = bb + ss*75 + mm*60*75 + pregap;
|
||||||
|
|
||||||
/* check if previous track end time needs to be set */
|
/* check if previous track end time needs to be set */
|
||||||
if (cdd.toc.last && !cdd.toc.tracks[cdd.toc.last - 1].end)
|
if (!cdd.toc.tracks[cdd.toc.last - 1].end)
|
||||||
{
|
{
|
||||||
/* set previous track end time (based on current track start time, ignoring any "PREGAP"-type pause if no INDEX00) */
|
/* set previous track end time (based on current track start time, ignoring any "PREGAP"-type pause if no INDEX00) */
|
||||||
cdd.toc.tracks[cdd.toc.last - 1].end = cdd.toc.tracks[cdd.toc.last].start;
|
cdd.toc.tracks[cdd.toc.last - 1].end = cdd.toc.tracks[cdd.toc.last].start;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user