Jump to content
  • Advertisement
Sign in to follow this  
Mastadex

Losing Device while minimized not working - HELP

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

I spent many nights ripping out my hair trying to figure out why my engine does not lose the state when i minimize the window. Here is my code to check:
hr = D3DDevice->Present(NULL, NULL, NULL, NULL);

// Handle losing a device
if (hr == D3DERR_DEVICELOST)
{
	DeviceLost = true;
}else{
	Render();
}

hr never equals D3DERR_DEVICELOST for some reason, i cant figure it out. can you guys spare som insight on this???

Share this post


Link to post
Share on other sites
Advertisement
If you are not in full screen mode minimize the window will not cause a lost device. You should process the windows messages that tell you that your app is minimized.

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!