From 1e65bb2cdcc73fbcfd0aa48ca37ee12a078480e2 Mon Sep 17 00:00:00 2001 From: krcroft Date: Sat, 29 Feb 2020 13:20:59 -0800 Subject: [PATCH] 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. --- src/dos/cdrom_image.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/dos/cdrom_image.cpp b/src/dos/cdrom_image.cpp index 220424a1..c3f4d5e5 100644 --- a/src/dos/cdrom_image.cpp +++ b/src/dos/cdrom_image.cpp @@ -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(tracks.size())); } #endif return track;