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.
This commit is contained in:
parent
399841dae7
commit
8b66ebd3fa
@ -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…
Reference in New Issue
Block a user