From 08b26edcebd08ffad0109560bf97ae2c8a09c506 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 25 Jul 2020 02:36:41 +1000 Subject: [PATCH] CDImage: Fix incorrect track length Shouldn't affect much, other than the game properties window. --- src/common/cd_image_chd.cpp | 2 +- src/common/cd_image_cue.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/cd_image_chd.cpp b/src/common/cd_image_chd.cpp index d4e78fd5b..9182ffec1 100644 --- a/src/common/cd_image_chd.cpp +++ b/src/common/cd_image_chd.cpp @@ -199,7 +199,7 @@ bool CDImageCHD::Open(const char* filename) // add the track itself m_tracks.push_back(Track{static_cast(track_num), disc_lba, static_cast(m_indices.size()), - static_cast(frames), mode.value(), control}); + static_cast(frames + pregap_frames), mode.value(), control}); // how many indices in this track? Index index = {}; diff --git a/src/common/cd_image_cue.cpp b/src/common/cd_image_cue.cpp index 689ae8c5b..a6c3e56d5 100644 --- a/src/common/cd_image_cue.cpp +++ b/src/common/cd_image_cue.cpp @@ -158,7 +158,7 @@ bool CDImageCueSheet::OpenAndParse(const char* filename) // add the track itself m_tracks.push_back(Track{static_cast(track_num), disc_lba, static_cast(m_indices.size()), - static_cast(track_length), mode, control}); + static_cast(track_length + pregap_frames), mode, control}); // how many indices in this track? Index last_index;