Jump to content
  • Advertisement


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


DirectX 7 Some confusion

This topic is 6357 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 am curently learning DirextX7 are saw this code in the SDK HRESULT hRet; while (TRUE) { hRet = g_pDDSBack->BltFast(0, 0, pdds, &rcRect, FALSE); if (hRet == DD_OK) break; if (hRet == DDERR_SURFACELOST) { hRet = RestoreAll(); if (hRet != DD_OK) break; } if (hRet != DDERR_WASSTILLDRAWING) break; } I understand that if the blt is succesful then you break out of the while loop. But if the surface was lost and the restore is succesful then if (hRet != DD_OK) break; will be false. Then if (hRet != DDERR_WASSTILLDRAWING) break; will be true and you will break out of the loop even though the surface was restored. The SDK said that if the restore was succesful it would loop back up to the blt statement. Did i understand this incorrectly? i would really appreciate some feedback.

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!