sdlDxgiGetOutputInfo function

bool sdlDxgiGetOutputInfo(
  1. int displayIndex,
  2. Pointer<Int32> adapterIndex,
  3. Pointer<Int32> outputIndex
)

Get the DXGI Adapter and Output indices for the specified display index.

The DXGI Adapter and Output indices can be passed to EnumAdapters and EnumOutputs respectively to get the objects required to create a DX10 or DX11 device and swap chain.

Before SDL 2.0.4 this function did not return a value. Since SDL 2.0.4 it returns an SDL_bool.

\param displayIndex the display index for which to get both indices \param adapterIndex a pointer to be filled in with the adapter index \param outputIndex a pointer to be filled in with the output index \returns SDL_TRUE on success or SDL_FALSE on failure; call SDL_GetError() for more information.

\since This function is available since SDL 2.0.2.

extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex )

Implementation

bool sdlDxgiGetOutputInfo(
    int displayIndex, Pointer<Int32> adapterIndex, Pointer<Int32> outputIndex) {
  final sdlDxgiGetOutputInfoLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Int32 displayIndex, Pointer<Int32> adapterIndex,
          Pointer<Int32> outputIndex),
      int Function(int displayIndex, Pointer<Int32> adapterIndex,
          Pointer<Int32> outputIndex)>('SDL_DXGIGetOutputInfo');
  return sdlDxgiGetOutputInfoLookupFunction(
          displayIndex, adapterIndex, outputIndex) ==
      1;
}