From 7c769b19410030761a059a19be96121d819e369c Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Tue, 23 Nov 2021 00:01:58 +1000 Subject: [PATCH] CDImageDevice: Don't add out-of-file pregaps to audio tracks --- src/common/cd_image_device.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/common/cd_image_device.cpp b/src/common/cd_image_device.cpp index 947d44519..f41f57d98 100644 --- a/src/common/cd_image_device.cpp +++ b/src/common/cd_image_device.cpp @@ -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; // TODO: How the hell do we handle pregaps here? - const u32 pregap_frames = - (track_num <= MAX_TRACK_NUMBER && ((control.data && track_index == 0) || (!control.data && track_index != 0))) ? - 150 : - 0; + const u32 pregap_frames = (control.data && track_index == 0) ? 150 : 0; if (pregap_frames > 0) { Index pregap_index = {};