diff options
author | jkim <jkim@FreeBSD.org> | 2010-09-17 23:09:31 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-09-17 23:09:31 +0000 |
commit | 3dccf2021e2e0cbda8f4e13b2173ee0e4db49bff (patch) | |
tree | d2617a2df375395ec45b590ca5cbf0c17ce446a0 /sys/dev/syscons | |
parent | e5db2f99cc740c8d3705d49f5b6eee2aedbf2d47 (diff) | |
download | FreeBSD-src-3dccf2021e2e0cbda8f4e13b2173ee0e4db49bff.zip FreeBSD-src-3dccf2021e2e0cbda8f4e13b2173ee0e4db49bff.tar.gz |
Rework r210248. Although it fixed most of problems, it did not fix one
particular edge case where X-axis resolution is not multiple of font width.
Now we just advance enough scan lines, then deduct a partial scan line.
It is more intuitive than the previous code. Apply the same wisdom to EGA
and VGA planar renderers for consistency.
Reported by: David DEMELIER (demelier dot david at gmail dot com)
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r-- | sys/dev/syscons/scvgarndr.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c index 355d436..6e6663c 100644 --- a/sys/dev/syscons/scvgarndr.c +++ b/sys/dev/syscons/scvgarndr.c @@ -716,8 +716,7 @@ vga_egadraw(scr_stat *scp, int from, int count, int flip) } ++d; if ((i % scp->xsize) == scp->xsize - 1) - d += scp->xoff*2 - + (scp->font_size - 1)*line_width; + d += scp->font_size * line_width - scp->xsize; } outw(GDCIDX, 0x0000); /* set/reset */ outw(GDCIDX, 0x0001); /* set/reset enable */ @@ -769,9 +768,8 @@ vga_vgadraw_direct(scr_stat *scp, int from, int count, int flip) d += 8 * pixel_size; if ((i % scp->xsize) == scp->xsize - 1) - d += scp->xoff * scp->font_size * pixel_size + - scp->font_size * line_width - - scp->xpixel * pixel_size; + d += scp->font_size * line_width - + scp->xsize * 8 * pixel_size; } } @@ -827,8 +825,7 @@ vga_vgadraw_planar(scr_stat *scp, int from, int count, int flip) } ++d; if ((i % scp->xsize) == scp->xsize - 1) - d += scp->xoff*2 - + (scp->font_size - 1)*line_width; + d += scp->font_size * line_width - scp->xsize; } outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */ outw(GDCIDX, 0x0000); /* set/reset */ |