(svn r26449) -Add: Allow more sound sleep for dedicated servers when there's nothing to do and nobody paying attention
This commit is contained in:
@@ -316,7 +316,15 @@ void VideoDriver_Dedicated::MainLoop()
|
||||
}
|
||||
|
||||
/* Don't sleep when fast forwarding (for desync debugging) */
|
||||
if (!_ddc_fastforward) CSleep(1);
|
||||
if (!_ddc_fastforward) {
|
||||
/* Sleep longer on a dedicated server, if the game is paused and no clients connected.
|
||||
* That can allow the CPU to better use deep sleep states. */
|
||||
if (_pause_mode != 0 && !HasClients()) {
|
||||
CSleep(100);
|
||||
} else {
|
||||
CSleep(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user