REtrieve position from right console in loader/i386/linux.c
This commit is contained in:
parent
6d305d4f7d
commit
288031b37c
1 changed files with 24 additions and 2 deletions
|
@ -548,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_console_getxy () >> 8;
|
||||
params->video_cursor_y = grub_console_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__
|
||||
|
|
Loading…
Reference in a new issue