mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Fix indexes from CloneCD disc images. Fixes #374.
This commit is contained in:
@@ -433,8 +433,6 @@ namespace Aaru.DiscImages
|
||||
|
||||
Tracks.Add(currentTrack);
|
||||
}
|
||||
else
|
||||
firstTrackInSession = false;
|
||||
|
||||
currentTrack = new Track
|
||||
{
|
||||
@@ -449,6 +447,23 @@ namespace Aaru.DiscImages
|
||||
TrackSession = descriptor.SessionNumber
|
||||
};
|
||||
|
||||
if(firstTrackInSession)
|
||||
{
|
||||
currentTrack.TrackPregap = 150;
|
||||
|
||||
if(currentTrack.TrackStartSector > 0)
|
||||
{
|
||||
currentTrack.Indexes[0] = (int)currentTrack.TrackStartSector - 150;
|
||||
|
||||
if(currentTrack.Indexes[0] < 0)
|
||||
currentTrack.Indexes[0] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
currentTrack.Indexes[1] = (int)currentTrack.TrackStartSector;
|
||||
|
||||
firstTrackInSession = false;
|
||||
|
||||
// Need to check exact data type later
|
||||
if((TocControl)(descriptor.CONTROL & 0x0D) == TocControl.DataTrack ||
|
||||
(TocControl)(descriptor.CONTROL & 0x0D) == TocControl.DataTrackIncremental)
|
||||
|
||||
Reference in New Issue
Block a user