sdlGetRenderOutputSize function
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.
\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.1.3.
\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 = libSdl3.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;
}