2009-07-20 Joe Auricchio <jauricchio@gmail.com>

* term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
This commit is contained in:
phcoder 2009-07-20 16:46:36 +00:00
parent e98cd0c2fb
commit 04c7c42969
2 changed files with 16 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2009-07-20 Joe Auricchio <jauricchio@gmail.com>
* term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
2009-07-20 Pavel Roskin <proski@gnu.org>
* configure.ac: Trim excessively wordy excuses.

View file

@ -170,6 +170,8 @@ grub_virtual_screen_setup (unsigned int x, unsigned int y,
unsigned int width, unsigned int height,
const char *font_name)
{
unsigned int i;
/* Free old virtual screen. */
grub_virtual_screen_free ();
@ -225,6 +227,16 @@ 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;
}
return grub_errno;
}