Jump to content
  • Advertisement

Archived

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

BeanDog

When booted to Windows, game freezes up

This topic is 6736 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

Whenever my games are booted to windows (another app has a message come up, or windows key is pressed, or whatever), they will freeze up completely and totally. Has anyone had this problem before? How do you gracefully handle the switching to and from minimized mode? ~BenDilts( void );

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
How do you expect us to help again?

Share this post


Link to post
Share on other sites
You should keep track of when your game doesn''t have focus anymore, then stop rendering and wait until it regains focus, then restore any possible data that has been lost (mostly DirectDraw surfaces) and continiue.

What API are you using?

============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown

Share this post


Link to post
Share on other sites
sorry about being so vague.

I am using DirectX 7.0a SDK DDraw, DInput, and DSound.

How do you check if you have the focus? Should I check only once per frame to halt everything or every single time I do a blit?

I never really worried about this before. For some reason, DInput takes over my computer''s input that the windows button won''t kick you out. Not even ctl-alt-dlt or anything. But then CompuServe asked me a question (I think) and I had to reboot because my game froze up.

~BenDilts( void );

Share this post


Link to post
Share on other sites
You can handle activation through taking care of the WM_ACTIVATEAPP message in your lpfnWndProc.
You get it both when you get deactivated and when you get activated.
wParam contains 0 if you get deactivated

Share this post


Link to post
Share on other sites
Most likely when your app loses focus it lost all it''s DDSurfaces and your BLTs and BLTFASTs are failing.

-------------------------
-Now Working on Pokemon like Engine!

Share this post


Link to post
Share on other sites

  • 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!