When booted to Windows, game freezes up

Started by
6 comments, last by BeanDog 24 years ago
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 );
Advertisement
How do you expect us to help again?
That was me ^
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
============================Daniel Netz, Sentinel Design"I'm not stupid, I'm from Sweden" - Unknown
Oh sorry, I thought you were talking about any game. I did not see the "my" in "my game"
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 );
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
A polar bear is a rectangular bear after a coordinate transform.
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!
-------------------------
-Now Working on Pokemon like Engine!

This topic is closed to new replies.

Advertisement