1
0
Fork 0

Curtail an excessively noisy DEBUG output case

Some games repeatedly query for the first track's position during
playback, perhaps as a dual-purpose "CDROM health/heart-beat"
check.

This excessive console output in DEBUG mode tends to add far more
noise than signal, and prevents the maintainer from seeing the
overall flow of the CDROM calls.
This commit is contained in:
krcroft 2020-02-29 13:20:59 -08:00 committed by Patryk Obara
parent 818e923296
commit 1e65bb2cdc

View file

@ -854,11 +854,9 @@ track_iter CDROM_Interface_Image::GetTrack(const uint32_t sector)
}
++track;
lower_bound = upper_bound;
} // If we made it here without breaking, then the track
// wasn't found and the iterator is now the end() item.
}
#ifdef DEBUG
if (track != tracks.end()) {
if (track != tracks.end() && track->number != 1) {
if (sector < track->start) {
LOG_MSG("CDROM: GetTrack at sector %d => in the pregap of "
"track %d [pregap %d, start %d, end %d]",
@ -874,11 +872,6 @@ track_iter CDROM_Interface_Image::GetTrack(const uint32_t sector)
track->start,
track->start + track->length);
}
} else if (track == tracks.end()) {
LOG_MSG("CDROM: GetTrack at sector %d => fell outside "
"the bounds of our %u tracks",
sector,
static_cast<unsigned int>(tracks.size()));
}
#endif
return track;