[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] vga: Don't switch to 1 x 1 character text scree
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH] vga: Don't switch to 1 x 1 character text screen |
Date: |
Tue, 1 May 2012 11:48:19 +0000 |
Thanks, applied.
On Sat, Apr 28, 2012 at 19:16, Stefan Weil <address@hidden> wrote:
> Initially, vga_get_text_resolution returns a text resolution of 1 x 1
> (vga register values are 0).
>
> This is visible during MIPS Malta boot with SDL. It also occurs with the
> i386 or x86_64 system emulation when it runs in single step mode:
>
> QEMU changes the size of the SDL window to the smallest possible value
> which is supported by the window manager. As this is not the calculated
> size, QEMU switches to scaled mode. When the BIOS or the VGA driver sets
> the normal text resolution, the window stays small and displays
> microscopic characters.
>
> Ignoring text resolutions of 1 x 1 or less avoids these problems.
> A similar workaround already exists for too large resolutions.
>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
> hw/vga.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/hw/vga.c b/hw/vga.c
> index f80860c..5824f85 100644
> --- a/hw/vga.c
> +++ b/hw/vga.c
> @@ -1327,6 +1327,10 @@ static void vga_draw_text(VGACommonState *s, int
> full_update)
> line_offset = s->line_offset;
>
> vga_get_text_resolution(s, &width, &height, &cw, &cheight);
> + if ((height * width) <= 1) {
> + /* better than nothing: exit if transient size is too small */
> + return;
> + }
> if ((height * width) > CH_ATTR_SIZE) {
> /* better than nothing: exit if transient size is too big */
> return;
> --
> 1.7.9
>
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH] vga: Don't switch to 1 x 1 character text screen,
Blue Swirl <=