Jump to content
  • Advertisement
Sign in to follow this  
Pablo Alvarez

Help with SupportedDisplayModes...

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

Hi all!! I've started working on a game engine based on Chad's CUnit, and I am facing some problems that maybe are due to the fact that I had to port the original code (MDX 2.0) to 'traditional' MDX, and probably I screwd something in the process. The fact is that I manage to render (well.. just for a few seconds, after that it crashes stating I ran out of memory due to texture trashing) but there are some 'exceptions' I found with the DX Debug output that I would like to solve. To start with, I'm facing several 'Invalid D3DDISPLAYMODEFILTER specified. GetAdapterModeCountEx returns zero' errors on the output when scanning for devices and adapters. I would not mind about them a lot, since this is only performed at the start, but these errors are preventing me for using PIX to try to solve the other, more important problems, so I had to start with this. Below is the offensing code, and the break (and the printing of the message) happens on the foreach line, evaluating a.SupportDisplayModes.
private ArrayList enumerateDisplayModes(AdapterInformation a, AdapterEnum currentAdapter)
            ArrayList adapterFormatList = new ArrayList();
            for (int i = 0; i < AdapterFormats.Length; i++)
                foreach (DisplayMode d in a.SupportedDisplayModes[AdapterFormats])

                    // Add Adapter Format used with this DisplayMode
                    if (!adapterFormatList.Contains(d.Format))
            DisplayModeSorter sorter = new DisplayModeSorter();
            return adapterFormatList;

Any tips or clues regardin this would be really appreciated!! TIA

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.

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!