We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2017

Summary: Adding some version macros like for SDL
Product: SDL_mixer Reporter: Martin Gerhardy <martin.gerhardy>
Component: miscAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2    
Version: unspecified   
Hardware: All   
OS: All   

Description Martin Gerhardy 2013-08-06 04:48:44 UTC
It would be great to get some version macros as we have them for SDL, too.

Some function prototypes had changes for SDL_mixer 2.0, too.

/**
 *  This is the version number macro for the current SDL_mixer version.
 */
#define SDL_MIXER_COMPILEDVERSION \
    SDL_VERSIONNUM(SDL_MIXER_MAJOR_VERSION, SDL_MIXER_MINOR_VERSION, SDL_MIXER_PATCHLEVEL)

/**
 *  This macro will evaluate to true if compiled with SDL_mixer at least X.Y.Z.
 */
#define SDL_MIXER_VERSION_ATLEAST(X, Y, Z) \
    (SDL_MIXER_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
Comment 1 Sam Lantinga 2017-10-21 22:05:24 UTC
Added, thanks!
https://hg.libsdl.org/SDL_mixer/rev/dd6b29358ea3