Initial effort for gfxmenu on multiterm branch

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2009-12-26 01:49:57 +01:00
commit bee140683a
68 changed files with 5067 additions and 2577 deletions

View file

@ -33,6 +33,7 @@
#include <grub/video_fb.h>
#include <grub/command.h>
#include <grub/i386/pc/vbe.h>
#include <grub/i386/pc/console.h>
#define GRUB_LINUX_CL_OFFSET 0x1000
#define GRUB_LINUX_CL_END_OFFSET 0x2000
@ -547,8 +548,30 @@ grub_linux_boot (void)
/* Initialize these last, because terminal position could be affected by printfs above. */
if (params->have_vga == GRUB_VIDEO_TYPE_TEXT)
{
params->video_cursor_x = grub_getxy () >> 8;
params->video_cursor_y = grub_getxy () & 0xff;
grub_term_output_t term;
int found = 0;
FOR_ACTIVE_TERM_OUTPUTS(term)
if (grub_strcmp (term->name, "vga_text") == 0)
{
grub_uint16_t pos = grub_term_getxy (term);
params->video_cursor_x = pos >> 8;
params->video_cursor_y = pos & 0xff;
found = 1;
}
if (!found)
FOR_ACTIVE_TERM_OUTPUTS(term)
if (grub_strcmp (term->name, "console") == 0)
{
grub_uint16_t pos = grub_term_getxy (term);
params->video_cursor_x = pos >> 8;
params->video_cursor_y = pos & 0xff;
found = 1;
}
if (!found)
{
params->video_cursor_x = 0;
params->video_cursor_y = 0;
}
}
#ifdef __x86_64__