sdlGetDirect3D9AdapterIndex function

int sdlGetDirect3D9AdapterIndex(
  1. int displayId
)

Get the D3D9 adapter index that matches the specified display.

The returned adapter index can be passed to IDirect3D9::CreateDevice and controls on which monitor a full screen application will appear.

\param displayID the instance of the display to query. \returns the D3D9 adapter index on success or -1 on failure; call SDL_GetError() for more information.

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC int SDLCALL SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID)

Implementation

int sdlGetDirect3D9AdapterIndex(int displayId) {
  final sdlGetDirect3D9AdapterIndexLookupFunction = libSdl3.lookupFunction<
      Int32 Function(Uint32 displayId),
      int Function(int displayId)>('SDL_GetDirect3D9AdapterIndex');
  return sdlGetDirect3D9AdapterIndexLookupFunction(displayId);
}