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 <sobomax@altavista.net>
This commit is contained in:
Kazutaka YOKOTA 2000-01-24 13:44:39 +00:00
parent 29d1eb210d
commit 3c0931ff87

View file

@ -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);
}