sdlGetWindowSurfaceVSync function video

bool sdlGetWindowSurfaceVSync(
  1. Pointer<SdlWindow> window,
  2. Pointer<Int32> vsync
)

Get VSync for the window surface.

\param window the window to query. \param vsync an int filled with the current vertical refresh sync interval. See SDL_SetWindowSurfaceVSync() 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_SetWindowSurfaceVSync

extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowSurfaceVSync(SDL_Window *window, int *vsync)

Implementation

bool sdlGetWindowSurfaceVSync(Pointer<SdlWindow> window, Pointer<Int32> vsync) {
  final sdlGetWindowSurfaceVSyncLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(Pointer<SdlWindow> window, Pointer<Int32> vsync),
        int Function(Pointer<SdlWindow> window, Pointer<Int32> vsync)
      >('SDL_GetWindowSurfaceVSync');
  return sdlGetWindowSurfaceVSyncLookupFunction(window, vsync) == 1;
}