summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2015-04-11 22:55:16 -0400
committerSimon Howard2015-04-11 22:55:16 -0400
commit7504716edfe360c6a72d4d10eb4213d9cfe1f551 (patch)
tree2ab2a9a1bd0b3867360139c74802aec8e3fcdee3
parent022ea10707f0b3e6d4238b757918ac1a735ce00c (diff)
downloadchocolate-doom-7504716edfe360c6a72d4d10eb4213d9cfe1f551.tar.gz
chocolate-doom-7504716edfe360c6a72d4d10eb4213d9cfe1f551.tar.bz2
chocolate-doom-7504716edfe360c6a72d4d10eb4213d9cfe1f551.zip
Clear mouse events caused by mouse warp.
SDL_WarpMouse() can create mouse events that are later interpreted as user mouse input. Thanks Super6-4 for this fix.
-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 d0140a0b..ec0fc58f 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -923,6 +923,7 @@ static void UpdateGrab(void)
// example.
SDL_WarpMouse(screen->w - 16, screen->h - 16);
+ SDL_PumpEvents();
SDL_GetRelativeMouseState(NULL, NULL);
}