SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
SDL3pp_version.h
1#ifndef SDL3PP_VERSION_H_
2#define SDL3PP_VERSION_H_
3
4#include <SDL3/SDL_version.h>
5
6namespace SDL {
7
17#ifdef SDL3PP_DOC
18
26#define SDL_MAJOR_VERSION
27
35#define SDL_MINOR_VERSION
36
44#define SDL_MICRO_VERSION
45
57#define SDL_VERSIONNUM(major, minor, patch) \
58 ((major) * 1000000 + (minor) * 1000 + (patch))
59
69#define SDL_VERSIONNUM_MAJOR(version) ((version) / 1000000)
70
80#define SDL_VERSIONNUM_MINOR(version) (((version) / 1000) % 1000)
81
91#define SDL_VERSIONNUM_MICRO(version) ((version) % 1000)
92
100#define SDL_VERSION \
101 SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION)
102
108#define SDL_VERSION_ATLEAST(X, Y, Z) (SDL_VERSION >= SDL_VERSIONNUM(X, Y, Z))
109
110#endif // SDL3PP_DOC
111
128inline int GetVersion() { return SDL_GetVersion(); }
129
154inline const char* GetRevision() { return SDL_GetRevision(); }
155
157
158} // namespace SDL
159
160#endif /* SDL3PP_VERSION_H_ */
int GetVersion()
Get the version of SDL that is linked against your program.
Definition: SDL3pp_version.h:128
const char * GetRevision()
Get the code revision of SDL that is linked against your program.
Definition: SDL3pp_version.h:154
Main include header for the SDL3pp library.