• Advertisement
Sign in to follow this  

(solved) lost device recovery, strange behaviour

This topic is 1867 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, I'm struggling with implementating lost device catching in combination with alt+tab not working when in debug mode only (working in retail mode). I catch a possible D3DERR_DEVICELOST exception from the 'Present' call in my render function, setting mDeviceLost to true. Here's the code of my WM_ACTIVATE situation (windowproc); [source lang="cpp"] case WM_ACTIVATE: if(LOWORD(wParam) == WA_INACTIVE) { active = false; } else { if(_d3d.mDeviceLost) { if(_d3d.mD3ddev->TestCooperativeLevel() != D3D_OK) { _d3d.ResetDevice(); _d3d.LoadScene(&_scene, &_d3dscene, &_d3dcam); } // Sleep(10); // while(true) // { // HRESULT hr = _d3d.mD3ddev->TestCooperativeLevel(); // if(hr == D3DERR_DEVICENOTRESET) _d3d.ResetDevice(); // if(hr == D3DERR_DRIVERINTERNALERROR) PostQuitMessage(WM_QUIT); // if(hr == D3D_OK) // { // _d3d.LoadScene(&_scene, &_d3dscene, &_d3dcam); // active = true; // break; // } // } } active = true; } break; [/source] The active code is working when in retail mode (not debug), the code now marked as comment is not working (which I would expect). During startup in fullscreen, I also see the following error in my d3d debug (might be causing that alt+tab doesn't work in debug, only in retail mode): Direct3D9: :StartExclusiveMode Direct3D9: :WM_DISPLAYCHANGE: 1600x900x32 Direct3D9: (ERROR) :Lost due to display uniqueness change Any help is appreciated, maybe both questions are strongly related..

Share this post


Link to post
Share on other sites
Advertisement
You would consider investigating the DXUT framework.
(not DXUT11, because this version has a weak support of Direct3D9c)

Another option would be asking Microsoft's experts and advanced professionals in that site:
[url="http://xboxforums.create.msdn.com/forums/default.aspx?GroupID=7"]Microsoft's forums[/url]

Share this post


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

  • Advertisement