POV-Ray : Newsgroups : povray.windows : Another reason to hate Windows 7 : Re: Another reason to hate Windows 7 Server Time
8 Oct 2024 06:13:55 EDT (-0400)
  Re: Another reason to hate Windows 7  
From: Darren New
Date: 3 Oct 2011 14:08:29
Message: <4e89fa1d$1@news.povray.org>
On 10/2/2011 23:48, Thomas de Groot wrote:
> Am I right in assuming that we should put this is the Wish List?

Actually, it seems pretty easy, relatively speaking.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa373208%28v=vs.85%29.aspx

It looks like adding a call to
   SetThreadExecutionState(ES_SYSTEM_REQUIRED)
each time a work unit is dispatched in the renderer should be enough, as 
long as at least one of those work units is going to finish before the sleep 
timer runs out. Adding in ES_CONTINUOUS might be good, but you'd want to 
take care that you don't fail to clear that at the end of the render, too. 
Probably safer to keep telling it you're awake than to tell it to stay awake 
until further notice.

HTH!

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.