CDImageDevice: Don't add out-of-file pregaps to audio tracks

This commit is contained in:
Connor McLaughlin 2021-11-23 00:01:58 +10:00
parent 827048eeda
commit 7c769b1941

View file

@ -200,10 +200,7 @@ bool CDImageDeviceWin32::Open(const char* filename, Common::Error* error)
const TrackMode track_mode = control.data ? CDImage::TrackMode::Mode2Raw : CDImage::TrackMode::Audio; const TrackMode track_mode = control.data ? CDImage::TrackMode::Mode2Raw : CDImage::TrackMode::Audio;
// TODO: How the hell do we handle pregaps here? // TODO: How the hell do we handle pregaps here?
const u32 pregap_frames = const u32 pregap_frames = (control.data && track_index == 0) ? 150 : 0;
(track_num <= MAX_TRACK_NUMBER && ((control.data && track_index == 0) || (!control.data && track_index != 0))) ?
150 :
0;
if (pregap_frames > 0) if (pregap_frames > 0)
{ {
Index pregap_index = {}; Index pregap_index = {};