Jump to content
  • Advertisement

Archived

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

Confused

Minimizing DirectX apps

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

I used Andre LaMothe''s Windows programming and Tricks of the Game Programming Gurus and nowhere does it tell how to make DirectX apps that don''t crash when minimized. How do you do it? I tried to stop running the Game_Main function when the app was minimized and it didn''t help at all! I tried out LaMothe''s examples and the crashed when minimized. Guess it is something he missed....Help! ------------- cOnfuSed

Share this post


Link to post
Share on other sites
Advertisement
Well, use a value that you test before you render your scene. When you get a minimize message, set the value to false, when it''s restored, set the value to true.

Share this post


Link to post
Share on other sites
Dont forget to always check if your surfaces are lost (if Blt or BltFast return DDERR_SURFACELOST), and if they are then you MUST restore them. Also, dont forget to reaquire your input devices if they are lost as well.

The game I''m working on minimizes and maximizes without a problem and I dont even stop the game play when it''s minimized, so that shouldn''t really be your problem. It''s probably just that your loing surfaces and input

------------------------------
fclose(fp)
------------------------------

Share this post


Link to post
Share on other sites
Look at the code for Duel in the SDK. That app will switch in/out and run full-screen/window.

It''s all in there baby.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!