From e9693b51302f0f6f8dcb02c915df4764dddcb29f Mon Sep 17 00:00:00 2001 From: Kp Date: Mon, 16 Jul 2012 03:42:56 +0000 Subject: [PATCH] Clear SDL_Event before each poll --- similar/arch/sdl/event.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/similar/arch/sdl/event.cpp b/similar/arch/sdl/event.cpp index e2a4c9e0e..31f79110b 100644 --- a/similar/arch/sdl/event.cpp +++ b/similar/arch/sdl/event.cpp @@ -27,7 +27,7 @@ void event_poll() // If the front window changes, exit this loop, otherwise unintended behavior can occur // like pressing 'Return' really fast at 'Difficulty Level' causing multiple games to be started - while ((wind == window_get_front()) && SDL_PollEvent(&event)) + while ((wind == window_get_front()) && (memset(&event, 0, sizeof(event)), SDL_PollEvent(&event))) { switch(event.type) { case SDL_KEYDOWN: