X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_window.pas;h=d73dd537bec5d24a18a18998f8a6fd1764a417df;hb=414af04a1d69b3bc575c1f6c9bc869973e5293d7;hp=a09f93f6e786eff9239a42cd92f5b630032a24c9;hpb=7da841038d5a4e415324d4441cd397f6664e892d;p=d2df-sdl.git diff --git a/src/game/g_window.pas b/src/game/g_window.pas index a09f93f..d73dd53 100644 --- a/src/game/g_window.pas +++ b/src/game/g_window.pas @@ -1,4 +1,4 @@ -(* Copyright (C) DooM 2D:Forever Developers +(* Copyright (C) Doom 2D: Forever Developers * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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,9 @@ begin SDL_GL_MakeCurrent(h_Wnd, h_GL); SDL_ShowCursor(SDL_DISABLE); - if (h_GL <> nil) then - begin - if assigned(oglInitCB) then oglInitCB(); - end; + fuiScrWdt := gScreenWidth; + fuiScrHgt := gScreenHeight; + if (h_GL <> nil) then begin if (assigned(oglInitCB)) then oglInitCB(); end; {$ENDIF} result := true; @@ -185,6 +181,8 @@ begin gWinSizeX := gScreenWidth; gWinSizeY := gScreenHeight; {$IF not DEFINED(HEADLESS)} + fuiScrWdt := gScreenWidth; + fuiScrHgt := gScreenHeight; e_ResizeWindow(gScreenWidth, gScreenHeight); g_Game_SetupScreenSize(); g_Menu_Reset(); @@ -469,7 +467,9 @@ begin {$IF not DEFINED(HEADLESS)} h_Gl := SDL_GL_CreateContext(h_Wnd); if (h_Gl = nil) then exit; - if assigned(oglInitCB) then oglInitCB(); + fuiScrWdt := gScreenWidth; + fuiScrHgt := gScreenHeight; + if (assigned(oglInitCB)) then oglInitCB(); {$ENDIF} e_ResizeWindow(gScreenWidth, gScreenHeight); @@ -773,8 +773,11 @@ begin {$IFDEF HEADLESS} e_NoGraphics := true; {$ELSE} - uiInitialize(); - uiContext.font := 'win14'; + if (not g_holmes_imfunctional) then + begin + uiInitialize(); + uiContext.font := 'win14'; + end; {$ENDIF} idx := 1;