make the new frame buffer area cropping function actually work

This commit is contained in:
Ray Strode 2007-06-08 08:58:11 -04:00
parent beabf9e53c
commit d85e9b08e0
2 changed files with 13 additions and 3 deletions

View file

@ -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);

View file

@ -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;