Jump to content
  • Advertisement
Sign in to follow this  
id0001

[SlimDX] devicelost error

This topic is 3691 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 am running windows Vista, and when I am running a slimDX application and then press ctrl+alt+del my vista goes to an other screen (don't know how that screen is called but when you run vista you'll know). Now my problem is that when I return to my desktop my application gives an devicelost error where it should handle a devicelost error. this is my code:
if (_dev.Present() == Error.DeviceLost) // <-- here it gives a Direct3DException was unhandled error
            {
                IsDeviceLost = true;
            }
Is there a solution to this error? Am I doing something wrong? because I create this with only the help of the sampleframework :S Thanks in advance. ID

Share this post


Link to post
Share on other sites
Advertisement
This is the result of a glitch in the samples that we released for March. You need to tell SlimDX to not throw exceptions when a device lost occurs; we kind of forgot to put that line in. Add the following when your app starts up:
Configuration.AddResultWatch(Error.DeviceLost, ResultWatchFlags.AlwaysIgnore);
Configuration.AddResultWatch(Error.DeviceNotReset, ResultWatchFlags.AlwaysIgnore);

That's typed out from memory, so apologies if there's a mistake there, but it should stop the exception.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!