mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Fix track 1 pregap in CloneCD images. Fixes #489.
This commit is contained in:
@@ -447,20 +447,33 @@ namespace Aaru.DiscImages
|
||||
TrackSession = descriptor.SessionNumber
|
||||
};
|
||||
|
||||
if(firstTrackInSession)
|
||||
if(descriptor.POINT == 1)
|
||||
{
|
||||
currentTrack.TrackPregap = 150;
|
||||
|
||||
if(currentTrack.TrackStartSector > 0)
|
||||
{
|
||||
currentTrack.Indexes[0] = (int)currentTrack.TrackStartSector - 150;
|
||||
|
||||
if(currentTrack.Indexes[0] < 0)
|
||||
currentTrack.Indexes[0] = 0;
|
||||
}
|
||||
currentTrack.TrackPregap = currentTrack.TrackStartSector + 150;
|
||||
currentTrack.Indexes[0] = -150;
|
||||
currentTrack.Indexes[1] = (int)currentTrack.TrackStartSector;
|
||||
currentTrack.TrackStartSector = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(firstTrackInSession)
|
||||
{
|
||||
currentTrack.TrackPregap = 150;
|
||||
|
||||
currentTrack.Indexes[1] = (int)currentTrack.TrackStartSector;
|
||||
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;
|
||||
currentTrack.TrackStartSector -= 150;
|
||||
}
|
||||
else
|
||||
currentTrack.Indexes[1] = (int)currentTrack.TrackStartSector;
|
||||
}
|
||||
|
||||
firstTrackInSession = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user