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
|
||||
|
|
|
@ -1399,6 +1399,9 @@ 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;
|
||||
|
||||
/* 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);
|
||||
|
@ -1406,6 +1409,15 @@ grub_video_vbe_scroll (grub_video_color_t color, int dx, int dy)
|
|||
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