Skip to content

Commit

Permalink
shaders/icc: don't spam logs if there is no lcms support
Browse files Browse the repository at this point in the history
pl_icc_update needs to be called every frame, so if libplacebo is
compiled without lcms support, this leads to spam. There's no need to
warn more than once so just keep track of it in a bool.
  • Loading branch information
Dudemanguy committed Nov 6, 2023
1 parent 716811a commit c59d487
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/shaders/icc.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,11 @@ bool pl_icc_update(pl_log log, pl_icc_object *obj,
const struct pl_icc_profile *profile,
const struct pl_icc_params *params)
{
pl_err(log, "libplacebo compiled without LittleCMS 2 support!");
static bool warned;
if (!warned) {
pl_err(log, "libplacebo compiled without LittleCMS 2 support!");
warned = true;
}
*obj = NULL;
return false;
}
Expand Down

0 comments on commit c59d487

Please sign in to comment.