[client] corrected event processing

SDL_WaitEvent is useless as it runs in 10ms increments, which is way
too slow for high rate of input applications.
This commit is contained in:
Geoffrey McRae 2017-12-04 00:47:20 +11:00
parent b61ba15a9c
commit 3156c0e0cb

View file

@ -587,15 +587,9 @@ int eventThread(void * arg)
while(state.running)
{
SDL_Event event;
if (!SDL_WaitEventTimeout(&event, 1000))
if (!SDL_PollEvent(&event))
{
const char * err = SDL_GetError();
if (err[0] != '\0')
{
DEBUG_ERROR("SDL Error: %s", err);
state.running = false;
break;
}
usleep(1000);
continue;
}