Disable screensave when rendering

This commit is contained in:
ronaldhordijk 2005-03-26 10:07:28 +00:00
parent c9805b1a14
commit 73b68d554e
3 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,5 @@
2.02h
+ Disable screen saver when rendering to disk
2.02g
+ Delphi2005 Project

View File

@ -401,7 +401,7 @@ object RenderForm: TRenderForm
Width = 327
Height = 21
Style = csDropDownList
ItemHeight = 0
ItemHeight = 13
TabOrder = 0
OnChange = cmbPresetChange
end

View File

@ -311,6 +311,9 @@ begin
if Assigned(Renderer) then Renderer.WaitFor;
if not Assigned(Renderer) then
begin
// disable screensaver
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 0, nil, 0);
cp.sample_density := Sample_density;
cp.spatial_oversample := Oversample;
cp.spatial_filter_radius := Filter_Radius;
@ -327,6 +330,9 @@ begin
Renderer.SetCP(cp);
Renderer.Priority := tpLower;
Renderer.Resume;
// enable screensaver
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 1, nil, 0);
end;
end;