hedgewars/hwengine.pas
changeset 5724 3064ed85a5bd
parent 5686 3f2e6ec7719a
child 5730 1ef0027411f4
--- a/hedgewars/hwengine.pas	Thu Sep 01 10:13:03 2011 -0400
+++ b/hedgewars/hwengine.pas	Thu Sep 01 17:49:27 2011 +0200
@@ -149,8 +149,12 @@
     PrevTime:= SDL_GetTicks;
     while isTerminated = false do
     begin
-
-        while SDL_PollEvent(@event) <> 0 do
+        SDL_PumpEvents();
+        {$IFDEF SDL13}
+        while SDL_PeepEvents(@event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) > 0 do
+        {$ELSE}
+        while SDL_PeepEvents(@event, 1, SDL_GETEVENT, SDL_ALLEVENTS) > 0 do
+        {$ENDIF}
         begin
             case event.type_ of
                 SDL_KEYDOWN: if GameState = gsChat then