commit 9e112d6d1d5329bd4b928934244c7f2330b2dfb1
Author: Simon Howard <fraggle@gmail.com>
AuthorDate: Sun Mar 16 20:39:46 2014 -0400
Commit: Simon Howard <fraggle@gmail.com>
CommitDate: Sun Mar 16 20:39:46 2014 -0400
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)
{