diff options
author | 987123879113 <63495610+987123879113@users.noreply.github.com> | 2022-08-16 11:35:13 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-15 22:35:13 -0400 |
commit | f1f77b1a1c4d99d78d0715a1e36ec9ab8e2c8f7d (patch) | |
tree | 74a154eb57dea12468159497f436fbe829b6b620 /src/lib | |
parent | 93564468511c813b2f3c416a6ca104c591f6caf5 (diff) |
cdrom: Pass phys flag to read_partial_sector in read_subcode (#10231)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/util/cdrom.cpp | 5 | ||||
-rw-r--r-- | src/lib/util/cdrom.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/util/cdrom.cpp b/src/lib/util/cdrom.cpp index 0162dc87c0d..2771e0f5478 100644 --- a/src/lib/util/cdrom.cpp +++ b/src/lib/util/cdrom.cpp @@ -360,7 +360,7 @@ cdrom_file::~cdrom_file() ***************************************************************************/ /** - * @fn std::error_condition read_partial_sector(void *dest, uint32_t lbasector, uint32_t chdsector, uint32_t tracknum, uint32_t startoffs, uint32_t length) + * @fn std::error_condition read_partial_sector(void *dest, uint32_t lbasector, uint32_t chdsector, uint32_t tracknum, uint32_t startoffs, uint32_t length, bool phys) * * @brief Reads partial sector. * @@ -370,6 +370,7 @@ cdrom_file::~cdrom_file() * @param tracknum The tracknum. * @param startoffs The startoffs. * @param length The length. + * @param phys true to physical. * * @return The partial sector. */ @@ -570,7 +571,7 @@ bool cdrom_file::read_subcode(uint32_t lbasector, void *buffer, bool phys) return false; // read the data - std::error_condition err = read_partial_sector(buffer, lbasector, chdsector, tracknum, cdtoc.tracks[tracknum].datasize, cdtoc.tracks[tracknum].subsize); + std::error_condition err = read_partial_sector(buffer, lbasector, chdsector, tracknum, cdtoc.tracks[tracknum].datasize, cdtoc.tracks[tracknum].subsize, phys); return !err; } diff --git a/src/lib/util/cdrom.h b/src/lib/util/cdrom.h index 8e911e92e91..ed293429f21 100644 --- a/src/lib/util/cdrom.h +++ b/src/lib/util/cdrom.h @@ -249,7 +249,7 @@ private: static void get_info_from_type_string(const char *typestring, uint32_t *trktype, uint32_t *datasize); static uint8_t ecc_source_byte(const uint8_t *sector, uint32_t offset); static void ecc_compute_bytes(const uint8_t *sector, const uint16_t *row, int rowlen, uint8_t &val1, uint8_t &val2); - std::error_condition read_partial_sector(void *dest, uint32_t lbasector, uint32_t chdsector, uint32_t tracknum, uint32_t startoffs, uint32_t length, bool phys=false); + std::error_condition read_partial_sector(void *dest, uint32_t lbasector, uint32_t chdsector, uint32_t tracknum, uint32_t startoffs, uint32_t length, bool phys); static std::string get_file_path(std::string &path); static uint64_t get_file_size(std::string_view filename); |