SDL 3.0
|
Go to the source code of this file.
Macros | |
#define | SDL_MAJOR_VERSION 3 |
#define | SDL_MINOR_VERSION 2 |
#define | SDL_MICRO_VERSION 16 |
#define | SDL_VERSIONNUM(major, minor, patch) ((major) * 1000000 + (minor) * 1000 + (patch)) |
#define | SDL_VERSIONNUM_MAJOR(version) ((version) / 1000000) |
#define | SDL_VERSIONNUM_MINOR(version) (((version) / 1000) % 1000) |
#define | SDL_VERSIONNUM_MICRO(version) ((version) % 1000) |
#define | SDL_VERSION SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION) |
#define | SDL_VERSION_ATLEAST(X, Y, Z) (SDL_VERSION >= SDL_VERSIONNUM(X, Y, Z)) |
Functions | |
int | SDL_GetVersion (void) |
const char * | SDL_GetRevision (void) |
#define SDL_MAJOR_VERSION 3 |
Functionality to query the current SDL version, both as headers the app was compiled against, and a library the app is linked to. The current major version of SDL headers.
If this were SDL version 3.2.1, this value would be 3.
Definition at line 47 of file SDL_version.h.
#define SDL_MICRO_VERSION 16 |
The current micro (or patchlevel) version of the SDL headers.
If this were SDL version 3.2.1, this value would be 1.
Definition at line 65 of file SDL_version.h.
#define SDL_MINOR_VERSION 2 |
The current minor version of the SDL headers.
If this were SDL version 3.2.1, this value would be 2.
Definition at line 56 of file SDL_version.h.
#define SDL_VERSION SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION) |
This is the version number macro for the current SDL version.
Definition at line 121 of file SDL_version.h.
#define SDL_VERSION_ATLEAST | ( | X, | |
Y, | |||
Z | |||
) | (SDL_VERSION >= SDL_VERSIONNUM(X, Y, Z)) |
This macro will evaluate to true if compiled with SDL at least X.Y.Z.
Definition at line 129 of file SDL_version.h.
#define SDL_VERSIONNUM | ( | major, | |
minor, | |||
patch | |||
) | ((major) * 1000000 + (minor) * 1000 + (patch)) |
This macro turns the version numbers into a numeric value.
(1,2,3) becomes 1002003.
major | the major version number. |
minor | the minorversion number. |
patch | the patch version number. |
Definition at line 78 of file SDL_version.h.
#define SDL_VERSIONNUM_MAJOR | ( | version | ) | ((version) / 1000000) |
This macro extracts the major version from a version number
1002003 becomes 1.
version | the version number. |
Definition at line 90 of file SDL_version.h.
#define SDL_VERSIONNUM_MICRO | ( | version | ) | ((version) % 1000) |
This macro extracts the micro version from a version number
1002003 becomes 3.
version | the version number. |
Definition at line 112 of file SDL_version.h.
#define SDL_VERSIONNUM_MINOR | ( | version | ) | (((version) / 1000) % 1000) |
This macro extracts the minor version from a version number
1002003 becomes 2.
version | the version number. |
Definition at line 101 of file SDL_version.h.
|
extern |
Get the code revision of SDL that is linked against your program.
This value is the revision of the code you are linked with and may be different from the code you are compiling with, which is found in the constant SDL_REVISION.
The revision is arbitrary string (a hash value) uniquely identifying the exact revision of the SDL library in use, and is only useful in comparing against other revisions. It is NOT an incrementing number.
If SDL wasn't built from a git repository with the appropriate tools, this will return an empty string.
You shouldn't use this function for anything but logging it for debugging purposes. The string is not intended to be reliable in any way.
|
extern |
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().