foxygit / doom Log in
commit 7504716edfe360c6a72d4d10eb4213d9cfe1f551
Author:     Simon Howard <fraggle@soulsphere.org>
AuthorDate: Sat Apr 11 22:55:16 2015 -0400
Commit:     Simon Howard <fraggle@soulsphere.org>
CommitDate: Sat Apr 11 22:55:16 2015 -0400

    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.
---
 src/i_video.c | 1 +
 1 file changed, 1 insertion(+)

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);
     }