🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Lock returns DDERR_SURFACEBUSY after multitask?

Started by
-1 comments, last by Starfall 24 years, 8 months ago
I've been getting a few problems with my oft-used DDraw surfaces in a program I'm currently working on. Basically, when I multitask out and back in again, several surfaces aren't being drawn. When I debugged this problem it led back to the surface Lock commands returning DDERR_SURFACEBUSY. According to the documentation, this means that I'm trying to lock a surface that is already locked. My functions clearly unlock each surface after using it, however. I have been able to solve the problem by calling Unlock(NULL) on the surface when I get a DDERR_SURFACEBUSY error, but is there a way to stop this altogether? I don't really want to have to look for this error every time I lock a surface, and I don't think this is normal behaviour (or is it?).

At least one of the surfaces that exhibits this behaviour is created with the DDSCAPS_SYSTEMMEMORY flag, and thus should not be in video memory, which was my original suspicion.

If anyone has any suggestions I'd be glad to hear them.

Thanks

Starfall

[This message has been edited by Starfall (edited October 31, 1999).]

This topic is closed to new replies.

Advertisement