sdlGetDisplayForPoint function

int sdlGetDisplayForPoint(
  1. Pointer<SdlPoint> point
)

Get the display containing a point.

\param point the point to query. \returns the instance ID of the display containing the point or 0 on failure; call SDL_GetError() for more information.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.1.3.

\sa SDL_GetDisplayBounds \sa SDL_GetDisplays

extern SDL_DECLSPEC SDL_DisplayID SDLCALL SDL_GetDisplayForPoint(const SDL_Point *point)

Implementation

int sdlGetDisplayForPoint(Pointer<SdlPoint> point) {
  final sdlGetDisplayForPointLookupFunction = libSdl3.lookupFunction<
      Uint32 Function(Pointer<SdlPoint> point),
      int Function(Pointer<SdlPoint> point)>('SDL_GetDisplayForPoint');
  return sdlGetDisplayForPointLookupFunction(point);
}