mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-09 05:58:27 +02:00
make the new frame buffer area cropping function actually work
This commit is contained in:
parent
beabf9e53c
commit
d85e9b08e0
2 changed files with 13 additions and 3 deletions
|
|
@ -562,9 +562,19 @@ ply_frame_buffer_area_crop (ply_frame_buffer_area_t *area,
|
|||
ply_frame_buffer_area_t *mask_area,
|
||||
ply_frame_buffer_area_t *cropped_area)
|
||||
{
|
||||
*cropped_area = *area;
|
||||
if (cropped_area->x <= mask_area->x)
|
||||
{
|
||||
cropped_area->x = mask_area->x;
|
||||
cropped_area->width -= mask_area->x - cropped_area->x;
|
||||
}
|
||||
|
||||
if (cropped_area->y <= mask_area->y)
|
||||
{
|
||||
cropped_area->y = mask_area->y;
|
||||
cropped_area->height -= mask_area->y - cropped_area->y;
|
||||
}
|
||||
|
||||
cropped_area->x = MAX (area->x, mask_area->x);
|
||||
cropped_area->y = MAX (area->y, mask_area->y);
|
||||
cropped_area->width = MIN (area->width, mask_area->width);
|
||||
cropped_area->height = MIN (area->height, mask_area->height);
|
||||
|
||||
|
|
|
|||
|
|
@ -154,8 +154,8 @@ static bool
|
|||
set_graphics_mode (ply_boot_splash_plugin_t *plugin)
|
||||
{
|
||||
assert (plugin != NULL);
|
||||
return true;
|
||||
|
||||
return true;
|
||||
if (ioctl (plugin->console_fd, KDSETMODE, KD_GRAPHICS) < 0)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue