From 1d2ce4461982ccbfa4d5834c83174b61c2e7c768 Mon Sep 17 00:00:00 2001 From: divverent Date: Mon, 10 Nov 2008 11:18:36 +0000 Subject: [PATCH] glx: support vid_stick_mouse (to always warp to the center, as opposed to only warp if half the screen size is crossed) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8553 d7cf8633-e32d-0410-b094-e92efae38249 --- vid_glx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vid_glx.c b/vid_glx.c index f40b23a8..26f441b4 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -432,7 +432,7 @@ 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) + 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) + if (vid_stick_mouse.integer || abs(vid.width/2 - event.xmotion.x) > vid.width / 4 || abs(vid.height/2 - event.xmotion.y) > vid.height / 4) dowarp = true; } } -- 2.39.2