mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-27 16:15:41 +00:00
CueParser: Ignore pregap when index 0 is specified
Also corrects the previous track length when index 0 is specified.
This commit is contained in:
parent
8f639070c9
commit
16efffa403
|
@ -452,7 +452,12 @@ bool File::SetTrackLengths(u32 line_number, Common::Error* error)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
previous_track->length = MSF::FromLBA(track.start.ToLBA() - previous_track->start.ToLBA());
|
// Use index 0, otherwise index 1.
|
||||||
|
const MSF* start_index = track.GetIndex(0);
|
||||||
|
if (!start_index)
|
||||||
|
start_index = track.GetIndex(1);
|
||||||
|
|
||||||
|
previous_track->length = MSF::FromLBA(start_index->ToLBA() - previous_track->start.ToLBA());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue