mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-16 11:25:46 -04:00
dep: Update SDL2 to 2.24.2
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -58,8 +58,8 @@ typedef struct SDL_version
|
||||
/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
|
||||
*/
|
||||
#define SDL_MAJOR_VERSION 2
|
||||
#define SDL_MINOR_VERSION 0
|
||||
#define SDL_PATCHLEVEL 16
|
||||
#define SDL_MINOR_VERSION 24
|
||||
#define SDL_PATCHLEVEL 2
|
||||
|
||||
/**
|
||||
* Macro to determine SDL version program was compiled against.
|
||||
@ -83,6 +83,8 @@ typedef struct SDL_version
|
||||
(x)->patch = SDL_PATCHLEVEL; \
|
||||
}
|
||||
|
||||
/* TODO: Remove this whole block in SDL 3 */
|
||||
#if SDL_MAJOR_VERSION < 3
|
||||
/**
|
||||
* This macro turns the version numbers into a numeric value:
|
||||
* \verbatim
|
||||
@ -90,21 +92,35 @@ typedef struct SDL_version
|
||||
\endverbatim
|
||||
*
|
||||
* This assumes that there will never be more than 100 patchlevels.
|
||||
*
|
||||
* In versions higher than 2.9.0, the minor version overflows into
|
||||
* the thousands digit: for example, 2.23.0 is encoded as 4300,
|
||||
* and 2.255.99 would be encoded as 25799.
|
||||
* This macro will not be available in SDL 3.x.
|
||||
*/
|
||||
#define SDL_VERSIONNUM(X, Y, Z) \
|
||||
((X)*1000 + (Y)*100 + (Z))
|
||||
|
||||
/**
|
||||
* This is the version number macro for the current SDL version.
|
||||
*
|
||||
* In versions higher than 2.9.0, the minor version overflows into
|
||||
* the thousands digit: for example, 2.23.0 is encoded as 4300.
|
||||
* This macro will not be available in SDL 3.x.
|
||||
*
|
||||
* Deprecated, use SDL_VERSION_ATLEAST or SDL_VERSION instead.
|
||||
*/
|
||||
#define SDL_COMPILEDVERSION \
|
||||
SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
|
||||
#endif /* SDL_MAJOR_VERSION < 3 */
|
||||
|
||||
/**
|
||||
* This macro will evaluate to true if compiled with SDL at least X.Y.Z.
|
||||
*/
|
||||
#define SDL_VERSION_ATLEAST(X, Y, Z) \
|
||||
(SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
|
||||
((SDL_MAJOR_VERSION >= X) && \
|
||||
(SDL_MAJOR_VERSION > X || SDL_MINOR_VERSION >= Y) && \
|
||||
(SDL_MAJOR_VERSION > X || SDL_MINOR_VERSION > Y || SDL_PATCHLEVEL >= Z))
|
||||
|
||||
/**
|
||||
* Get the version of SDL that is linked against your program.
|
||||
@ -118,6 +134,8 @@ typedef struct SDL_version
|
||||
*
|
||||
* \param ver the SDL_version structure that contains the version information
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetRevision
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);
|
||||
@ -145,6 +163,8 @@ extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);
|
||||
* \returns an arbitrary string, uniquely identifying the exact revision of
|
||||
* the SDL library in use.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetVersion
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetRevision(void);
|
||||
@ -153,10 +173,22 @@ extern DECLSPEC const char *SDLCALL SDL_GetRevision(void);
|
||||
* Obsolete function, do not use.
|
||||
*
|
||||
* When SDL was hosted in a Mercurial repository, and was built carefully,
|
||||
* this would return the revision number that the build was created from.
|
||||
* This number was not reliable for several reasons, but more importantly,
|
||||
* SDL is now hosted in a git repository, which does not offer numbers at
|
||||
* all, only hashes. This function only ever returns zero now. Don't use it.
|
||||
* this would return the revision number that the build was created from. This
|
||||
* number was not reliable for several reasons, but more importantly, SDL is
|
||||
* now hosted in a git repository, which does not offer numbers at all, only
|
||||
* hashes. This function only ever returns zero now. Don't use it.
|
||||
*
|
||||
* Before SDL 2.0.16, this might have returned an unreliable, but non-zero
|
||||
* number.
|
||||
*
|
||||
* \deprecated Use SDL_GetRevision() instead; if SDL was carefully built, it
|
||||
* will return a git hash.
|
||||
*
|
||||
* \returns zero, always, in modern SDL releases.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetRevision
|
||||
*/
|
||||
extern SDL_DEPRECATED DECLSPEC int SDLCALL SDL_GetRevisionNumber(void);
|
||||
|
||||
|
Reference in New Issue
Block a user