changed all event handling to always filter events
[rocksndiamonds.git] / src / tools.c
index 9bde54c7531aff5b7a1dc16d0e083808701f40d3..43df704a17ea08c8301600f8276b3b75b79263c2 100644 (file)
@@ -3777,12 +3777,10 @@ void WaitForEventToContinue()
 
   while (still_wait)
   {
-    if (PendingEvent())
-    {
-      Event event;
-
-      WaitEvent(&event);
+    Event event;
 
+    if (NextValidEvent(&event))
+    {
       switch (event.type)
       {
        case EVENT_BUTTONPRESS: