SDL_VERSION
Name
SDL_VERSION -- macro, used to fill a pointed to version structure with the compile-time version of the SDL library.
Synopsis
#include "SDL_version.h" SDL_VERSION(SDL_version*);
Description
SDL_VERSION is a helper macro that fills out a SDL_version structure with the compile-time SDL version.
Note: The version information comes from the defines SDL_MAJOR_VERSION, SDL_MINOR_VERSION and SDL_PATCHLEVEL, so it's often simpler to use these directly.
Example
void print_SDL_version(char* preamble, SDL_version* v) {
printf("%s %u.%u.%u\n", preamble, v->major, v->minor, v->patch);
}
void print_SDL_versions() {
SDL_version ver;
SDL_VERSION(&ver);
print_SDL_version("SDL compile-time version", &ver);
ver = *SDL_Linked_Version();
print_SDL_version("SDL runtime version", &ver);
}
