mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
29d1eb210d
commit
3c0931ff87
1 changed files with 5 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue