SDL3pp
A slim C++ wrapper for SDL3
Toggle main menu visibility
Loading...
Searching...
No Matches
SDL3pp
SDL3pp_version.h
1
#ifndef SDL3PP_VERSION_H_
2
#define SDL3PP_VERSION_H_
3
4
#include <SDL3/SDL_version.h>
5
6
namespace
SDL
{
7
16
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
71
#define SDL_VERSIONNUM_MAJOR(version) ((version) / 1000000)
72
84
#define SDL_VERSIONNUM_MINOR(version) (((version) / 1000) % 1000)
85
97
#define SDL_VERSIONNUM_MICRO(version) ((version) % 1000)
98
108
#define SDL_VERSION \
109
SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION)
110
118
#define SDL_VERSION_ATLEAST(X, Y, Z) (SDL_VERSION >= SDL_VERSIONNUM(X, Y, Z))
119
120
#endif
// SDL3PP_DOC
121
140
inline
int
GetVersion
() {
return
SDL_GetVersion(); }
141
168
inline
const
char
*
GetRevision
() {
return
SDL_GetRevision(); }
169
171
#define SDL3PP_MAJOR_VERSION 0
172
174
#define SDL3PP_MINOR_VERSION 11
175
177
#define SDL3PP_PATCH_VERSION 3
178
180
#define SDL3PP_VERSION \
181
SDL_VERSIONNUM( \
182
SDL3PP_MAJOR_VERSION, SDL3PP_MINOR_VERSION, SDL3PP_MICRO_VERSION)
183
185
186
// Check if SDL_image is available
187
#if !defined(SDL3PP_DISABLE_IMAGE) && !defined(SDL3PP_ENABLE_IMAGE) && \
188
(__has_include(<SDL3_image/SDL_image.h>) || defined(SDL3PP_DOC))
189
#define SDL3PP_ENABLE_IMAGE
190
#endif
191
192
// Check if SDL_mixer is available
193
#if !defined(SDL3PP_DISABLE_MIXER) && !defined(SDL3PP_ENABLE_MIXER) && \
194
(__has_include(<SDL3_mixer/SDL_mixer.h>) || defined(SDL3PP_DOC))
195
#define SDL3PP_ENABLE_MIXER
196
#endif
197
198
// Check if SDL_net is available
199
#if !defined(SDL3PP_DISABLE_NET) && !defined(SDL3PP_ENABLE_NET) && \
200
(__has_include(<SDL3_net/SDL_net.h>) || defined(SDL3PP_DOC))
201
#define SDL3PP_ENABLE_NET
202
#endif
203
204
// Check if SDL_ttf is available
205
#if !defined(SDL3PP_DISABLE_TTF) && !defined(SDL3PP_ENABLE_TTF) && \
206
(__has_include(<SDL3_ttf/SDL_ttf.h>) || defined(SDL3PP_DOC))
207
#define SDL3PP_ENABLE_TTF
208
#endif
209
210
}
// namespace SDL
211
212
#endif
/* SDL3PP_VERSION_H_ */
SDL::GetVersion
int GetVersion()
Get the version of SDL that is linked against your program.
Definition
SDL3pp_version.h:140
SDL::GetRevision
const char * GetRevision()
Get the code revision of the SDL library that is linked against your program.
Definition
SDL3pp_version.h:168
SDL
Main include header for the SDL3pp library.
Generated by
1.17.0