summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a18a370c..6721b8f0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -974,9 +974,13 @@ int main(int argc, char *argv[])
while (state != STATE_EXIT)
{
+ bool handledEvents = false;
+
// Handle SDL events
while (SDL_PollEvent(&event))
{
+ handledEvents = true;
+
switch (event.type)
{
case SDL_QUIT:
@@ -1538,7 +1542,8 @@ int main(int argc, char *argv[])
* just constantly redrawing the wallpaper. Added the following
* usleep to limit it to 40 FPS during the login sequence
*/
- usleep(25000);
+ if (!handledEvents)
+ usleep(25000);
}
delete guiPalette;