sdlGetDisplayForRect function
Get the display primarily containing a rect.
\param rect the rect to query. \returns the instance ID of the display entirely containing the rect or closest to the center of the rect on success 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_GetDisplayForRect(const SDL_Rect *rect)
Implementation
int sdlGetDisplayForRect(Pointer<SdlRect> rect) {
final sdlGetDisplayForRectLookupFunction = libSdl3.lookupFunction<
Uint32 Function(Pointer<SdlRect> rect),
int Function(Pointer<SdlRect> rect)>('SDL_GetDisplayForRect');
return sdlGetDisplayForRectLookupFunction(rect);
}