sdl: Flush the joypad events.

Bastien found a fix to the issue
"The lag after 10-15 minutes issue appears to be a bug in the sdl2 input
driver in RetroArch. RetroArch never clears the SDL event queue. After a
while it is so large it takes a significant time to traverse."

Fixes https://github.com/libretro/RetroArch/issues/7868

Solution thanks to Bastien.
This commit is contained in:
orbea 2019-01-01 17:11:16 -08:00
parent 731ef11e2f
commit 7ac080ea50

View File

@ -399,6 +399,8 @@ static void sdl_joypad_poll(void)
break;
}
}
SDL_FlushEvents(SDL_JOYAXISMOTION, SDL_CONTROLLERDEVICEREMAPPED);
#else
SDL_JoystickUpdate();
#endif