Scroll to navigation

SDL_GetCurrentRenderOutputSize(3) SDL3 FUNCTIONS SDL_GetCurrentRenderOutputSize(3)

NAME

SDL_GetCurrentRenderOutputSize - Get the current output size in pixels of a rendering context.

SYNOPSIS

#include <SDL3/SDL_render.h>
bool SDL_GetCurrentRenderOutputSize(SDL_Renderer *renderer, int *w, int *h);

DESCRIPTION

If a rendering target is active, this will return the size of the rendering target in pixels, otherwise return the value of SDL_GetRenderOutputSize().

Rendering target or not, the output will be adjusted by the current logical presentation state, dictated by SDL_SetRenderLogicalPresentation().

FUNCTION PARAMETERS

the rendering context.
a pointer filled in with the current width.
a pointer filled in with the current height.

RETURN VALUE

for more information.

THREAD SAFETY

This function should only be called on the main thread.

AVAILABILITY

This function is available since SDL 3.2.0.

SEE ALSO

SDL_GetRenderOutputSize(3)

SDL 3.2.14 Simple Directmedia Layer