diff options
| author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-26 15:03:15 +0000 |
|---|---|---|
| committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-26 15:03:15 +0000 |
| commit | 057b4402bf634907fd03590e2757e09e975d04c7 (patch) | |
| tree | df1bb710ebf946f1a7c1b38464ef836fddfee71c /sys/dev/vt/hw | |
| parent | 768f89e0788ab1ab7ea5df9d57082f53567007ec (diff) | |
Notes
Diffstat (limited to 'sys/dev/vt/hw')
| -rw-r--r-- | sys/dev/vt/hw/vga/vt_vga.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/vt/hw/vga/vt_vga.c b/sys/dev/vt/hw/vga/vt_vga.c index 62c9bf3e176b7..e81dcba7663a2 100644 --- a/sys/dev/vt/hw/vga/vt_vga.c +++ b/sys/dev/vt/hw/vga/vt_vga.c @@ -815,9 +815,8 @@ vga_bitblt_text_gfxmode(struct vt_device *vd, const struct vt_window *vw, col = area->tr_end.tp_col; row = area->tr_end.tp_row; - x2 = (int)((col * vf->vf_width + vw->vw_draw_area.tr_begin.tp_col - + VT_VGA_PIXELS_BLOCK - 1) - / VT_VGA_PIXELS_BLOCK) + x2 = (int)howmany(col * vf->vf_width + vw->vw_draw_area.tr_begin.tp_col, + VT_VGA_PIXELS_BLOCK) * VT_VGA_PIXELS_BLOCK; y2 = row * vf->vf_height + vw->vw_draw_area.tr_begin.tp_row; @@ -916,8 +915,7 @@ vga_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, x1 = x / VT_VGA_PIXELS_BLOCK * VT_VGA_PIXELS_BLOCK; y1 = y; - x2 = (x + width + VT_VGA_PIXELS_BLOCK - 1) / - VT_VGA_PIXELS_BLOCK * VT_VGA_PIXELS_BLOCK; + x2 = roundup(x + width, VT_VGA_PIXELS_BLOCK); y2 = y + height; x2 = min(x2, vd->vd_width - 1); y2 = min(y2, vd->vd_height - 1); |
