sdlGetRenderOutputSize function render
Get the output size in pixels of a rendering context.
This returns the true output size in pixels, ignoring any render targets or logical size and presentation.
For the output size of the current rendering target, with logical size adjustments, use SDL_GetCurrentRenderOutputSize() instead.
\param renderer the rendering context. \param w a pointer filled in with the width in pixels. \param h a pointer filled in with the height in pixels. \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.2.0.
\sa SDL_GetCurrentRenderOutputSize
extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderOutputSize(SDL_Renderer *renderer, int *w, int *h)
Implementation
bool sdlGetRenderOutputSize(
Pointer<SdlRenderer> renderer,
Pointer<Int32> w,
Pointer<Int32> h,
) {
final sdlGetRenderOutputSizeLookupFunction = _libSdl
.lookupFunction<
Uint8 Function(
Pointer<SdlRenderer> renderer,
Pointer<Int32> w,
Pointer<Int32> h,
),
int Function(
Pointer<SdlRenderer> renderer,
Pointer<Int32> w,
Pointer<Int32> h,
)
>('SDL_GetRenderOutputSize');
return sdlGetRenderOutputSizeLookupFunction(renderer, w, h) == 1;
}