]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
warp mouse pointer every time it moves off-center instead of just when
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 10 May 2008 07:22:15 +0000 (07:22 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 10 May 2008 07:22:15 +0000 (07:22 +0000)
it's halfway away from center, this hides the glitching that has been
reported, but the cause is still not understood

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8294 d7cf8633-e32d-0410-b094-e92efae38249

vid_glx.c

index 3593ac34d0e056519c53c7e24d6fdcddc454ea0f..243e3e3ed39c79d694a114952482ccc01243574c 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -380,7 +380,8 @@ static void HandleEvents(void)
                                        {
                                                in_mouse_x += event.xmotion.x - in_windowmouse_x;
                                                in_mouse_y += event.xmotion.y - in_windowmouse_y;
-                                               if (abs(vid.width/2 - event.xmotion.x) > vid.width / 4 || abs(vid.height/2 - event.xmotion.y) > vid.height / 4)
+                                               if (abs(vid.width/2 - event.xmotion.x) + abs(vid.height/2 - event.xmotion.y))
+                                               //if (abs(vid.width/2 - event.xmotion.x) > vid.width / 4 || abs(vid.height/2 - event.xmotion.y) > vid.height / 4)
                                                        dowarp = true;
                                        }
                                }