It still return S_OK when device lost

Started by
0 comments, last by Living 14 years, 4 months ago
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]
Advertisement
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) :************************************************************

This topic is closed to new replies.

Advertisement