sdlGetRenderVSync function render

bool sdlGetRenderVSync(
  1. Pointer<SdlRenderer> renderer,
  2. Pointer<Int32> vsync
)

Get VSync of the given renderer.

\param renderer the renderer to toggle. \param vsync an int filled with the current vertical refresh sync interval. See SDL_SetRenderVSync() for the meaning of the value. \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_SetRenderVSync

extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderVSync(SDL_Renderer *renderer, int *vsync)

Implementation

bool sdlGetRenderVSync(Pointer<SdlRenderer> renderer, Pointer<Int32> vsync) {
  final sdlGetRenderVSyncLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(Pointer<SdlRenderer> renderer, Pointer<Int32> vsync),
        int Function(Pointer<SdlRenderer> renderer, Pointer<Int32> vsync)
      >('SDL_GetRenderVSync');
  return sdlGetRenderVSyncLookupFunction(renderer, vsync) == 1;
}