Sign in to follow this  

[SlimDX] devicelost error

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this