X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_window.pas;h=dbf50d348afa7ca9e77865300c10b126d94329bb;hb=dda89b4dbebf5fb63084ed24f9fac8299aa97d7c;hp=a09f93f6e786eff9239a42cd92f5b630032a24c9;hpb=772128d5e2cfed3d8abbb325573a1c873d4fd912;p=d2df-sdl.git diff --git a/src/game/g_window.pas b/src/game/g_window.pas index a09f93f..dbf50d3 100644 --- a/src/game/g_window.pas +++ b/src/game/g_window.pas @@ -83,10 +83,7 @@ var procedure KillGLWindow (); begin - if (h_Wnd <> nil) then - begin - if assigned(oglDeinitCB) then oglDeinitCB(); - end; + if (h_GL <> nil) then begin if (assigned(oglDeinitCB)) then oglDeinitCB(); end; if (h_Wnd <> nil) then SDL_DestroyWindow(h_Wnd); if (h_GL <> nil) then SDL_GL_DeleteContext(h_GL); h_Wnd := nil; @@ -136,10 +133,7 @@ begin SDL_GL_MakeCurrent(h_Wnd, h_GL); SDL_ShowCursor(SDL_DISABLE); - if (h_GL <> nil) then - begin - if assigned(oglInitCB) then oglInitCB(); - end; + if (h_GL <> nil) then begin if (assigned(oglInitCB)) then oglInitCB(); end; {$ENDIF} result := true; @@ -469,7 +463,7 @@ begin {$IF not DEFINED(HEADLESS)} h_Gl := SDL_GL_CreateContext(h_Wnd); if (h_Gl = nil) then exit; - if assigned(oglInitCB) then oglInitCB(); + if (assigned(oglInitCB)) then oglInitCB(); {$ENDIF} e_ResizeWindow(gScreenWidth, gScreenHeight);