From 3c0931ff87488e54ebdf687d14519d4cb6781b6d Mon Sep 17 00:00:00 2001 From: Kazutaka YOKOTA Date: Mon, 24 Jan 2000 13:44:39 +0000 Subject: [PATCH] Fix a bug exposed by the previous commit. Do not use scp->font_size, if the screen is in a graphics mode Reported by: Maxim Sobolev --- sys/dev/syscons/scmouse.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c index 961c00f51fe..f75df0de260 100644 --- a/sys/dev/syscons/scmouse.c +++ b/sys/dev/syscons/scmouse.c @@ -124,8 +124,11 @@ sc_mouse_move(scr_stat *scp, int x, int y) s = spltty(); scp->mouse_xpos = x; scp->mouse_ypos = y; - scp->mouse_pos = scp->mouse_oldpos = - (y/scp->font_size - scp->yoff)*scp->xsize + x/8 - scp->xoff; + if (ISGRAPHSC(scp)) + scp->mouse_pos = scp->mouse_oldpos = 0; + else + scp->mouse_pos = scp->mouse_oldpos = + (y/scp->font_size - scp->yoff)*scp->xsize + x/8 - scp->xoff; splx(s); }