1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Moved uCEFLinkedWinControlBase to the source directory

Fixed build issues in Delphi with uCEFLinkedWinControlBase
Fixed GetDeviceScaleFactor for MacOS in FMX
Updated Readme
This commit is contained in:
Salvador Diaz Fau
2021-02-24 10:57:59 +01:00
parent 23bf854c28
commit ce5384b108
11 changed files with 19 additions and 15 deletions

View File

@@ -1548,7 +1548,7 @@ begin
Result := CreateAbsolutePath(Result, GetCurrentDirUTF8);
{$ELSE}
if Result.Contains(MAC_APP_POSTFIX + MAC_APP_SUBPATH) then
Result := Result.Remove(Result.LastIndexOf(MAC_APP_SUBPATH));
Result := Result.Remove(Result.IndexOf(MAC_APP_SUBPATH));
{$ENDIF}
{$ENDIF}
end;
@@ -2210,15 +2210,17 @@ begin
{$IFDEF FPC}
// TODO: Find a way to get the screen scale in Lazarus/FPC for MacOS
Result := USER_DEFAULT_SCREEN_DPI;
{$ELSE}
Result := trunc(MainScreen.backingScaleFactor);
{$ENDIF}
{$ENDIF}
end;
function GetDeviceScaleFactor : single;
begin
{$IFDEF MACOS}
Result := MainScreen.backingScaleFactor;
{$ELSE}
Result := GetScreenDPI / USER_DEFAULT_SCREEN_DPI;
{$ENDIF}
end;
function DeleteDirContents(const aDirectory : string; const aExcludeFiles : TStringList) : boolean;