Inactive Game Window

Grab your favourite IDE and tinker with the innards of game engines

Inactive Game Window

Postby SM Sith Lord on Mon Dec 02, 2013 9:42 pm

Older versions of the Source engine, such as the 2007 SDK Base, will go into a sort of hibernation mode when the game window is not active for a while. It takes a minute to switch back to the game, but while in hibernation mode it frees up system resources for other stuff.

The new version of the engine (2013 SDK Base) never goes into hibernation mode. I need to get it to do that again. Does anybody have some advice on where I might start looking in the code?

By the way, I am working with the Multiplayer branches of each of the engines.
SM Sith Lord
Been Here A While
Been Here A While
 
Joined: Sat Nov 25, 2006 4:25 pm
Location: Los Angles, CA

Re: Inactive Game Window

Postby zombie@computer on Mon Dec 02, 2013 9:48 pm

Seriously doubt thats in the 'open' part of the code.
When you are up to your neck in shit, keep your head up high
User avatar
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: Inactive Game Window

Postby SM Sith Lord on Tue Dec 03, 2013 9:11 pm

So far I've found materials->ReleaseResources() and materials->ReacquireResources(), which do seem to release a good amount of CPU usage when the window is not active.
SM Sith Lord
Been Here A While
Been Here A While
 
Joined: Sat Nov 25, 2006 4:25 pm
Location: Los Angles, CA

Re: Inactive Game Window

Postby SM Sith Lord on Wed Dec 04, 2013 11:46 am

Tested it yesterday and it also allowed my RAM usage to drop to 1/20th what it normally is. :)
SM Sith Lord
Been Here A While
Been Here A While
 
Joined: Sat Nov 25, 2006 4:25 pm
Location: Los Angles, CA

Return to Programming

Who is online

Users browsing this forum: Google [Bot]