From 94d8efb8750730cc9e2647b34a99b54e6df5ba65 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Sat, 5 Jun 2021 22:25:30 -0700 Subject: [PATCH] Disable read/wrote output when status output is off This was the only output that was being printed when m_status_output is false; since this defaults to true in command-line builds this doesn't affect them. --- encoder/basisu_comp.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/encoder/basisu_comp.cpp b/encoder/basisu_comp.cpp index dc4ae11..10f96ce 100644 --- a/encoder/basisu_comp.cpp +++ b/encoder/basisu_comp.cpp @@ -467,7 +467,10 @@ namespace basisu return false; } - printf("Read source image \"%s\", %ux%u\n", pSource_filename, file_image.get_width(), file_image.get_height()); + if (m_params.m_status_output) + { + printf("Read source image \"%s\", %ux%u\n", pSource_filename, file_image.get_width(), file_image.get_height()); + } // Optionally load another image and put a grayscale version of it into the alpha channel. if ((source_file_index < m_params.m_source_alpha_filenames.size()) && (m_params.m_source_alpha_filenames[source_file_index].size())) @@ -1427,7 +1430,10 @@ namespace basisu return false; } - printf("Wrote output .basis/.ktx2 file \"%s\"\n", output_filename.c_str()); + if (m_params.m_status_output) + { + printf("Wrote output .basis/.ktx2 file \"%s\"\n", output_filename.c_str()); + } } size_t comp_size = 0;