X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fsdl2%2Fg_system.pas;h=b7142a85bc03504b8cda40fc8c380e3a5af21d50;hb=df21c986515fa0a93a10afbd789341894fcfe68d;hp=9485fd9b6e9a0897a5eb328b7232ae8f7ac8a3d9;hpb=4171d8dd0b8d733da27c584616e431811bf0fdcf;p=d2df-sdl.git diff --git a/src/game/sdl2/g_system.pas b/src/game/sdl2/g_system.pas index 9485fd9..b7142a8 100644 --- a/src/game/sdl2/g_system.pas +++ b/src/game/sdl2/g_system.pas @@ -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);