Clear SDL_Event before each poll

This commit is contained in:
Kp 2012-07-16 03:42:56 +00:00
parent 00a9fd7ac2
commit e9693b5130

View file

@ -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: