summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorKazutaka YOKOTA <yokota@FreeBSD.org>2000-02-01 13:22:13 +0000
committerKazutaka YOKOTA <yokota@FreeBSD.org>2000-02-01 13:22:13 +0000
commitf2f0434d26bb5ba6add3a15fb80ff5f743889bb9 (patch)
treed89535063700dac3c4f341fca86430e2368bab4a /sys/dev
parentd7ff7cbec831c3b1bfec3871bf926f90b32cfdcd (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/syscons/scvidctl.c4
-rw-r--r--sys/dev/syscons/syscons.c11
-rw-r--r--sys/dev/syscons/syscons.h1
3 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/syscons/scvidctl.c b/sys/dev/syscons/scvidctl.c
index 88b2e0170b9a..731a1b81b2fd 100644
--- a/sys/dev/syscons/scvidctl.c
+++ b/sys/dev/syscons/scvidctl.c
@@ -190,7 +190,7 @@ sc_set_graphics_mode(scr_stat *scp, struct tty *tp, int mode)
* Don't change xsize and ysize; preserve the previous vty
* and history buffers.
*/
- scp->font_size = FONT_NONE;
+ scp->font_size = 0;
/* move the mouse cursor at the center of the screen */
sc_move_mouse(scp, scp->xpixel / 2, scp->ypixel / 2);
splx(s);
@@ -232,7 +232,7 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, int xsize, int ysize,
#endif
/* adjust argument values */
- if ((fontsize <= 0) || (fontsize == FONT_NONE))
+ if (fontsize <= 0)
fontsize = info.vi_cheight;
if (fontsize < 14) {
fontsize = 8;
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 08657ba366d8..66d07037cab0 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -1301,7 +1301,7 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
remove_mouse_image(cur_console);
if (ISTEXTSC(cur_console) &&
- (cur_console->font_size != FONT_NONE)) {
+ (cur_console->font_size != 0)) {
if (scp->font_size < 14) {
if (fonts_loaded & FONT_8)
font = font_8;
@@ -3681,7 +3681,7 @@ init_scp(scr_stat *scp)
scp->ypixel = info.vi_height;
scp->xsize = info.vi_width/8;
scp->ysize = info.vi_height/info.vi_cheight;
- scp->font_size = FONT_NONE;
+ scp->font_size = 0;
} else {
scp->xsize = info.vi_width;
scp->ysize = info.vi_height;
@@ -4302,8 +4302,11 @@ sc_move_mouse(scr_stat *scp, int x, int y)
{
scp->mouse_xpos = x;
scp->mouse_ypos = y;
- scp->mouse_pos = scp->mouse_oldpos =
- scp->scr_buf + (y / scp->font_size) * scp->xsize + x / 8;
+ if (!ISTEXTSC(scp))
+ scp->mouse_pos = scp->mouse_oldpos = scp->scr_buf;
+ else
+ scp->mouse_pos = scp->mouse_oldpos =
+ scp->scr_buf + (y / scp->font_size) * scp->xsize + x / 8;
}
static void
diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h
index 9b83e2742c6f..86c21db7cf4c 100644
--- a/sys/dev/syscons/syscons.h
+++ b/sys/dev/syscons/syscons.h
@@ -100,7 +100,6 @@
#define BELL_PITCH 800
#define CONSOLE_BUFSIZE 1024
#define PCBURST 128
-#define FONT_NONE 1
#define FONT_8 2
#define FONT_14 4
#define FONT_16 8