aboutsummaryrefslogtreecommitdiff
path: root/dc
diff options
context:
space:
mode:
authorMarcus Comstedt2002-02-03 14:54:11 +0000
committerMarcus Comstedt2002-02-03 14:54:11 +0000
commit277a86b8ca33a629d6c1a5c60b4573c69cc87827 (patch)
treef67a0f20fc73375d70b0270e596a07a66179df16 /dc
parentc0c9b698518c863f2f3c6320f99ff1d853d798e6 (diff)
downloadscummvm-rg350-277a86b8ca33a629d6c1a5c60b4573c69cc87827.tar.gz
scummvm-rg350-277a86b8ca33a629d6c1a5c60b4573c69cc87827.tar.bz2
scummvm-rg350-277a86b8ca33a629d6c1a5c60b4573c69cc87827.zip
Confine mouse movements.
svn-id: r3562
Diffstat (limited to 'dc')
-rw-r--r--dc/input.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/dc/input.cpp b/dc/input.cpp
index 77cb121c18..355b4401d5 100644
--- a/dc/input.cpp
+++ b/dc/input.cpp
@@ -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;
}