Sign in to follow this  
Living

It still return S_OK when device lost

Recommended Posts

I deal with lost device some months ago in our game demo. Now, I must deal with lost device in our editor. In the editor, the edit window use swapChain. The code like this: hr = swapChain_->Present( 0, 0, 0, 0, 0 ); if( SUCCEEDED(hr) ) { return; } if( hr == D3DERR_DEVICELOST ) { ..................... } But, when device lost, it would return in the first 'if'. And the code can't be continue for device lost. Simplly said, it still return S_OK when device lost~ I don't know why it would return success when device lost. [Edited by - Living on December 24, 2009 1:07:51 AM]

Share this post


Link to post
Share on other sites
The output window would print this:

Direct3D9: (ERROR) :************************************************************
Direct3D9: (ERROR) :ASSERTION FAILED! File e:\dxsdk\wggt_apr07\private\multimedia\directx\dxg\d3d9\fw\ddgdi32.c Line 5013: pSurf->fpVidMem != (ULONG_PTR)NULL
Direct3D9: (ERROR) :************************************************************

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this