mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-25 23:25:41 +00:00
CDImage: Use track's control instead of last track's control for pregap
This commit is contained in:
parent
02f67a801e
commit
7ecac6dbcf
|
@ -101,9 +101,6 @@ bool CDImageCHD::Open(const char* filename)
|
||||||
u32 disc_lba = 0;
|
u32 disc_lba = 0;
|
||||||
u64 disc_frame = 0;
|
u64 disc_frame = 0;
|
||||||
|
|
||||||
// "last track" subchannel q - used for the pregap
|
|
||||||
SubChannelQ::Control last_track_control{};
|
|
||||||
|
|
||||||
// for each track..
|
// for each track..
|
||||||
int num_tracks = 0;
|
int num_tracks = 0;
|
||||||
for (;;)
|
for (;;)
|
||||||
|
@ -178,7 +175,7 @@ bool CDImageCHD::Open(const char* filename)
|
||||||
pregap_index.track_number = track_num;
|
pregap_index.track_number = track_num;
|
||||||
pregap_index.index_number = 0;
|
pregap_index.index_number = 0;
|
||||||
pregap_index.mode = mode.value();
|
pregap_index.mode = mode.value();
|
||||||
pregap_index.control.bits = (track_num > 1) ? last_track_control.bits : control.bits;
|
pregap_index.control.bits = control.bits;
|
||||||
pregap_index.is_pregap = true;
|
pregap_index.is_pregap = true;
|
||||||
|
|
||||||
if (pregap_in_file)
|
if (pregap_in_file)
|
||||||
|
@ -203,7 +200,6 @@ bool CDImageCHD::Open(const char* filename)
|
||||||
// add the track itself
|
// add the track itself
|
||||||
m_tracks.push_back(Track{static_cast<u32>(track_num), disc_lba, static_cast<u32>(m_indices.size()),
|
m_tracks.push_back(Track{static_cast<u32>(track_num), disc_lba, static_cast<u32>(m_indices.size()),
|
||||||
static_cast<u32>(frames), mode.value(), control});
|
static_cast<u32>(frames), mode.value(), control});
|
||||||
last_track_control.bits = control.bits;
|
|
||||||
|
|
||||||
// how many indices in this track?
|
// how many indices in this track?
|
||||||
Index index = {};
|
Index index = {};
|
||||||
|
|
|
@ -66,9 +66,6 @@ bool CDImageCueSheet::OpenAndParse(const char* filename)
|
||||||
|
|
||||||
u32 disc_lba = 0;
|
u32 disc_lba = 0;
|
||||||
|
|
||||||
// "last track" subchannel q - used for the pregap
|
|
||||||
SubChannelQ::Control last_track_control{};
|
|
||||||
|
|
||||||
// for each track..
|
// for each track..
|
||||||
const int num_tracks = cd_get_ntrack(m_cd);
|
const int num_tracks = cd_get_ntrack(m_cd);
|
||||||
for (int track_num = 1; track_num <= num_tracks; track_num++)
|
for (int track_num = 1; track_num <= num_tracks; track_num++)
|
||||||
|
@ -138,7 +135,7 @@ bool CDImageCueSheet::OpenAndParse(const char* filename)
|
||||||
pregap_index.track_number = track_num;
|
pregap_index.track_number = track_num;
|
||||||
pregap_index.index_number = 0;
|
pregap_index.index_number = 0;
|
||||||
pregap_index.mode = mode;
|
pregap_index.mode = mode;
|
||||||
pregap_index.control.bits = (track_num > 1) ? last_track_control.bits : control.bits;
|
pregap_index.control.bits = control.bits;
|
||||||
pregap_index.is_pregap = true;
|
pregap_index.is_pregap = true;
|
||||||
if (pregap_in_file)
|
if (pregap_in_file)
|
||||||
{
|
{
|
||||||
|
@ -153,9 +150,8 @@ bool CDImageCueSheet::OpenAndParse(const char* filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
// add the track itself
|
// add the track itself
|
||||||
m_tracks.push_back(
|
m_tracks.push_back(Track{static_cast<u32>(track_num), disc_lba, static_cast<u32>(m_indices.size()),
|
||||||
Track{static_cast<u32>(track_num), disc_lba, static_cast<u32>(m_indices.size()), static_cast<u32>(track_length)});
|
static_cast<u32>(track_length), mode, control});
|
||||||
last_track_control.bits = control.bits;
|
|
||||||
|
|
||||||
// how many indices in this track?
|
// how many indices in this track?
|
||||||
Index last_index;
|
Index last_index;
|
||||||
|
|
Loading…
Reference in a new issue