sdlGetRenderVSync function

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.1.3.

\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 = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlRenderer> renderer, Pointer<Int32> vsync),
      int Function(Pointer<SdlRenderer> renderer,
          Pointer<Int32> vsync)>('SDL_GetRenderVSync');
  return sdlGetRenderVSyncLookupFunction(renderer, vsync) == 1;
}