summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2013-09-20 04:48:00 +0000
committerSimon Howard2013-09-20 04:48:00 +0000
commit2abeaa31ee536faefb640bf5d1cf3bbf421464ab (patch)
treef66837ab5550bf2d4163d3bde353d4b5b1bf8e7c
parent5364e94a81e536ae1e21955c6b680a41eb9e4e5d (diff)
downloadchocolate-doom-2abeaa31ee536faefb640bf5d1cf3bbf421464ab.tar.gz
chocolate-doom-2abeaa31ee536faefb640bf5d1cf3bbf421464ab.tar.bz2
chocolate-doom-2abeaa31ee536faefb640bf5d1cf3bbf421464ab.zip
Place the mouse cursor in a less distracting location when releasing
mouse grab. Subversion-branch: /branches/v2-branch Subversion-revision: 2667
-rw-r--r--src/i_video.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/i_video.c b/src/i_video.c
index ce4ae2a6..99446666 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -921,6 +921,14 @@ static void UpdateGrab(void)
else if (!grab && currently_grabbed)
{
SetShowCursor(true);
+
+ // When releasing the mouse from grab, warp the mouse cursor to
+ // the bottom-right of the screen. This is a minimally distracting
+ // place for it to appear - we may only have released the grab
+ // because we're at an end of level intermission screen, for
+ // example.
+
+ SDL_WarpMouse(screen->w - 16, screen->h - 16);
}
currently_grabbed = grab;