Archived

This topic is now archived and is closed to further replies.

carlosib

Problem 100% Proccess

Recommended Posts

Oluseyi    2103
There''s nothing wrong with using 100% of resources. It doesn''t necessarily affect other programs (since Windows4.x+ will pull the carpet out from under you, unlike Windows 3.x which required you to release the processor).

The only case where you have a problem is if you use an inordinate amount of memory or your app doesn''t die properly (continues to use resources after exiting).

Share this post


Link to post
Share on other sites
Willywig    122
I have a question that using 100% is fine when that window has focus but if i open a nother app and the Directx app goes to the background my Comp slows to a crawl... how can i Avoid this?

Share this post


Link to post
Share on other sites
David_K    122
Create a gobal variable that you can test against in your gameloop .... i.e.


void GameLoop()
{
if( !g_bActive )
return;

// Other code etc.....

}


Change the g_bActive when your program gains focus and looses it to the appropreate value.


Just a suggestion No doubt there are better solutions out there but this works for my needs.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Use GetMessage() when you are inactive.
Use PeekMessage() when you are active.

Share this post


Link to post
Share on other sites