IDirect3D9Ex::GetAdapterDisplayModeEx
IDirect3D9Ex::GetAdapterDisplayModeEx
Retrieves the current display mode of the adapter.
HRESULT GetAdapterDisplayModeEx( UINT Adapter, D3DDISPLAYMODEEX * pMode, D3DDISPLAYROTATION * pRotation );
Parameters
- Adapter
[in] Ordinal number that denotes the display adapter to query. D3DADAPTER_DEFAULT is always the primary display adapter. - pMode
[in, out] Pointer to a D3DDISPLAYMODEEX structure, to be filled with information describing the current adapter's mode. - pRotation
[in, out] Pointer to a D3DDISPLAYROTATION variable, to be filled with the amount of rotation applied to the display.
Return Values
If the method succeeds, the return value is D3D_OK.
If Adapter is out of range or pMode is invalid, this method returns D3DERR_INVALIDCALL.
Remarks
IDirect3D9Ex::GetAdapterDisplayModeEx will not return the correct format when the display is in an extended format, such as 2:10:10:10. Instead, it returns the format X8R8G8B8.
To windowed applications, S_PRESENT_MODE_CHANGED returned from IDirect3DDevice9Ex::PresentEx or IDirect3DDevice9Ex::CheckDeviceState is the indication of display mode change happened and current display mode might have different format. To avoid a color converting Present blt, windowed applications have the option of getting new display mode info via this method and adjust its swapchain format accordingly. It will return D3DERR_NOTAVAILABLE if this head is no longer part of the desktop or monitor is disconnected.
Requirements
Header: Declared in D3d9.h.