Wiki Page Content

Differences between revisions 2 and 3
Revision 2 as of 2010-08-29 20:07:48
Size: 780
Editor: SheenaSmith
Comment: update content (w/ Sam); remove 'draft' note
Revision 3 as of 2014-06-22 00:17:56
Size: 921
Editor: dthree
Comment: Added Code Example. If the wiki style is to avoid standard includes, ! is not, 1 is EXIT_FAILURE.
Deletions are marked like this. Additions are marked like this.
Line 24: Line 24:
You can add your code example here #include <iso646.h>
#include <stdlib.h>

if (not SDL_VERSION_ATLEAST(2,0,0)) {
    SDL_Log("SDL_VERSION %i not at least 2", SDL_MAJOR_VERSION);
    exit(EXIT_FAILURE);
}

SDL_VERSION_ATLEAST

Use this macro to determine whether the SDL version compiled against is at least as new as the specified version.

Syntax

SDL_VERSION_ATLEAST(X, Y, Z)

Function Parameters

X

major version

Y

minor version

Z

update version (patchlevel)

Return Value

This macro will evaluate to true if compiled with SDL version at least X.Y.Z.

Code Examples

#include <iso646.h>
#include <stdlib.h>

if (not SDL_VERSION_ATLEAST(2,0,0)) {
    SDL_Log("SDL_VERSION %i not at least 2", SDL_MAJOR_VERSION);
    exit(EXIT_FAILURE);
}

Remarks

You can add useful comments here


CategoryAPI, CategoryVersion

None: SDL_VERSION_ATLEAST (last edited 2014-06-22 00:39:48 by dthree)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit