4 * Information the version of SDL in use.
6 * Represents the library's version as three levels: major revision
7 * (increments with massive changes, additions, and enhancements),
8 * minor revision (increments with backwards-compatible changes to the
9 * major revision), and patchlevel (increments with fixes to the minor
16 PSDL_Version = ^TSDL_Version;
18 major, {**< major version *}
19 minor, {**< minor version *}
20 patch: UInt8; {**< update version *}
23 {* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
26 SDL_MAJOR_VERSION = 2;
27 SDL_MINOR_VERSION = 0;
31 * Macro to determine SDL version program was compiled against.
33 * This macro fills in a SDL_version structure with the version of the
34 * library you compiled against. This is determined by what header the
35 * compiler uses. Note that if you dynamically linked the library, you might
36 * have a slightly newer or older version at runtime. That version can be
37 * determined with SDL_GetVersion(), which, unlike SDL_VERSION(),
40 * x An instance on TSDL_Version to fill with version data.
45 procedure SDL_VERSION(Out x: TSDL_Version);
48 * This macro turns the version numbers into a numeric value:
53 * This assumes that there will never be more than 100 patchlevels.
55 function SDL_VERSIONNUM(X,Y,Z: UInt32): Cardinal;
58 * This is the version number macro for the current SDL version.
60 function SDL_COMPILEDVERSION: Cardinal;
63 * This macro will evaluate to true if compiled with SDL at least X.Y.Z.
65 function SDL_VERSION_ATLEAST(X,Y,Z: Cardinal): Boolean;
68 * Get the version of SDL that is linked against your program.
70 * If you are linking to SDL dynamically, then it is possible that the
71 * current version will be different than the version you compiled against.
72 * This function returns the current version, while SDL_VERSION() is a
73 * macro that tells you what version you compiled with.
76 * compiled: TSDL_Version;
77 * linked: TSDL_Version;
79 * SDL_VERSION(@compiled);
80 * SDL_GetVersion(@linked);
81 * WriteLn('We compiled against SDL version: ' +
82 * IntToStr(compiled.major) +
83 * IntToStr(compiled.minor) +
84 * IntToStr(compiled.patch));
85 * WriteLn('But we linked against SDL version:' +
86 * IntToStr(compiled.major) +
87 * IntToStr(compiled.minor) +
88 * IntToStr(compiled.patch));
91 * This function may be called safely at any time, even before SDL_Init().
95 procedure SDL_GetVersion(ver: PSDL_Version) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetVersion' {$ENDIF} {$ENDIF};
98 * Get the code revision of SDL that is linked against your program.
100 * Returns an arbitrary string (a hash value) uniquely identifying the
101 * exact revision of the SDL library in use, and is only useful in comparing
102 * against other revisions. It is NOT an incrementing number.
104 function SDL_GetRevision: PAnsiChar cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRevision' {$ENDIF} {$ENDIF};
107 * Get the revision number of SDL that is linked against your program.
109 * Returns a number uniquely identifying the exact revision of the SDL
110 * library in use. It is an incrementing number based on commits to
113 function SDL_GetRevisionNumber: SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRevisionNumber' {$ENDIF} {$ENDIF};