Don't allocate SDL_event structure on stack
authorunc0rr
Fri, 27 May 2011 23:18:23 +0400
changeset 5217 5612e01252ce
parent 5216 e69bf244a127
child 5218 bc31676ae108
Don't allocate SDL_event structure on stack
hedgewars/hwengine.pas
--- a/hedgewars/hwengine.pas	Wed May 25 14:21:40 2011 +0200
+++ b/hedgewars/hwengine.pas	Fri May 27 23:18:23 2011 +0400
@@ -141,8 +141,11 @@
 
 ///////////////////
 procedure MainLoop;
+{$WARNINGS OFF}
+// disable "Some fields weren't initialized" warning
+const event: TSDL_Event = ();
+{$WARNINGS ON}
 var PrevTime, CurrTime: Longword;
-    event: TSDL_Event;
 begin
     PrevTime:= SDL_GetTicks;
     while isTerminated = false do