2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
Base on patch on bug #24154 created by Tomas Tintera <trosos@seznam.cz>. * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
This commit is contained in:
parent
a69ef770ff
commit
825a182b6a
2 changed files with 28 additions and 9 deletions
|
@ -1,3 +1,10 @@
|
|||
2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
|
||||
|
||||
Base on patch on bug #24154 created by Tomas Tintera
|
||||
<trosos@seznam.cz>.
|
||||
|
||||
* video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
|
||||
|
||||
2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
|
||||
|
||||
Based on patch on bug #25318 created by Bernhard Rosenkraenzer
|
||||
|
|
|
@ -709,7 +709,7 @@ grub_video_vbe_map_rgb (grub_uint8_t red, grub_uint8_t green,
|
|||
|
||||
return minindex;
|
||||
}
|
||||
else if ((render_target->mode_info.mode_type
|
||||
else if ((render_target->mode_info.mode_type
|
||||
& GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP) != 0)
|
||||
{
|
||||
if (red == render_target->mode_info.fg_red
|
||||
|
@ -749,7 +749,7 @@ grub_video_vbe_map_rgba (grub_uint8_t red, grub_uint8_t green,
|
|||
/* No alpha available in index color modes, just use
|
||||
same value as in only RGB modes. */
|
||||
return grub_video_vbe_map_rgb (red, green, blue);
|
||||
else if ((render_target->mode_info.mode_type
|
||||
else if ((render_target->mode_info.mode_type
|
||||
& GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP) != 0)
|
||||
{
|
||||
if (red == render_target->mode_info.fg_red
|
||||
|
@ -1399,13 +1399,25 @@ grub_video_vbe_scroll (grub_video_color_t color, int dx, int dy)
|
|||
target.mode_info = &render_target->mode_info;
|
||||
target.data = render_target->data;
|
||||
|
||||
for (j = 0; j < height; j++)
|
||||
{
|
||||
dst = grub_video_vbe_get_video_ptr (&target, dst_x, dst_y + j);
|
||||
src = grub_video_vbe_get_video_ptr (&target, src_x, src_y + j);
|
||||
grub_memmove (dst, src,
|
||||
width * target.mode_info->bytes_per_pixel);
|
||||
}
|
||||
/* Check vertical direction of the move. */
|
||||
if (dy <= 0)
|
||||
/* 3a. Move data upwards. */
|
||||
for (j = 0; j < height; j++)
|
||||
{
|
||||
dst = grub_video_vbe_get_video_ptr (&target, dst_x, dst_y + j);
|
||||
src = grub_video_vbe_get_video_ptr (&target, src_x, src_y + j);
|
||||
grub_memmove (dst, src,
|
||||
width * target.mode_info->bytes_per_pixel);
|
||||
}
|
||||
else
|
||||
/* 3b. Move data downwards. */
|
||||
for (j = (height - 1); j >= 0; j--)
|
||||
{
|
||||
dst = grub_video_vbe_get_video_ptr (&target, dst_x, dst_y + j);
|
||||
src = grub_video_vbe_get_video_ptr (&target, src_x, src_y + j);
|
||||
grub_memmove (dst, src,
|
||||
width * target.mode_info->bytes_per_pixel);
|
||||
}
|
||||
}
|
||||
|
||||
/* 4. Fill empty space with specified color. In this implementation
|
||||
|
|
Loading…
Reference in a new issue