X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fsdl2%2Fg_system.pas;h=45a45fd54a3c3bf9c6dfaeb29d25f6d5494a5e61;hb=96f8e6b190e94847ab2527cc07ee8b19589c05fa;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..45a45fd 100644 --- a/src/game/sdl2/g_system.pas +++ b/src/game/sdl2/g_system.pas @@ -24,7 +24,7 @@ interface procedure sys_Delay (ms: Integer); (* --- Graphics --- *) - function sys_GetDispalyModes (bpp: Integer): SSArray; + function sys_GetDisplayModes (bpp: Integer): SSArray; function sys_SetDisplayMode (w, h, bpp: Integer; fullscreen: Boolean): Boolean; procedure sys_EnableVSync (yes: Boolean); procedure sys_Repaint; @@ -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); @@ -167,7 +167,7 @@ implementation SDL_GL_SetSwapInterval(0) end; - function sys_GetDispalyModes (bpp: Integer): SSArray; + function sys_GetDisplayModes (bpp: Integer): SSArray; var i, count, num, pw, ph: Integer; m: TSDL_DisplayMode; begin result := nil; @@ -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);