|
SDL3pp
A slim C++ wrapper for SDL3
|
Functionality to query the current SDL version, both as headers the app was compiled against, and a library the app is linked to. More...
Macros | |
| #define | SDL_MAJOR_VERSION |
| The current major version of SDL headers. | |
| #define | SDL_MINOR_VERSION |
| The current minor version of the SDL headers. | |
| #define | SDL_MICRO_VERSION |
| The current micro (or patchlevel) version of the SDL headers. | |
| #define | SDL_VERSIONNUM(major, minor, patch) |
| This macro turns the version numbers into a numeric value. | |
| #define | SDL_VERSIONNUM_MAJOR(version) |
| This macro extracts the major version from a version number. | |
| #define | SDL_VERSIONNUM_MINOR(version) |
| This macro extracts the minor version from a version number. | |
| #define | SDL_VERSIONNUM_MICRO(version) |
| This macro extracts the micro version from a version number. | |
| #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. | |
| #define | SDL_VERSION_ATLEAST(X, Y, Z) |
| This macro will evaluate to true if compiled with SDL at least X.Y.Z. | |
| #define | SDL3PP_MAJOR_VERSION 0 |
| The current major version of SDL3pp wrapper. | |
| #define | SDL3PP_MINOR_VERSION 10 |
| The current minor version of SDL3pp wrapper. | |
| #define | SDL3PP_PATCH_VERSION 1 |
| The current patch version of SDL3pp wrapper. | |
| #define | SDL3PP_VERSION |
| This is the version number macro for the current SDL3pp wrapper version. | |
Functions | |
| int | SDL::GetVersion () |
| Get the version of SDL that is linked against your program. | |
| const char * | SDL::GetRevision () |
| Get the code revision of the SDL library that is linked against your program. | |
Functionality to query the current SDL version, both as headers the app was compiled against, and a library the app is linked to.
| #define SDL3PP_VERSION |
This is the version number macro for the current SDL3pp wrapper version.
| #define SDL_MAJOR_VERSION |
| #define SDL_MICRO_VERSION |
| #define SDL_MINOR_VERSION |
| #define SDL_VERSION SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION) |
| #define SDL_VERSION_ATLEAST | ( | X, | |
| Y, | |||
| Z ) |
This macro will evaluate to true if compiled with SDL at least X.Y.Z.
| #define SDL_VERSIONNUM | ( | major, | |
| minor, | |||
| 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. |
| #define SDL_VERSIONNUM_MAJOR | ( | version | ) |
This macro extracts the major version from a version number.
1002003 becomes 1.
| version | the version number. |
| #define SDL_VERSIONNUM_MICRO | ( | version | ) |
This macro extracts the micro version from a version number.
1002003 becomes 3.
| version | the version number. |
| #define SDL_VERSIONNUM_MINOR | ( | version | ) |
This macro extracts the minor version from a version number.
1002003 becomes 2.
| version | the version number. |
|
inline |
Get the code revision of the SDL library that is linked against your program.
This value is the revision of the code you are linking against and may be different from the code you are compiling with, which is found in the constant SDL_REVISION if you explicitly include SDL_revision.h
The revision is an 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.
|
inline |
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 Init().