From 8dad4688fa8e04db8dd94acc46faf19f41fb265b Mon Sep 17 00:00:00 2001 From: salvadordf Date: Thu, 10 Aug 2023 18:08:50 +0200 Subject: [PATCH] Fixed backwards compatibility issue in Delphi 7 --- source/uCEFChromiumCore.pas | 8 ++++---- update_CEF4Delphi.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/uCEFChromiumCore.pas b/source/uCEFChromiumCore.pas index 9766c0a5..279fd2dd 100644 --- a/source/uCEFChromiumCore.pas +++ b/source/uCEFChromiumCore.pas @@ -3877,8 +3877,8 @@ begin FQuicAllowed := True; FJavascriptEnabled := True; FLoadImagesAutomatically := True; - FBatterySaverModeState := TCefBatterySaverModeState.bsmsDefault; - FHighEfficiencyModeState := TCefHighEfficiencyModeState.kDefault; + FBatterySaverModeState := bsmsDefault; + FHighEfficiencyModeState := kDefault; FCanFocus := False; FEnableFocusDelayMs := CEF_DEFAULT_ENABLEFOCUSDELAY; {$IFDEF LINUX} @@ -6687,10 +6687,10 @@ begin UpdatePreference(aBrowser, 'webkit.webprefs.javascript_enabled', FJavascriptEnabled); UpdatePreference(aBrowser, 'webkit.webprefs.loads_images_automatically', FLoadImagesAutomatically); - if (FHighEfficiencyModeState <> TCefHighEfficiencyModeState.kDefault) then + if (FHighEfficiencyModeState <> kDefault) then UpdatePreference(aBrowser, 'performance_tuning.high_efficiency_mode.state', integer(FHighEfficiencyModeState)); - if (FBatterySaverModeState <> TCefBatterySaverModeState.bsmsDefault) then + if (FBatterySaverModeState <> bsmsDefault) then UpdatePreference(aBrowser, 'performance_tuning.battery_saver_mode.state', integer(FBatterySaverModeState)); if assigned(FOnPrefsUpdated) then diff --git a/update_CEF4Delphi.json b/update_CEF4Delphi.json index 7f9a82ee..b3235110 100644 --- a/update_CEF4Delphi.json +++ b/update_CEF4Delphi.json @@ -2,7 +2,7 @@ "UpdateLazPackages" : [ { "ForceNotify" : true, - "InternalVersion" : 503, + "InternalVersion" : 504, "Name" : "cef4delphi_lazarus.lpk", "Version" : "115.3.13" }