   Help with SupportedDisplayModes...
  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 &lt; AdapterFormats.Length; i++)  { foreach (DisplayMode d in a.SupportedDisplayModes[AdapterFormats]) {currentAdapter.DisplayModeList.Add(d);// Add Adapter Format used with this DisplayModeif (!adapterFormatList.Contains(d.Format)){    adapterFormatList.Add(d.Format);} }  }  DisplayModeSorter sorter = new DisplayModeSorter();  currentAdapter.DisplayModeList.Sort(sorter);  return adapterFormatList;   } Any tips or clues regardin this would be really appreciated!! TIA   