DEADSOFTWARE

sdl2sys: removed compiler warning (fpc warnings sux)
[d2df-sdl.git] / src / game / sdl2 / g_system.pas
index 9485fd9b6e9a0897a5eb328b7232ae8f7ac8a3d9..b7142a85bc03504b8cda40fc8c380e3a5af21d50 100644 (file)
@@ -128,7 +128,7 @@ implementation
         context := SDL_GL_CreateContext(window);
         if context <> nil then
         begin
-          {$IFDEF USE_NOGL}
+          {$IFDEF NOGL_INIT}
             nogl_Init;
           {$ENDIF}
           UpdateSize(w, h);
@@ -422,6 +422,7 @@ implementation
     var ev: TSDL_Event;
   begin
     result := false;
+    ZeroMemory(@ev, sizeof(ev));
     while SDL_PollEvent(@ev) <> 0 do
     begin
       case ev.type_ of
@@ -475,7 +476,7 @@ implementation
     e_WriteLog('Releasing SDL2', TMsgType.Notify);
     if context <> nil then
     begin
-      {$IFDEF USE_NOGL}
+      {$IFDEF NOGL_INIT}
         nogl_Quit;
       {$ENDIF}
       SDL_GL_DeleteContext(context);