2009-07-29 Joe Auricchio <jauricchio@gmail.com>
* term/gfxterm.c (clear_char): New function. (grub_virtual_screen_setup): Use clear_char. (scroll_up): Likewise. (grub_virtual_screen_cls): Likewise.
This commit is contained in:
parent
67bb323a1c
commit
56c5a47f43
2 changed files with 21 additions and 22 deletions
|
@ -1,3 +1,10 @@
|
|||
2009-07-29 Joe Auricchio <jauricchio@gmail.com>
|
||||
|
||||
* term/gfxterm.c (clear_char): New function.
|
||||
(grub_virtual_screen_setup): Use clear_char.
|
||||
(scroll_up): Likewise.
|
||||
(grub_virtual_screen_cls): Likewise.
|
||||
|
||||
2009-07-29 Felix Zielcke <fzielcke@z-51.de>
|
||||
|
||||
* util/deviceiter.c (get_acceleraid_disk_name): New static
|
||||
|
|
|
@ -150,6 +150,16 @@ set_term_color (grub_uint8_t term_color)
|
|||
grub_video_set_active_render_target (old_target);
|
||||
}
|
||||
|
||||
static void
|
||||
clear_char (struct grub_colored_char *c)
|
||||
{
|
||||
c->code = ' ';
|
||||
c->fg_color = virtual_screen.fg_color;
|
||||
c->bg_color = virtual_screen.bg_color;
|
||||
c->width = 0;
|
||||
c->index = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
grub_virtual_screen_free (void)
|
||||
{
|
||||
|
@ -228,14 +238,8 @@ grub_virtual_screen_setup (unsigned int x, unsigned int y,
|
|||
grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY);
|
||||
|
||||
/* Clear out text buffer. */
|
||||
for(i = 0; i < virtual_screen.columns * virtual_screen.rows; i++)
|
||||
{
|
||||
virtual_screen.text_buffer[i].code = ' ';
|
||||
virtual_screen.text_buffer[i].fg_color = virtual_screen.fg_color;
|
||||
virtual_screen.text_buffer[i].bg_color = virtual_screen.bg_color;
|
||||
virtual_screen.text_buffer[i].width = 0;
|
||||
virtual_screen.text_buffer[i].index = 0;
|
||||
}
|
||||
for (i = 0; i < virtual_screen.columns * virtual_screen.rows; i++)
|
||||
clear_char (&(virtual_screen.text_buffer[i]));
|
||||
|
||||
return grub_errno;
|
||||
}
|
||||
|
@ -580,13 +584,7 @@ scroll_up (void)
|
|||
for (i = virtual_screen.columns * (virtual_screen.rows - 1);
|
||||
i < virtual_screen.columns * virtual_screen.rows;
|
||||
i++)
|
||||
{
|
||||
virtual_screen.text_buffer[i].code = ' ';
|
||||
virtual_screen.text_buffer[i].fg_color = virtual_screen.fg_color;
|
||||
virtual_screen.text_buffer[i].bg_color = virtual_screen.bg_color;
|
||||
virtual_screen.text_buffer[i].width = 0;
|
||||
virtual_screen.text_buffer[i].index = 0;
|
||||
}
|
||||
clear_char (&(virtual_screen.text_buffer[i]));
|
||||
|
||||
/* Scroll physical screen. */
|
||||
grub_video_set_active_render_target (text_layer);
|
||||
|
@ -800,13 +798,7 @@ grub_virtual_screen_cls (void)
|
|||
grub_uint32_t i;
|
||||
|
||||
for (i = 0; i < virtual_screen.columns * virtual_screen.rows; i++)
|
||||
{
|
||||
virtual_screen.text_buffer[i].code = ' ';
|
||||
virtual_screen.text_buffer[i].fg_color = virtual_screen.fg_color;
|
||||
virtual_screen.text_buffer[i].bg_color = virtual_screen.bg_color;
|
||||
virtual_screen.text_buffer[i].width = 0;
|
||||
virtual_screen.text_buffer[i].index = 0;
|
||||
}
|
||||
clear_char (&(virtual_screen.text_buffer[i]));
|
||||
|
||||
virtual_screen.cursor_x = virtual_screen.cursor_y = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue