Jump to content
  • Advertisement
Sign in to follow this  
Bliz23

Minimizing

This topic is 4850 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So I want my application to minimize, but its not working right. Two things will happen, the first is when its windowed and i define the window style as "WS_MINIMIZE | WS_SYSMENU". It will minimize fine, but once its minimized the computer seems to slow up drastically! I ran it with music in another app. The music worked fine untill i minimized it, when it started acting like a broken record. But after i finally get it back maximized, everything seems to work fine, even the music. This works not just when minimizing but when the program is not the one on top. The other case is when the application is in full screen. I use the window style of "WS_POPUP". It starts out fine. Then i hit the windows logo to minimize it and it still works fine with only like a split second delay. Then i go back to maximize it and when its back to full screen, nothing of the program works, it goes to just like i created an empty window, all white. Also if i changed the resolution on the fullscreen app to something else, when i maximize it, it is just a white 800 by 600 screen. If someone could help me out to like pause the app when its a minimized window so that it doesn't slow the computer down, or if someone could help me be able to maximize the window correctly in fullscreen mode. Any help will be greatly appreciated. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Sometimes when going back to fullscreen you don't restore some of your variables.. It really depends on your game loop and how you have it structured, I had that problem a year or two back with one of my games, I was initializing objects in my openGL init routine, and when it was maximized, it called that again, overwriting all the data that had built up.

That may help a bit, sorry I can't help with your other problems!

Share this post


Link to post
Share on other sites
With function TestCooperativeLevel you can check if your program can still draw to the device...

So at someting like the followinf to your Render-Method:

HRESULT hResult = d3ddevice->TestCooperativeLevel();
if( hResult == D3DERR_DEVICELOST )
return;

I hope this, what you were seeking for. Good Luck!

Share this post


Link to post
Share on other sites
hmmm, i haven't tried restoring the variables yet, but i'll do that. Also the TestCooperativeLevel seemed to return OK, but its still black. O well, i'll just disable minimizing altogether to get rid of my problem. But i did fix the slowdown for switching apps when in windowed mode, i just "paused" the game by not rendering and updating stuff when it was the top application. Thanks for the help.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!