mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 08:58:05 +02:00
Bail if framebuffer is in pseudocolor mode
This commit is contained in:
parent
5ac4dd13ae
commit
1d30484098
1 changed files with 13 additions and 0 deletions
|
|
@ -233,6 +233,19 @@ ply_frame_buffer_query_device (ply_frame_buffer_t *buffer)
|
|||
buffer->alpha_bit_position = variable_screen_info.transp.offset;
|
||||
buffer->bits_for_alpha = variable_screen_info.transp.length;
|
||||
|
||||
/* Normally the pixel is divided between the color components.
|
||||
* If we have less bits per pixel than bits per color component,
|
||||
* then we know we aren't using a direct color mapping. Instead
|
||||
* we must be using an indexed palette and a pseudocolor mode, which
|
||||
* we don't support.
|
||||
*/
|
||||
if (variable_screen_info.bits_per_pixel <
|
||||
buffer->bits_for_red + buffer->bits_for_green + buffer->bits_for_blue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (ioctl(buffer->device_fd, FBIOGET_FSCREENINFO, &fixed_screen_info) < 0)
|
||||
{
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue