mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[client] prevent 100% CPU usage in event loop, fixes #41
This commit is contained in:
parent
9aba969296
commit
2af522aea7
@ -923,12 +923,15 @@ int run()
|
||||
{
|
||||
SDL_Event event;
|
||||
while(SDL_PollEvent(&event))
|
||||
{
|
||||
if (event.type == SDL_QUIT)
|
||||
{
|
||||
if (!params.ignoreQuit)
|
||||
state.running = false;
|
||||
break;
|
||||
}
|
||||
usleep(1000);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user