summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 772128d)
raw | patch | inline | side by side (parent: 772128d)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Wed, 4 Oct 2017 15:58:17 +0000 (18:58 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Wed, 4 Oct 2017 15:58:23 +0000 (18:58 +0300) |
src/game/g_window.pas | patch | blob | history |
diff --git a/src/game/g_window.pas b/src/game/g_window.pas
index a09f93f6e786eff9239a42cd92f5b630032a24c9..dbf50d348afa7ca9e77865300c10b126d94329bb 100644 (file)
--- a/src/game/g_window.pas
+++ b/src/game/g_window.pas
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;
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;
{$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);