sdlRenderGetLogicalSize function

void sdlRenderGetLogicalSize(
  1. Pointer<SdlRenderer> renderer,
  2. Pointer<Int32> w,
  3. Pointer<Int32> h
)

Get device independent resolution for rendering.

When using the main rendering target (eg no target texture is set): this may return 0 for w and h if the SDL_Renderer has never had its logical size set by SDL_RenderSetLogicalSize(). Otherwise it returns the logical width and height.

When using a target texture: Never return 0 for w and h at first. Then it returns the logical width and height that are set.

\param renderer a rendering context \param w an int to be filled with the width \param h an int to be filled with the height

\since This function is available since SDL 2.0.0.

\sa SDL_RenderSetLogicalSize

extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h)

Implementation

void sdlRenderGetLogicalSize(
    Pointer<SdlRenderer> renderer, Pointer<Int32> w, Pointer<Int32> h) {
  final sdlRenderGetLogicalSizeLookupFunction = libSdl2.lookupFunction<
      Void Function(
          Pointer<SdlRenderer> renderer, Pointer<Int32> w, Pointer<Int32> h),
      void Function(Pointer<SdlRenderer> renderer, Pointer<Int32> w,
          Pointer<Int32> h)>('SDL_RenderGetLogicalSize');
  return sdlRenderGetLogicalSizeLookupFunction(renderer, w, h);
}