Skip to main content
gamedev.net
🔒 Locked

Lost Devices

Started by Mike.Popoloski Jan 23, 2006 at 9:44 AM 6 replies 950+ views
Original Post
Mike.Popoloski
Mike.Popoloski
I have read the FAQ and I know what I am supposed to do to deal with resetting the device, but it just isn't working for me. I use the exact same parameters as I do to initialize the device. I have played around with it, and nothing seems to work. The return code from Reset() is always D3DERR_INVALIDCALL. The SDK doesn't say why it would return such a code, though I assume one of the parameters isn't right. At the moment I am not using any resources, so that shouldn't be a problem. If anyone could help me, that would be really great. BTW if you need to see the code, I will post it. The reason I haven't is because its just setting up a PRESENT_PARAMETERS struct that is the same as my initialization code. Thanks!
Mike Popoloski | Journal | SlimDX
Namethatnobodyelsetook
Namethatnobodyelsetook
Go to the control panel, Click DirectX, click Direct3D, click "use debug runtimes", and maybe change the slider for "Debug Output Level" to around the middle, or more. (At the top level it spits out lots of warnings, like doing matrix muls on non-aligned addresses, which you won't care about).

When you Reset, it should list what's still allocated, stopping the Reset from working. You'll now know if it's textures, Vertex Buffers, etc, which should help narrow down what the problem is. If you're using the D3DX sprite or font systems, ensure you call their Invalidate and Restore functions.
Mike.Popoloski
Mike.Popoloski
Forgive me, I have never used the Debug Runtime, but where does the debug output go? Thanks for the fast reply BTW.
Mike Popoloski | Journal | SlimDX
jollyjeffers
jollyjeffers
It'll appear in the "output" window in Visual Studio, so make sure it's visible. Other IDE's will probably have a similar mechanism for displaying other debug outputs.

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |
Mike.Popoloski
Mike.Popoloski
OK, I just ran it. I can't believe I never used the debug version before. I have another question though. In Visual Studio.NET, how ( or is it even possible ) can I dump the output on the output window to file? I looked around and couldn't find the option.
Mike Popoloski | Journal | SlimDX
Mike.Popoloski
Mike.Popoloski
It worked! Thanks so much for the help. I didn't realize that I had allocated a vertex buffer.
Mike Popoloski | Journal | SlimDX
Namethatnobodyelsetook
Namethatnobodyelsetook
Quote:
Original post by ussnewjersey4
OK, I just ran it. I can't believe I never used the debug version before. I have another question though. In Visual Studio.NET, how ( or is it even possible ) can I dump the output on the output window to file? I looked around and couldn't find the option.

Check this out. I'm sure it must support saving to disk.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.