Posted: Thu Mar 09, 2006 5:10 pm
For those who haven't seen this before, you can give up some cpu time when the app is not active...
If you're writing cross platform code, unix variants have usleep which is similar.
Code: Select all
while(IrrDevice->run() && IrrDriver)
{
if (IrrDevice->isWindowActive())
{
// render and all that stuff
}
else
{
Sleep(100); // give up cpu time if not active
}
}