Skip to content

Commit 23791a5

Browse files
committed
Fix verbose printfs when m_status_output = false
Regression since HDR merge; m_status_output = false should result in no prints outside of error cases.
1 parent 6775d33 commit 23791a5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

encoder/basisu_comp.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ namespace basisu
374374
if (m_params.m_hdr)
375375
{
376376
// UASTC HDR
377-
printf("Mode: UASTC HDR Level %u\n", m_params.m_uastc_hdr_options.m_level);
377+
if (m_params.m_status_output)
378+
printf("Mode: UASTC HDR Level %u\n", m_params.m_uastc_hdr_options.m_level);
378379

379380
error_code ec = encode_slices_to_uastc_hdr();
380381
if (ec != cECSuccess)
@@ -383,7 +384,8 @@ namespace basisu
383384
else if (m_params.m_uastc)
384385
{
385386
// UASTC
386-
printf("Mode: UASTC LDR Level %u\n", m_params.m_pack_uastc_flags & cPackUASTCLevelMask);
387+
if (m_params.m_status_output)
388+
printf("Mode: UASTC LDR Level %u\n", m_params.m_pack_uastc_flags & cPackUASTCLevelMask);
387389

388390
error_code ec = encode_slices_to_uastc();
389391
if (ec != cECSuccess)
@@ -392,7 +394,8 @@ namespace basisu
392394
else
393395
{
394396
// ETC1S
395-
printf("Mode: ETC1S Quality %i, Level %i\n", m_params.m_quality_level, (int)m_params.m_compression_level);
397+
if (m_params.m_status_output)
398+
printf("Mode: ETC1S Quality %i, Level %i\n", m_params.m_quality_level, (int)m_params.m_compression_level);
396399

397400
if (!process_frontend())
398401
return cECFailedFrontEnd;
@@ -2560,7 +2563,7 @@ namespace basisu
25602563
return false;
25612564
}
25622565

2563-
//if (m_params.m_status_output)
2566+
if (m_params.m_status_output)
25642567
{
25652568
printf("Wrote output .basis/.ktx2 file \"%s\"\n", output_filename.c_str());
25662569
}

0 commit comments

Comments
 (0)