From: Ketmar Dark Date: Sat, 30 Sep 2017 22:16:27 +0000 (+0300) Subject: Holmes/UI: compilation fixes X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=46fcacba04378fd39dccb8e9f969eaca4af4adcd;p=d2df-sdl.git Holmes/UI: compilation fixes --- diff --git a/src/gx/gh_ui.pas b/src/gx/gh_ui.pas index 28311e3..ff28447 100644 --- a/src/gx/gh_ui.pas +++ b/src/gx/gh_ui.pas @@ -2077,7 +2077,7 @@ end; procedure TUITopWindow.flFitToScreen (); begin - flMaxSize := TLaySize.Create(trunc(getScrWdt/gh_ui_scale)-mFrameWidth*2-6, trunc(getScrHgt/gh_ui_scale)-mFrameHeight*2-6); + flMaxSize := TLaySize.Create(trunc(gxScreenWidth/gh_ui_scale)-mFrameWidth*2-6, trunc(gxScreenHeight/gh_ui_scale)-mFrameHeight*2-6); end; diff --git a/src/gx/glgfx.pas b/src/gx/glgfx.pas index 2aaec44..9345bb7 100644 --- a/src/gx/glgfx.pas +++ b/src/gx/glgfx.pas @@ -203,6 +203,9 @@ function getMouseY (): Integer; inline; function getButState (): Word; inline; function getModState (): Word; inline; +function gxScreenWidth (): Integer; inline; +function gxScreenHeight (): Integer; inline; + // ////////////////////////////////////////////////////////////////////////// // property @@ -236,6 +239,11 @@ var curMsY: Integer = 0; +// ////////////////////////////////////////////////////////////////////////// // +function gxScreenWidth (): Integer; inline; begin result := gScrWidth; end; +function gxScreenHeight (): Integer; inline; begin result := gScrHeight; end; + + // ////////////////////////////////////////////////////////////////////////// // function strEquCI (const s0, s1: AnsiString): Boolean; var