Jump to content
  • Advertisement


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


A More Challenging Question

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

Ok my code compiles fine but craps out on this line: if (lpddsprimary->GetAttachedSurface(&ddscaps, &lpddsback)!=DD_OK) { Error(hwnd, "GetAttachedSurface"); return(0); } I''m trying to upgrade my program to DX7-It worked fine before with regular DX. Oh-and how do you make those neat code snippets? I would like to post more but don''t want it to be ugly Thanks!

Share this post

Link to post
Share on other sites
OK got this one figured out

For some reason i had to erase the memory of DDSCAPS before pointing it to the secondary surface. It always got erased before creating the primary surface. With DX7 you have to wipe it again. I though:


would simply replace to ddscaps structure. Nope-I had to do this first:

ZeroMemory(&ddscaps, sizeof(ddscaps));

Then It worked. Anyone know why?

Thanks again!

Share this post

Link to post
Share on other sites
cuz it probably has some more stuff stored in other parameters (remember, those values are all kinda random when you make a new struct) and older version of DX wouldn''t look at them, but DX7 looks at them for some reasons.

btw, post those things in [ source ] and [ /source ] tags

- Pouya / FOO!!!

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!