Jump to content
  • Advertisement
Ryan Pavely

3D Looking for VB.NET DX9 (device lost) help

Recommended Posts

I have an old game (Beyond Protocol) that is written in VB.NET.  The game is aged but works well.  Since the begining, 10 years ago, switching from windowed to full screen, or changing the windowed resolution always pops a critical error on device reset.  I've debugged all I can and have reached a lack of understanding as to where to go from here.

Is there anyone out there with legacy VB.NET and DX9 knowledge that could lend me a hand?

Thanks in advance.

 

== Here is where it errors ==

                Dim uParms As PresentParameters = CreatePresentationParams(mfrmMain)
                If uParms Is Nothing Then Return False
                moDevice.Reset(uParms)

==

the last line pops a object not referenced exception yet moDEvice is valid, with details, and uParams is valid with details.

 

Oddly after several resets it eventually corrects itself.

Share this post


Link to post
Share on other sites
Advertisement

Lost devices are a pain to handle, mostly because you need to release everything that isn't in the default pool or Reset() will fail. You can enable the debug runtime from the DirectX control panel (which only works on Windows 7 or earlier) to get a better error message.

Your other option is to use D3D9Ex, which avoids almost all lost device issues. See https://docs.microsoft.com/en-gb/windows/win32/direct3d9/dx9lh

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!