summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2014-03-16 20:39:46 -0400
committerSimon Howard2014-03-16 20:39:46 -0400
commit9e112d6d1d5329bd4b928934244c7f2330b2dfb1 (patch)
tree37f4c493ebe606fff6f841d3901100719f509c40
parentb96bbaa06d91cce1e62e20cae78095a7fc14a48b (diff)
downloadchocolate-doom-9e112d6d1d5329bd4b928934244c7f2330b2dfb1.tar.gz
chocolate-doom-9e112d6d1d5329bd4b928934244c7f2330b2dfb1.tar.bz2
chocolate-doom-9e112d6d1d5329bd4b928934244c7f2330b2dfb1.zip
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.
-rw-r--r--src/i_video.c1
1 files changed, 1 insertions, 0 deletions
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)
{