Wiki Page Content

Differences between revisions 10 and 11
Revision 10 as of 2010-07-23 05:37:37
Size: 1475
Editor: SheenaSmith
Comment: remove macro (replaced w/ its own page)
Revision 11 as of 2010-07-23 18:59:25
Size: 1104
Editor: SheenaSmith
Comment: update content
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
||Uint8 ||'''patch''' ||update version || ||Uint8 ||'''patch''' ||update version ^(patchlevel)^||
Line 28: Line 28:
== Related Macros ==
 .[[SDL_COMPILEDVERSION]]
 .[[SDL_VERSION]]
 .[[SDL_VERSIONNUM]]
 .[[SDL_VERSION_ATLEAST]]
Line 31: Line 37:
== Related Macros ==
 .[[SDL_VERSIONNUM]]
This macro turns the version numbers into a numeric value:
 {{{(1,2,3) -> (1203)}}}
{{{#!highlight cpp
SDL_VERSIONNUM(X, Y, Z)
((X)*1000 + (Y)*100 + (Z))
}}}
 * This assumes that there will never be more than 100 patchlevels.
<<BR>>


 .[[SDL_VERSION_ATLEAST]]
This macro will evaluate to true if compiled with SDL at least X.Y.Z.
{{{#!highlight cpp
SDL_VERSION_ATLEAST(X, Y, Z) \
(SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
}}}
<<BR>>

DRAFT

SDL_version

A structure that contains information about the version of SDL in use.

Data Fields

Uint8

major

major version

Uint8

minor

minor version

Uint8

patch

update version (patchlevel)

Code Examples

SDL_version compiled;
SDL_version linked;

SDL_VERSION(&compiled);
SDL_GetVersion(&linked);
printf("We compiled against SDL version %d.%d.%d ...\n",
       compiled.major, compiled.minor, compiled.patch);
printf("But we are linking against SDL version %d.%d.%d.\n",
       linked.major, linked.minor, linked.patch);

Remarks

Represents the library's version as three levels:

  • major revision (increments with massive changes, additions, and enhancements)
  • minor revision (increments with backwards-compatible changes to the major revision), and
  • patchlevel (increments with fixes to the minor revision)

The macro SDL_VERSION can be used to populate this structure with information.


CategoryStruct

None: SDL_version (last edited 2010-09-03 00:19:43 by SheenaSmith)

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