You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-09-30 21:28:55 +02:00
Fixed GetScreenDPI in VirtualBox with Linux guest and using Lazarus
This commit is contained in:
@@ -3129,6 +3129,8 @@ begin
|
||||
|
||||
{$IFDEF LINUX}
|
||||
{$IFDEF FPC}
|
||||
Result := 0;
|
||||
|
||||
if (Application <> nil) and
|
||||
(Application.MainForm <> nil) and
|
||||
(Application.MainForm.Monitor <> nil) then
|
||||
@@ -3140,9 +3142,11 @@ begin
|
||||
Result := screen.PrimaryMonitor.PixelsPerInch
|
||||
else
|
||||
Result := screen.PixelsPerInch;
|
||||
end
|
||||
else
|
||||
Result := USER_DEFAULT_SCREEN_DPI;
|
||||
end;
|
||||
|
||||
// Workaround for a VirtualBox issue.
|
||||
if (Result = 0) then
|
||||
Result := USER_DEFAULT_SCREEN_DPI;
|
||||
{$ELSE}
|
||||
Result := -1;
|
||||
if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, TempService) then
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"UpdateLazPackages" : [
|
||||
{
|
||||
"ForceNotify" : true,
|
||||
"InternalVersion" : 768,
|
||||
"InternalVersion" : 769,
|
||||
"Name" : "cef4delphi_lazarus.lpk",
|
||||
"Version" : "139.0.28"
|
||||
}
|
||||
|
Reference in New Issue
Block a user