Reset CD data tracks after sector size change

The track calculation is based on sector size and must be reset after
change of sector size.

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
This commit is contained in:
Klaus Kämpf 2024-01-06 22:02:50 +01:00
parent e8437d1f18
commit 2d86000329
1 changed files with 2 additions and 0 deletions

View File

@ -176,6 +176,8 @@ void SCSICD::ModeSelect(scsi_command cmd, cdb_t cdb, span<const uint8_t> buf, in
if (wanted_sector_size != sector_size) {
LogDebug("Changing sector size from " + to_string(sector_size) + " to " + to_string(wanted_sector_size));
SetSectorSizeInBytes(wanted_sector_size);
ClearTrack();
CreateDataTrack();
}
if (const string result = scsi_command_util::ModeSelect(cmd, cdb, buf, length, sector_size);