• Advertisement


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

DirectX 7 Some confusion

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