Jump to content
  • Advertisement
Sign in to follow this  
Eric Chan

Lock/Unlock user on Vista cause directdraw blocking problem

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

Hi, On Vista, after the user lock/unlock their machine, DirectX returns DDERR_SURFACELOST when my program tries to Blt. Then my program restores the surfaces by calling RestoreAllSurfaces(). After that, the Lock call is blocked and not returning. Anyone know what is going on there? I thought if I provide the DDLOCK_DONOTWAIT flag, it should return immediately even if error. This only happens on Vista, I don't see the same problem in XP. Here is my code: DDSURFACEDESC2 tSurfaceDesc; tSurfaceDesc.dwSize = sizeof(tSurfaceDesc); if (SUCCEEDED(ipInSurface->Lock(NULL, &tSurfaceDesc, DDLOCK_DONOTWAIT, NULL))) { .... ipInSurface->Unlock(NULL); } Thanks in advance, Eric

Share this post


Link to post
Share on other sites
Advertisement
I can't think of many ways that could happen, here's a few things to try:

1. Are there any error messages from the debug runtumes?

2. Update video card drivers.

3. Try it with the reference rasterizer.

4. Are you using D3DCREATE_MULTITHREADED? If so check what the other threads are up to. You could also just try disabling it to eliminate it as a possibility.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!