frontend: Properly print available color formats

These should be the short names used in parsing, not the full text
of what they represent.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2026-04-14 15:42:18 -05:00
parent 978052f9ed
commit 36e95611ec

View file

@ -2420,16 +2420,15 @@ wet_output_set_color_format(struct weston_output *output,
entry = weston_enum_map_find_name(color_formats, str);
if (!entry) {
char *mask_to_str = NULL;
unsigned int i;
weston_log("Error in config for output '%s': '%s' is not a "
"valid color format. Try one of: ",
output->name, str);
mask_to_str = bits_to_str(WESTON_COLOR_FORMAT_ALL_MASK,
weston_color_format_to_str);
weston_log_continue("%s\n", mask_to_str);
free(mask_to_str);
for (i = 0; i < ARRAY_LENGTH(color_formats); i++)
weston_log_continue(" %s", color_formats[i].name);
weston_log_continue("\n");
free(str);
return -1;
}