From 9e112d6d1d5329bd4b928934244c7f2330b2dfb1 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 16 Mar 2014 20:39:46 -0400 Subject: video: Center mouse when grabbing cursor. When releasing mouse grab (activating menu etc.) we move the mouse cursor to a non-distracting location at the bottom-right of the screen. But this was causing abrupt jerks in mouse movement when re-grabbing the mouse again. Center the mouse when turning on grab so that this doesn't happen. This fixes #283. --- src/i_video.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/i_video.c b/src/i_video.c index 1f375577..1add5312 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -925,6 +925,7 @@ static void UpdateGrab(void) else if (grab && !currently_grabbed) { SetShowCursor(false); + CenterMouse(); } else if (!grab && currently_grabbed) { -- cgit v1.2.3