Exporter (0) Imprimer
Développer tout
EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.

IDXGIOutput::FindClosestMatchingMode method

[Starting with Direct3D 11.1, we recommend not to use FindClosestMatchingMode anymore to find the display mode that most closely matches the requested display mode. Instead, use IDXGIOutput1::FindClosestMatchingMode1, which supports stereo display mode.]

Finds the display mode that most closely matches the requested display mode.

Syntax


HRESULT FindClosestMatchingMode(
  [in]   const DXGI_MODE_DESC *pModeToMatch,
  [out]  DXGI_MODE_DESC *pClosestMatch,
  [in]   IUnknown *pConcernedDevice
);

Parameters

pModeToMatch [in]

Type: const DXGI_MODE_DESC*

The desired display mode (see DXGI_MODE_DESC). Members of DXGI_MODE_DESC can be unspecified indicating no preference for that member. A value of 0 for Width or Height indicates the value is unspecified. If either Width or Height are 0, both must be 0. A numerator and denominator of 0 in RefreshRate indicate it is unspecified. Other members of DXGI_MODE_DESC have enumeration values indicating the member is unspecified. If pConcernedDevice is NULL, Format cannot be DXGI_FORMAT_UNKNOWN.

pClosestMatch [out]

Type: DXGI_MODE_DESC*

The mode that most closely matches pModeToMatch.

pConcernedDevice [in]

Type: IUnknown*

A pointer to the Direct3D device interface. If this parameter is NULL, only modes whose format matches that of pModeToMatch will be returned; otherwise, only those formats that are supported for scan-out by the device are returned. For info about the formats that are supported for scan-out by the device at each feature level, see Hardware Support for Direct3D 10 Formats, Hardware Support for Direct3D 10.1 Formats, Hardware Support for Direct3D 10Level9 Formats, Hardware Support for Direct3D 11 Formats, and Hardware Support for Direct3D 11.1 Formats.

Return value

Type: HRESULT

Returns one of the following DXGI_ERROR.

Remarks

FindClosestMatchingMode behaves similarly to the IDXGIOutput1::FindClosestMatchingMode1 except FindClosestMatchingMode considers only the mono display modes. IDXGIOutput1::FindClosestMatchingMode1 considers only stereo modes if you set the Stereo member in the DXGI_MODE_DESC1 structure that pModeToMatch points to, and considers only mono modes if Stereo is not set.

IDXGIOutput1::FindClosestMatchingMode1 returns a matched display-mode set with only stereo modes or only mono modes. FindClosestMatchingMode behaves as though you specified the input mode as mono.

Windows Phone 8: This API is supported.

Requirements

Header

DXGI.h

Library

DXGI.lib

See also

IDXGIOutput

 

 

Ajouts de la communauté

AJOUTER
Afficher:
© 2014 Microsoft