sdlGetDisplayBounds function

int sdlGetDisplayBounds(
  1. int displayIndex,
  2. Pointer<SdlRect> rect
)

Get the desktop area represented by a display.

The primary display (displayIndex zero) is always located at 0,0.

\param displayIndex the index of the display to query \param rect the SDL_Rect structure filled in with the display bounds \returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.

\since This function is available since SDL 2.0.0.

\sa SDL_GetNumVideoDisplays

extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect)

Implementation

int sdlGetDisplayBounds(int displayIndex, Pointer<SdlRect> rect) {
  final sdlGetDisplayBoundsLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Int32 displayIndex, Pointer<SdlRect> rect),
      int Function(
          int displayIndex, Pointer<SdlRect> rect)>('SDL_GetDisplayBounds');
  return sdlGetDisplayBoundsLookupFunction(displayIndex, rect);
}