[SeaBIOS] [PATCH] vgabios: Support emulated text in gfx_read_char()

Paolo Bonzini pbonzini at redhat.com
Tue Jan 6 20:59:09 CET 2015



On 06/01/2015 16:49, Kevin O'Connor wrote:
> +    if (vga_emulate_text()) {
> +        // Read bottom right pixel of the cell to guess bg color
> +        op.y += cheight-1;
> +        handle_gfx_op(&op);
> +        op.y -= cheight-1;
> +        bgattr = op.pixels[7];
> +        fgattr = bgattr ^ 0x7;
> +        car = 1;
> +    }

It's better to use the top right pixel.  The bottom right has a false
positive for characters 23 and 95.

Paolo



More information about the SeaBIOS mailing list