Skip to content

Commit 2aa5d0d

Browse files
committed
SDL_version.h: remove hardcoded version numbers.
One less thing to update every release. :) Reference Issue #205.
1 parent 7df3288 commit 2aa5d0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/SDL/SDL_version.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ typedef struct SDL_version
4343
} SDL_version;
4444

4545
#define SDL_VERSION(X) { \
46-
(X)->major = 1; \
47-
(X)->minor = 2; \
48-
(X)->patch = 54; \
46+
(X)->major = SDL_MAJOR_VERSION; \
47+
(X)->minor = SDL_MINOR_VERSION; \
48+
(X)->patch = SDL_PATCHLEVEL; \
4949
}
5050

5151
#define SDL_VERSIONNUM(X, Y, Z) ((X)*1000 + (Y)*100 + (Z))
52-
#define SDL_COMPILEDVERSION SDL_VERSIONNUM(1, 2, 54)
52+
#define SDL_COMPILEDVERSION SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
5353
#define SDL_VERSION_ATLEAST(X, Y, Z) (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
5454

5555
extern DECLSPEC const SDL_version * SDLCALL SDL_Linked_Version(void);

0 commit comments

Comments
 (0)