sdlGetVersion function

int sdlGetVersion()

Get the version of SDL that is linked against your program.

If you are linking to SDL dynamically, then it is possible that the current version will be different than the version you compiled against. This function returns the current version, while SDL_VERSION is the version you compiled with.

This function may be called safely at any time, even before SDL_Init().

\returns the version of the linked library.

\since This function is available since SDL 3.1.3.

\sa SDL_GetRevision

extern SDL_DECLSPEC int SDLCALL SDL_GetVersion(void)

Implementation

int sdlGetVersion() {
  final sdlGetVersionLookupFunction = libSdl3
      .lookupFunction<Int32 Function(), int Function()>('SDL_GetVersion');
  return sdlGetVersionLookupFunction();
}