SDL Library
SDL_version.h File Reference
This header defines the current SDL version. More...
Go to the source code of this file.
Data Structures | |
struct | SDL_version |
Information the version of SDL in use. More... | |
Typedefs | |
typedef struct SDL_version | SDL_version |
Information the version of SDL in use. | |
Functions | |
DECLSPEC void SDLCALL | SDL_GetVersion (SDL_version *ver) |
Get the version of SDL that is linked against your program. | |
DECLSPEC const char *SDLCALL | SDL_GetRevision (void) |
Get the code revision of SDL that is linked against your program. | |
DECLSPEC int SDLCALL | SDL_GetRevisionNumber (void) |
Get the revision number of SDL that is linked against your program. |
Detailed Description
This header defines the current SDL version.
Definition in file SDL_version.h.
Typedef Documentation
typedef struct SDL_version SDL_version |
Information the version of SDL in use.
Represents the library's version as three levels: major revision (increments with massive changes, additions, and enhancements), minor revision (increments with backwards-compatible changes to the major revision), and patchlevel (increments with fixes to the minor revision).
- See also:
- SDL_VERSION
- SDL_GetVersion
Function Documentation
DECLSPEC const char* SDLCALL SDL_GetRevision | ( | void | ) |
Get the code revision of SDL that is linked against your program.
Returns 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.
DECLSPEC int SDLCALL SDL_GetRevisionNumber | ( | void | ) |
Get the revision number of SDL that is linked against your program.
Returns a number uniquely identifying the exact revision of the SDL library in use. It is an incrementing number based on commits to hg.libsdl.org.
DECLSPEC void SDLCALL SDL_GetVersion | ( | SDL_version * | ver ) |
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 a macro that tells you what version you compiled with.
SDL_version compiled; SDL_version linked; SDL_VERSION(&compiled); SDL_GetVersion(&linked); printf("We compiled against SDL version %d.%d.%d ...\n", compiled.major, compiled.minor, compiled.patch); printf("But we linked against SDL version %d.%d.%d.\n", linked.major, linked.minor, linked.patch);
This function may be called safely at any time, even before SDL_Init().
- See also:
- SDL_VERSION
Generated on Tue Jul 12 2022 15:10:21 by 1.7.2