mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[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:
parent
b61ba15a9c
commit
3156c0e0cb
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user