IDirect3D9Ex::GetAdapterModeCountEx 

IDirect3D9Ex::GetAdapterModeCountEx

This method returns the number of display modes available.

  UINT 
  GetAdapterModeCountEx(
  UINT Adapter,
  CONST D3DDISPLAYMODEFILTER* pFilter
);

Parameters

  • Adapter
    Ordinal number denoting the display adapter from which to retrieve the display mode count.
  • pFilter
    See D3DDISPLAYMODEFILTER.

Return Values

The number of display modes available. A return of value zero from this method is an indication that no such display mode is supported or simply this monitor is no longer available.

Remarks

Events such as display mode changes on other heads of the same hardware, monitor change or its connection status change, and desktop extension/unextension could all affect the number of display mode available.

To fullscreen applications, S_PRESENT_MODE_CHANGED returned from IDirect3DDevice9Ex::PresentEx or IDirect3DDevice9Ex::CheckDeviceState is the indication of display mode setting failure due to those events.

To increase the chance of setting a currently available display mode successfully, fullscreen applications should try to requery the available display mode list upon receiving S_PRESENT_MODE_CHANGED.

See Also

IDirect3D9Ex Interface