Skip to content

Commit

Permalink
Added version macros for SDL_image
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 21, 2017
1 parent 101b645 commit 0e8cc7a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions SDL_image.h
Expand Up @@ -49,6 +49,18 @@ extern "C" {
(X)->patch = SDL_IMAGE_PATCHLEVEL; \
}

/**
* This is the version number macro for the current SDL_image version.
*/
#define SDL_IMAGE_COMPILEDVERSION \
SDL_VERSIONNUM(SDL_IMAGE_MAJOR_VERSION, SDL_IMAGE_MINOR_VERSION, SDL_IMAGE_PATCHLEVEL)

/**
* This macro will evaluate to true if compiled with SDL_image at least X.Y.Z.
*/
#define SDL_IMAGE_VERSION_ATLEAST(X, Y, Z) \
(SDL_IMAGE_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))

/* This function gets the version of the dynamically linked SDL_image library.
it should NOT be used to fill a version structure, instead you should
use the SDL_IMAGE_VERSION() macro.
Expand Down

0 comments on commit 0e8cc7a

Please sign in to comment.