merge trunk
This commit is contained in:
commit
1eb44ae37e
301 changed files with 8465 additions and 1449 deletions
|
@ -26,6 +26,8 @@
|
|||
#include <grub/time.h>
|
||||
#include <grub/loader.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
static short at_keyboard_status = 0;
|
||||
static int e0_received = 0;
|
||||
static int f0_received = 0;
|
||||
|
@ -330,6 +332,11 @@ set_scancodes (void)
|
|||
return;
|
||||
}
|
||||
|
||||
#if !(defined (GRUB_MACHINE_MIPS_YEELOONG) || defined (GRUB_MACHINE_QEMU))
|
||||
current_set = 1;
|
||||
return;
|
||||
#endif
|
||||
|
||||
grub_keyboard_controller_write (grub_keyboard_controller_orig
|
||||
& ~KEYBOARD_AT_TRANSLATE);
|
||||
|
||||
|
@ -494,7 +501,7 @@ static int
|
|||
grub_keyboard_getkey (void)
|
||||
{
|
||||
int key;
|
||||
int is_break;
|
||||
int is_break = 0;
|
||||
|
||||
key = fetch_key (&is_break);
|
||||
if (key == -1)
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
#include <grub/bitmap_scale.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
#define DEFAULT_VIDEO_MODE "auto"
|
||||
#define DEFAULT_BORDER_WIDTH 10
|
||||
|
||||
|
@ -344,8 +346,6 @@ grub_gfxterm_fullscreen (void)
|
|||
grub_video_swap_buffers ();
|
||||
grub_video_fill_rect (color, 0, 0, mode_info.width, mode_info.height);
|
||||
}
|
||||
bitmap = 0;
|
||||
blend_text_bg = 0;
|
||||
|
||||
/* Select the font to use. */
|
||||
font_name = grub_env_get ("gfxterm_font");
|
||||
|
@ -394,13 +394,6 @@ grub_gfxterm_term_init (struct grub_term_output *term __attribute__ ((unused)))
|
|||
static void
|
||||
destroy_window (void)
|
||||
{
|
||||
if (bitmap)
|
||||
{
|
||||
grub_video_bitmap_destroy (bitmap);
|
||||
bitmap = 0;
|
||||
blend_text_bg = 0;
|
||||
}
|
||||
|
||||
repaint_callback = 0;
|
||||
grub_virtual_screen_free ();
|
||||
}
|
||||
|
@ -536,31 +529,8 @@ dirty_region_is_empty (void)
|
|||
}
|
||||
|
||||
static void
|
||||
dirty_region_add (int x, int y, unsigned int width, unsigned int height)
|
||||
dirty_region_add_real (int x, int y, unsigned int width, unsigned int height)
|
||||
{
|
||||
if ((width == 0) || (height == 0))
|
||||
return;
|
||||
|
||||
if (repaint_scheduled)
|
||||
{
|
||||
if (x > (int)virtual_screen.offset_x)
|
||||
{
|
||||
width += virtual_screen.offset_x - x;
|
||||
x = virtual_screen.offset_x;
|
||||
}
|
||||
if (y > (int)virtual_screen.offset_y)
|
||||
{
|
||||
height += virtual_screen.offset_y - y;
|
||||
y = virtual_screen.offset_y;
|
||||
}
|
||||
if (width < virtual_screen.width)
|
||||
width = virtual_screen.width;
|
||||
if (height < virtual_screen.height)
|
||||
height = virtual_screen.height;
|
||||
repaint_scheduled = 0;
|
||||
repaint_was_scheduled = 1;
|
||||
}
|
||||
|
||||
if (dirty_region_is_empty ())
|
||||
{
|
||||
dirty_region.top_left_x = x;
|
||||
|
@ -581,6 +551,22 @@ dirty_region_add (int x, int y, unsigned int width, unsigned int height)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dirty_region_add (int x, int y, unsigned int width, unsigned int height)
|
||||
{
|
||||
if ((width == 0) || (height == 0))
|
||||
return;
|
||||
|
||||
if (repaint_scheduled)
|
||||
{
|
||||
dirty_region_add_real (virtual_screen.offset_x, virtual_screen.offset_y,
|
||||
virtual_screen.width, virtual_screen.height);
|
||||
repaint_scheduled = 0;
|
||||
repaint_was_scheduled = 1;
|
||||
}
|
||||
dirty_region_add_real (x, y, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
dirty_region_add_virtualscreen (void)
|
||||
{
|
||||
|
@ -959,6 +945,8 @@ calculate_normal_character_width (grub_font_t font)
|
|||
if (glyph->device_width > width)
|
||||
width = glyph->device_width;
|
||||
}
|
||||
if (!width)
|
||||
return 8;
|
||||
|
||||
return width;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
#include <grub/types.h>
|
||||
#include <grub/vga.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
#define COLS 80
|
||||
#define ROWS 25
|
||||
|
||||
|
|
|
@ -170,6 +170,8 @@ grub_ofconsole_init_output (struct grub_term_output *term)
|
|||
|
||||
grub_ofconsole_dimensions ();
|
||||
|
||||
grub_terminfo_output_init (term);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include <grub/i18n.h>
|
||||
#include <grub/list.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
#define FOR_SERIAL_PORTS(var) FOR_LIST_ELEMENTS((var), (grub_serial_ports))
|
||||
|
||||
/* Argument options. */
|
||||
|
@ -41,7 +43,7 @@ static const struct grub_arg_option options[] =
|
|||
{0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
struct grub_serial_port *grub_serial_ports;
|
||||
static struct grub_serial_port *grub_serial_ports;
|
||||
|
||||
struct grub_serial_output_state
|
||||
{
|
||||
|
@ -69,7 +71,7 @@ serial_fetch (grub_term_input_t term)
|
|||
return data->port->driver->fetch (data->port);
|
||||
}
|
||||
|
||||
const struct grub_serial_input_state grub_serial_terminfo_input_template =
|
||||
static const struct grub_serial_input_state grub_serial_terminfo_input_template =
|
||||
{
|
||||
.tinfo =
|
||||
{
|
||||
|
@ -77,7 +79,7 @@ const struct grub_serial_input_state grub_serial_terminfo_input_template =
|
|||
}
|
||||
};
|
||||
|
||||
const struct grub_serial_output_state grub_serial_terminfo_output_template =
|
||||
static const struct grub_serial_output_state grub_serial_terminfo_output_template =
|
||||
{
|
||||
.tinfo =
|
||||
{
|
||||
|
@ -87,11 +89,11 @@ const struct grub_serial_output_state grub_serial_terminfo_output_template =
|
|||
}
|
||||
};
|
||||
|
||||
struct grub_serial_input_state grub_serial_terminfo_input;
|
||||
static struct grub_serial_input_state grub_serial_terminfo_input;
|
||||
|
||||
struct grub_serial_output_state grub_serial_terminfo_output;
|
||||
static struct grub_serial_output_state grub_serial_terminfo_output;
|
||||
|
||||
int registered = 0;
|
||||
static int registered = 0;
|
||||
|
||||
static struct grub_term_input grub_serial_term_input =
|
||||
{
|
||||
|
@ -104,6 +106,7 @@ static struct grub_term_input grub_serial_term_input =
|
|||
static struct grub_term_output grub_serial_term_output =
|
||||
{
|
||||
.name = "serial",
|
||||
.init = grub_terminfo_output_init,
|
||||
.putchar = grub_terminfo_putchar,
|
||||
.getwh = grub_terminfo_getwh,
|
||||
.getxy = grub_terminfo_getxy,
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
#include <grub/i18n.h>
|
||||
#include <grub/time.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
static struct grub_term_output *terminfo_outputs;
|
||||
|
||||
/* Get current terminfo name. */
|
||||
|
@ -403,6 +405,8 @@ grub_terminfo_readkey (struct grub_term_input *term, int *keys, int *len,
|
|||
/* Backspace: Ctrl-h. */
|
||||
if (c == 0x7f)
|
||||
c = '\b';
|
||||
if (c < 0x20 && c != '\t' && c!= '\b' && c != '\n' && c != '\r')
|
||||
c = GRUB_TERM_CTRL | (c - 1 + 'a');
|
||||
*len = 1;
|
||||
keys[0] = c;
|
||||
return;
|
||||
|
@ -512,6 +516,13 @@ grub_terminfo_input_init (struct grub_term_input *termi)
|
|||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_terminfo_output_init (struct grub_term_output *term)
|
||||
{
|
||||
grub_terminfo_cls (term);
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
/* GRUB Command. */
|
||||
|
||||
static grub_err_t
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include <grub/time.h>
|
||||
#include <grub/keyboard_layouts.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
|
||||
|
||||
enum
|
||||
|
@ -435,7 +437,7 @@ grub_usb_keyboard_getkeystatus (struct grub_term_input *term)
|
|||
return interpret_status (termdata->status) | termdata->mods;
|
||||
}
|
||||
|
||||
struct grub_usb_attach_desc attach_hook =
|
||||
static struct grub_usb_attach_desc attach_hook =
|
||||
{
|
||||
.class = GRUB_USB_CLASS_HID,
|
||||
.hook = grub_usb_keyboard_attach
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue