From 7504716edfe360c6a72d4d10eb4213d9cfe1f551 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 11 Apr 2015 22:55:16 -0400 Subject: 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(+) (limited to 'src') 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); } -- cgit v1.2.3