Bound x motion by framebuffer width, not height.
Bound y motion by framebuffer height, not width. (cf revision 1.4.)
This commit is contained in:
parent
21717110ba
commit
ad4cc08b75
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ims332.c,v 1.6 1997/06/16 09:53:14 jonathan Exp $ */
|
/* $NetBSD: ims332.c,v 1.7 1997/07/19 12:03:51 jonathan Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1992, 1993, 1995
|
* Copyright (c) 1992, 1993, 1995
|
||||||
|
@ -300,12 +300,12 @@ ims332PosCursor(fi, x, y)
|
||||||
{
|
{
|
||||||
if (y < 0)
|
if (y < 0)
|
||||||
y = 0;
|
y = 0;
|
||||||
else if (y > fi -> fi_type.fb_width - fi -> fi_cursor.width - 1)
|
else if (y > fi -> fi_type.fb_height - fi -> fi_cursor.height - 1)
|
||||||
y = fi -> fi_type.fb_width - fi -> fi_cursor.width - 1;
|
y = fi -> fi_type.fb_height - fi -> fi_cursor.height - 1;
|
||||||
if (x < 0)
|
if (x < 0)
|
||||||
x = 0;
|
x = 0;
|
||||||
else if (x > fi -> fi_type.fb_height - fi -> fi_cursor.height - 1)
|
else if (x > fi -> fi_type.fb_width - fi -> fi_cursor.width - 1)
|
||||||
x = fi -> fi_type.fb_height - fi -> fi_cursor.height - 1;
|
x = fi -> fi_type.fb_width - fi -> fi_cursor.width - 1;
|
||||||
|
|
||||||
fi -> fi_cursor.x = x;
|
fi -> fi_cursor.x = x;
|
||||||
fi -> fi_cursor.y = y;
|
fi -> fi_cursor.y = y;
|
||||||
|
|
Loading…
Reference in New Issue