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#include "SDL3pp_error.h"
6#include "SDL3pp_stdinc.h"
7
8namespace SDL {
9
19#ifdef SDL3PP_DOC
20
28#define SDL_MAJOR_VERSION
29
37#define SDL_MINOR_VERSION
38
46#define SDL_MICRO_VERSION
47
59#define SDL_VERSIONNUM(major, minor, patch) \
60 ((major) * 1000000 + (minor) * 1000 + (patch))
61
71#define SDL_VERSIONNUM_MAJOR(version) ((version) / 1000000)
72
82#define SDL_VERSIONNUM_MINOR(version) (((version) / 1000) % 1000)
83
93#define SDL_VERSIONNUM_MICRO(version) ((version) % 1000)
94
102#define SDL_VERSION \
103 SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION)
104
110#define SDL_VERSION_ATLEAST(X, Y, Z) (SDL_VERSION >= SDL_VERSIONNUM(X, Y, Z))
111
112#endif // SDL3PP_DOC
113
130inline int GetVersion() { return SDL_GetVersion(); }
131
156inline const char* GetRevision() { return SDL_GetRevision(); }
157
159
160} // namespace SDL
161
162#endif /* SDL3PP_VERSION_H_ */
int GetVersion()
Get the version of SDL that is linked against your program.
Definition SDL3pp_version.h:130
const char * GetRevision()
Get the code revision of SDL that is linked against your program.
Definition SDL3pp_version.h:156
the main namespace where all SDL3pp public functions and types live
Definition SDL3pp_assert.h:7