Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 7 developers from Canada and 17 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


(solved) lost device recovery, strange behaviour


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 cozzie   Members   -  Reputation: 3434

Like
0Likes
Like

Posted 07 December 2012 - 03:01 PM

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);

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;
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..


Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me


Sponsor:

#2 kubera   Members   -  Reputation: 1181

Like
0Likes
Like

Posted 08 December 2012 - 09:01 AM

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:
Microsoft's forums

#3 cozzie   Members   -  Reputation: 3434

Like
0Likes
Like

Posted 08 December 2012 - 02:08 PM

thanks

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS