Confine mouse movements.

svn-id: r3562
This commit is contained in:
Marcus Comstedt 2002-02-03 14:54:11 +00:00
parent c0c9b69851
commit 277a86b8ca

View File

@ -124,5 +124,10 @@ void handleInput(struct mapledev *pad, int16 &mouse_x, int16 &mouse_y,
lastkey = 0;
else if(newkey != lastkey)
keyPressed = lastkey = newkey;
if (mouse_x<0) mouse_x=0;
if (mouse_x>319) mouse_x=319;
if (mouse_y<0) mouse_y=0;
if (mouse_y>199) mouse_y=199;
}