rnd-19980909
[rocksndiamonds.git] / src / events.c
index 5f85101eb06ef4b6764c38034d140e0620b771f7..af4a4c5690f17aa8878fda42b2f556e10348567e 100644 (file)
@@ -65,10 +65,13 @@ void EventLoop(void)
     else                       /* got no event, but don't be lazy... */
     {
       HandleNoXEvent();
-      Delay(1000);             /* don't use all CPU time when idle */
-    }
 
-    XSync(display,FALSE);
+      /* don't use all CPU time when idle; the main loop while playing
+        has its own synchronization and is CPU friendly, too */
+
+      if (game_status != PLAYING)
+       Delay(1000);
+    }
 
     if (game_status==EXITGAME)
       return;