[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:
1 parent
b61ba15a9c
commit
3156c0e0cb
1 file changed
+2
-8
+2
-8
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user