mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Simplify the code a bit. No functional change.
This commit is contained in:
parent
0e37dd1fee
commit
a0f9777dc4
1 changed files with 8 additions and 9 deletions
|
|
@ -1150,29 +1150,28 @@ vt_mark_mouse_position_as_dirty(struct vt_device *vd)
|
|||
#endif
|
||||
|
||||
static void
|
||||
vt_set_border(struct vt_window *vw, term_color_t c)
|
||||
vt_set_border(struct vt_device *vd, term_color_t c)
|
||||
{
|
||||
struct vt_device *vd = vw->vw_device;
|
||||
term_rect_t *vda = &vw->vw_draw_area;
|
||||
term_rect_t *tarea = &vd->vd_curwindow->vw_draw_area;
|
||||
int x, y;
|
||||
|
||||
/* Top bar. */
|
||||
for (y = 0; y < vda->tr_begin.tp_row; y++)
|
||||
for (y = 0; y < tarea->tr_begin.tp_row; y++)
|
||||
for (x = 0; x < vd->vd_width; x++)
|
||||
vd->vd_driver->vd_setpixel(vd, x, y, c);
|
||||
|
||||
for (y = vda->tr_begin.tp_row; y < vda->tr_end.tp_row; y++) {
|
||||
for (y = tarea->tr_begin.tp_row; y < tarea->tr_end.tp_row; y++) {
|
||||
/* Left bar. */
|
||||
for (x = 0; x < vda->tr_begin.tp_col; x++)
|
||||
for (x = 0; x < tarea->tr_begin.tp_col; x++)
|
||||
vd->vd_driver->vd_setpixel(vd, x, y, c);
|
||||
|
||||
/* Right bar. */
|
||||
for (x = vda->tr_end.tp_col; x < vd->vd_width; x++)
|
||||
for (x = tarea->tr_end.tp_col; x < vd->vd_width; x++)
|
||||
vd->vd_driver->vd_setpixel(vd, x, y, c);
|
||||
}
|
||||
|
||||
/* Bottom bar. */
|
||||
for (y = vda->tr_end.tp_row; y < vd->vd_height; y++)
|
||||
for (y = tarea->tr_end.tp_row; y < vd->vd_height; y++)
|
||||
for (x = 0; x < vd->vd_width; x++)
|
||||
vd->vd_driver->vd_setpixel(vd, x, y, c);
|
||||
}
|
||||
|
|
@ -1242,7 +1241,7 @@ vt_flush(struct vt_device *vd)
|
|||
if (vd->vd_flags & VDF_INVALID) {
|
||||
vd->vd_flags &= ~VDF_INVALID;
|
||||
|
||||
vt_set_border(vw, TC_BLACK);
|
||||
vt_set_border(vd, TC_BLACK);
|
||||
vt_termrect(vd, vf, &tarea);
|
||||
if (vt_draw_logo_cpus)
|
||||
vtterm_draw_cpu_logos(vd);
|
||||
|
|
|
|||
Loading…
Reference in a new issue