Jump to content
  • Advertisement

Archived

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

Kaellaar

DirectX Problem

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

Can anyone explain to me what needs to be done to make a DirectX program restore correctly after being minimized? All of the SDK examples do it correctly, but I can''t figure out what part of the code does this. Thanks. Kaellaar

Share this post


Link to post
Share on other sites
Advertisement
when you gain focus again, just restore your surfaces with the Restore() member of IDirectDrawSurfaceX

ie. surface->Restore();

Share this post


Link to post
Share on other sites
Just a few things.

If you''re using DirectX 7 just call
llpdirectdraw7->RestoreAllSurfaces();

it''s new to version 7 and is a great shortcut.

And another thing, by restoring the surfaces, it doesn''t restore the contents of them, it merely "re-grabs" the memory where the surface will reside. It''s not likely, but possible that the surfaces will be written over. You will need to load all of your graphics back onto the surfaces after restoring them just to be sure though.

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!