Skip to content

Commit

Permalink
some translation additions
Browse files Browse the repository at this point in the history
  • Loading branch information
cheat-engine committed Jun 2, 2018
1 parent fd3098b commit fa6cc18
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions Cheat Engine/formsettingsunit.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -1427,6 +1427,7 @@ object formSettings: TformSettings
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 60
ClientWidth = 396
Expand Down
18 changes: 13 additions & 5 deletions Cheat Engine/formsettingsunit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,14 @@ procedure TFormSettings.SetAssociations; //obsolete, done from installer
rsNewLanguageSet = 'New language set';
rsRestartCE = 'It is recommended to restart Cheat Engine for this change to take effect';
rsFailureToOpenRegistry = 'Failure to open the registry entry';
rsSpectreWarning = 'WARNING! Making kernelmode possible will slightly increase the speed of your system, BUT it will make you vulnerable to Spectre attacks'#13#10'Are you ok with this? (You can later re-enable this protection)';
rsSpectreRestore = 'Your protection has been restored. Please restart your '
+'system to make it take effect';
rsFailMMRegistry = 'Failure getting the Memory Management registry key';
rsSpectreRegistryChanged = 'The registry keys has been changed accordingly. '
+' Reboot your system to make it take effect';


procedure TformSettings.btnOKClick(Sender: TObject);
var processhandle2: Thandle;
reg: TRegistry;
Expand Down Expand Up @@ -975,7 +983,7 @@ procedure TformSettings.btnOKClick(Sender: TObject);
procedure TformSettings.btnMakeKernelDebugPossibleClick(Sender: TObject);
var reg: TRegistry;
begin
if messagedlg('WARNING! Making kernelmode possible will slightly increase the speed of your system, BUT it will make you vulnerable to Spectre and Meltdown attacks. Are you ok with this?',mtWarning,[mbYes,mbNo],0,mbNo)=mrYes then
if messagedlg(rsSpectreWarning,mtWarning,[mbYes,mbNo],0,mbNo)=mrYes then
begin
reg:=tregistry.create;
try
Expand All @@ -985,10 +993,10 @@ procedure TformSettings.btnMakeKernelDebugPossibleClick(Sender: TObject);
reg.WriteInteger('FeatureSettingsOverride',3);
reg.WriteInteger('FeatureSettingsOverrideMask',3);

messagedlg('The registry keys (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\FeatureSettingsOverride*) have been set accordingly. Reboot your system to make it take effect', mtInformation, [mbOK],0);
messagedlg(rsSpectreRegistryChanged, mtInformation, [mbOK], 0);
end
else
messagedlg('Failure getting the Memory Management registry key',mtError,[mbok],0);
messagedlg(rsFailMMRegistry, mtError, [mbok], 0);

finally
reg.free;
Expand Down Expand Up @@ -1016,10 +1024,10 @@ procedure TformSettings.btnRestoreKernelProtectionClick(Sender: TObject);
if reg.ValueExists('FeatureSettingsOverrideMask') then
reg.DeleteValue('FeatureSettingsOverrideMask');

messagedlg('Your protection has been restored. Please restart your system to make it take effect',mtInformation,[mbok],0);
messagedlg(rsSpectreRestore, mtInformation, [mbok], 0);
end
else
messagedlg('Failure getting the Memory Management registry key',mtError,[mbok],0);
messagedlg(rsFailMMRegistry, mtError, [mbok], 0);
finally
reg.free;
end;
Expand Down

0 comments on commit fa6cc18

Please sign in to comment.