weston-info: Handle shm formats better

Use a switch for this and don't fall back to XRGB8888 if we don't
recognize the format.
dev
Kristian Høgsberg 11 years ago
parent 399841dae7
commit 8b66ebd3fa
  1. 16
      clients/weston-info.c

@ -234,8 +234,20 @@ print_shm_info(void *data)
printf("\tformats:"); printf("\tformats:");
wl_list_for_each(format, &shm->formats, link) wl_list_for_each(format, &shm->formats, link)
printf(" %s", (format->format == WL_SHM_FORMAT_ARGB8888) ? switch (format->format) {
"ARGB8888" : "XRGB8888"); case WL_SHM_FORMAT_ARGB8888:
printf(" ARGB8888");
break;
case WL_SHM_FORMAT_XRGB8888:
printf(" XRGB8888");
break;
case WL_SHM_FORMAT_RGB565:
printf(" RGB565");
break;
default:
printf(" unknown(%08x)", format->format);
break;
}
printf("\n"); printf("\n");
} }

Loading…
Cancel
Save