From d7ae2bbc66ab7c9cbbc9f2e8adb39eaaaa5fab0f Mon Sep 17 00:00:00 2001 From: Meep-Eep Date: Wed, 28 Dec 2011 18:43:45 +0000 Subject: [PATCH] Reapply. Old SDL versions could return -1 (probably as a bug). We might as well handle this case. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3715 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/libs/graphics/sdl/sdl_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc2/src/libs/graphics/sdl/sdl_common.c b/sc2/src/libs/graphics/sdl/sdl_common.c index 5316bd7e0..423fe0c47 100644 --- a/sc2/src/libs/graphics/sdl/sdl_common.c +++ b/sc2/src/libs/graphics/sdl/sdl_common.c @@ -186,7 +186,7 @@ TFB_ProcessEvents () { SDL_Event Event; - while (SDL_PollEvent (&Event)) + while (SDL_PollEvent (&Event) > 0) { /* Run through the InputEvent filter. */ ProcessInputEvent (&Event);