From 46fcacba04378fd39dccb8e9f969eaca4af4adcd Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Sun, 1 Oct 2017 01:16:27 +0300 Subject: [PATCH] Holmes/UI: compilation fixes --- src/gx/gh_ui.pas | 2 +- src/gx/glgfx.pas | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) 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 -- 2.29.2