shithub: choc

Download patch

ref: 7504716edfe360c6a72d4d10eb4213d9cfe1f551
parent: 022ea10707f0b3e6d4238b757918ac1a735ce00c
author: Simon Howard <fraggle@soulsphere.org>
date: Sat Apr 11 18:55:16 EDT 2015

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.

--- a/src/i_video.c
+++ b/src/i_video.c
@@ -923,6 +923,7 @@
         // example.
 
         SDL_WarpMouse(screen->w - 16, screen->h - 16);
+        SDL_PumpEvents();
         SDL_GetRelativeMouseState(NULL, NULL);
     }