sdlGetRenderLogicalPresentationRect function
Get the final presentation rectangle for rendering.
This function returns the calculated rectangle used for logical presentation, based on the presentation mode and output size. If logical presentation is disabled, it will fill the rectangle with the output size, in pixels.
\param renderer the rendering context. \param rect a pointer filled in with the final presentation rectangle, may be NULL. \returns true on success or false 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_SetRenderLogicalPresentation
extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderLogicalPresentationRect(SDL_Renderer *renderer, SDL_FRect *rect)
Implementation
bool sdlGetRenderLogicalPresentationRect(
Pointer<SdlRenderer> renderer, Pointer<SdlFRect> rect) {
final sdlGetRenderLogicalPresentationRectLookupFunction =
libSdl3.lookupFunction<
Uint8 Function(Pointer<SdlRenderer> renderer, Pointer<SdlFRect> rect),
int Function(Pointer<SdlRenderer> renderer,
Pointer<SdlFRect> rect)>('SDL_GetRenderLogicalPresentationRect');
return sdlGetRenderLogicalPresentationRectLookupFunction(renderer, rect) == 1;
}