Archived

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

wyrd

Managed DirectDraw - Surface.IsLost property bugged?

Recommended Posts

In my program, I was using the Surface.IsLost property to check if a surface was lost. Unfortunately, it didn''t seem to work correctly, so I went ahead and outputted the value to the Console. After some examination, it looked like the values were opposite of what they should have been. I went ahead and changed my conditional statements to !Surface.IsLost, and suddenly the code seemed to work. Perhaps I have a fubard SDK, or this property is indeed bugged. Can anyone confirm or deny this?

Share this post


Link to post
Share on other sites
Im not entirely positive of this, but i seem to remember when working with IsLost in non-managed DDraw, it was a little weird, like the return value was not what you logicaly expected...

like i expected it to return DD_OK if it was lost but instead it returnes DDERR_SURFACELOST or somthing like that.

if you havent read the SDK for the actual API you might try that.

Raymond Jacobs,

www.EDIGames.com

www.EtherealDarkness.com




Voice your discontent! help stop the flames!

Share this post


Link to post
Share on other sites
The IsLost property in Managed DD is just a simple boolean value - true or false. If it returned something like DD_OK to mean the surface was okay, and DDERR_SURFACELOST to mean it was lost, then that''d make a bit more sense. Unfortunately, it seems to return true when the surface is perfectly fine, and false when the surface is lost.

If this is not the way the property is ment to work, then it was horribly named and the comments shown in the .NETs intellisense is wrong.

Share this post


Link to post
Share on other sites