SDL2: rebuilt from hg-latest (r13382:7cc4fc886d9e)

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1663 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2019-12-23 21:29:17 +00:00
parent b955bc0552
commit 648cfe71ca
44 changed files with 302 additions and 14 deletions

View file

@ -71,6 +71,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1

View file

@ -71,6 +71,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1

View file

@ -74,6 +74,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1

View file

@ -110,6 +110,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
/* #undef HAVE_STRTOK_R */
#define HAVE_ITOA 1
#define HAVE__LTOA 1
#define HAVE__ULTOA 1
@ -122,12 +123,21 @@
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
#define HAVE_WCSLEN 1
#define HAVE_WCSLCPY 1
#define HAVE_WCSLCAT 1
/* #define HAVE_WCSDUP 1 */
/* #define wcsdup _wcsdup */
#define HAVE_WCSSTR 1
#define HAVE_WCSCMP 1
#define HAVE_WCSNCMP 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
#define HAVE_STRICMP 1
#define HAVE_STRCASECMP 1
#define HAVE_STRNCASECMP 1
#define HAVE_SSCANF 1
#define HAVE_SSCANF 1
#define HAVE_VSSCANF 1
#define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1
#define HAVE_SETJMP 1

View file

@ -117,6 +117,10 @@ typedef unsigned int uintptr_t;
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
/* #undef HAVE_STRTOK_R */
#if defined(_MSC_VER)
#define HAVE_STRTOK_S 1
#endif
/* These functions have security warnings, so we won't use them */
/* #undef HAVE__LTOA */
/* #undef HAVE__ULTOA */

View file

@ -130,6 +130,7 @@ typedef unsigned int uintptr_t;
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_S 1
//#define HAVE_ITOA 1 // TODO, WinRT: consider using _itoa_s instead
//#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead
//#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead

View file

@ -67,6 +67,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1

View file

@ -57,6 +57,15 @@ extern "C" {
struct _SDL_GameController;
typedef struct _SDL_GameController SDL_GameController;
typedef enum
{
SDL_CONTROLLER_TYPE_UNKNOWN = 0,
SDL_CONTROLLER_TYPE_XBOX360,
SDL_CONTROLLER_TYPE_XBOXONE,
SDL_CONTROLLER_TYPE_PS3,
SDL_CONTROLLER_TYPE_PS4,
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO
} SDL_GameControllerType;
typedef enum
{
@ -175,6 +184,12 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
*/
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
/**
* Get the type of a game controller.
* This can be called before any controllers are opened.
*/
extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(int joystick_index);
/**
* Get the mapping of a game controller.
* This can be called before any controllers are opened.
@ -199,11 +214,21 @@ extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_
*/
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid);
/**
* Return the SDL_GameController associated with a player index.
*/
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromPlayerIndex(int player_index);
/**
* Return the name for this currently opened controller
*/
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
/**
* Return the type of this currently opened controller
*/
extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller);
/**
* Get the player index of an opened game controller, or -1 if it's not available
*
@ -211,6 +236,11 @@ extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *g
*/
extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
/**
* Set the player index of an opened game controller
*/
extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index);
/**
* Get the USB vendor ID of an opened controller, if available.
* If the vendor ID isn't available this function returns 0.

View file

@ -164,6 +164,21 @@ extern "C" {
*/
#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
/**
* \brief A variable controlling whether the graphics context is externally managed.
*
* This variable can be set to the following values:
* "0" - SDL will manage graphics contexts that are attached to windows.
* "1" - Disable graphics context management on windows.
*
* By default SDL will manage OpenGL contexts in certain situations. For example, on Android the
* context will be automatically saved and restored when pausing the application. Additionally, some
* platforms will assume usage of OpenGL if Vulkan isn't used. Setting this to "1" will prevent this
* behavior, which is desireable when the application manages the graphics context, such as
* an externally managed OpenGL context or attaching a Vulkan surface to the window.
*/
#define SDL_HINT_VIDEO_EXTERNAL_CONTEXT "SDL_VIDEO_EXTERNAL_CONTEXT"
/**
* \brief A variable controlling whether the X11 VidMode extension should be used.
*
@ -507,7 +522,7 @@ extern "C" {
* "0" - Report the face buttons by position, as though they were on an Xbox controller.
* "1" - Report the face buttons by label instead of position
*
* The default value is "0". This hint may be set at any time.
* The default value is "1". This hint may be set at any time.
*/
#define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"
@ -594,6 +609,17 @@ extern "C" {
*/
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
/**
* \brief A variable controlling whether the HIDAPI driver for Nintendo GameCube controllers should be used.
*
* This variable can be set to the following values:
* "0" - HIDAPI driver is not used
* "1" - HIDAPI driver is used
*
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
*/
#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
/**
* \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
*

View file

@ -192,7 +192,12 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
/**
* Return the SDL_Joystick associated with an instance id.
*/
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID joyid);
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID instance_id);
/**
* Return the SDL_Joystick associated with a player index.
*/
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index);
/**
* Return the name for this currently opened joystick.
@ -207,6 +212,11 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
*/
extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick);
/**
* Set the player index of an opened joystick
*/
extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick * joystick, int player_index);
/**
* Return the GUID for this opened joystick
*/

View file

@ -191,6 +191,9 @@ typedef enum
SDL_PIXELFORMAT_RGB444 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
SDL_PACKEDLAYOUT_4444, 12, 2),
SDL_PIXELFORMAT_BGR444 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
SDL_PACKEDLAYOUT_4444, 12, 2),
SDL_PIXELFORMAT_RGB555 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
SDL_PACKEDLAYOUT_1555, 15, 2),

View file

@ -85,6 +85,16 @@ typedef struct SDL_RendererInfo
int max_texture_height; /**< The maximum texture height */
} SDL_RendererInfo;
/**
* \brief The scaling mode for a texture.
*/
typedef enum
{
SDL_ScaleModeNearest, /**< nearest pixel sampling */
SDL_ScaleModeLinear, /**< linear filtering */
SDL_ScaleModeBest /**< anisotropic filtering */
} SDL_ScaleMode;
/**
* \brief The access pattern allowed for a texture.
*/
@ -366,6 +376,35 @@ extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
SDL_BlendMode *blendMode);
/**
* \brief Set the scale mode used for texture scale operations.
*
* \param texture The texture to update.
* \param scaleMode ::SDL_ScaleMode to use for texture scaling.
*
* \return 0 on success, or -1 if the texture is not valid.
*
* \note If the scale mode is not supported, the closest supported mode is
* chosen.
*
* \sa SDL_GetTextureScaleMode()
*/
extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture,
SDL_ScaleMode scaleMode);
/**
* \brief Get the scale mode used for texture scale operations.
*
* \param texture The texture to query.
* \param scaleMode A pointer filled in with the current scale mode.
*
* \return 0 on success, or -1 if the texture is not valid.
*
* \sa SDL_SetTextureScaleMode()
*/
extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture,
SDL_ScaleMode *scaleMode);
/**
* \brief Update the given texture rectangle with new pixel data.
*

View file

@ -1,2 +1,2 @@
#define SDL_REVISION "hg-13229:0b98870c7f72"
#define SDL_REVISION_NUMBER 13229
#define SDL_REVISION "hg-13382:7cc4fc886d9e"
#define SDL_REVISION_NUMBER 13382

View file

@ -453,11 +453,14 @@ extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_
extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
extern DECLSPEC wchar_t *SDLCALL SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle);
extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);
extern DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen);
extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
@ -470,6 +473,7 @@ extern DECLSPEC char *SDLCALL SDL_strlwr(char *str);
extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);
extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
extern DECLSPEC char *SDLCALL SDL_strtokr(char *s1, const char *s2, char **saveptr);
extern DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str);
extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
@ -584,6 +588,7 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
#define SDL_strchr strchr
#define SDL_strrchr strrchr
#define SDL_strstr strstr
#define SDL_strtokr strtok_r
#define SDL_strcmp strcmp
#define SDL_strncmp strncmp
#define SDL_strcasecmp strcasecmp

View file

@ -132,7 +132,8 @@ typedef enum
SDL_SYSWM_WINRT,
SDL_SYSWM_ANDROID,
SDL_SYSWM_VIVANTE,
SDL_SYSWM_OS2
SDL_SYSWM_OS2,
SDL_SYSWM_HAIKU
} SDL_SYSWM_TYPE;
/**

View file

@ -71,6 +71,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1

View file

@ -71,6 +71,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1

View file

@ -74,6 +74,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1

View file

@ -110,6 +110,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
/* #undef HAVE_STRTOK_R */
#define HAVE_ITOA 1
#define HAVE__LTOA 1
#define HAVE__ULTOA 1
@ -122,12 +123,21 @@
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
#define HAVE_WCSLEN 1
#define HAVE_WCSLCPY 1
#define HAVE_WCSLCAT 1
/* #define HAVE_WCSDUP 1 */
/* #define wcsdup _wcsdup */
#define HAVE_WCSSTR 1
#define HAVE_WCSCMP 1
#define HAVE_WCSNCMP 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
#define HAVE_STRICMP 1
#define HAVE_STRCASECMP 1
#define HAVE_STRNCASECMP 1
#define HAVE_SSCANF 1
#define HAVE_SSCANF 1
#define HAVE_VSSCANF 1
#define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1
#define HAVE_SETJMP 1

View file

@ -117,6 +117,10 @@ typedef unsigned int uintptr_t;
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
/* #undef HAVE_STRTOK_R */
#if defined(_MSC_VER)
#define HAVE_STRTOK_S 1
#endif
/* These functions have security warnings, so we won't use them */
/* #undef HAVE__LTOA */
/* #undef HAVE__ULTOA */

View file

@ -130,6 +130,7 @@ typedef unsigned int uintptr_t;
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_S 1
//#define HAVE_ITOA 1 // TODO, WinRT: consider using _itoa_s instead
//#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead
//#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead

View file

@ -67,6 +67,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1

View file

@ -57,6 +57,15 @@ extern "C" {
struct _SDL_GameController;
typedef struct _SDL_GameController SDL_GameController;
typedef enum
{
SDL_CONTROLLER_TYPE_UNKNOWN = 0,
SDL_CONTROLLER_TYPE_XBOX360,
SDL_CONTROLLER_TYPE_XBOXONE,
SDL_CONTROLLER_TYPE_PS3,
SDL_CONTROLLER_TYPE_PS4,
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO
} SDL_GameControllerType;
typedef enum
{
@ -175,6 +184,12 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
*/
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
/**
* Get the type of a game controller.
* This can be called before any controllers are opened.
*/
extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(int joystick_index);
/**
* Get the mapping of a game controller.
* This can be called before any controllers are opened.
@ -199,11 +214,21 @@ extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_
*/
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid);
/**
* Return the SDL_GameController associated with a player index.
*/
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromPlayerIndex(int player_index);
/**
* Return the name for this currently opened controller
*/
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
/**
* Return the type of this currently opened controller
*/
extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller);
/**
* Get the player index of an opened game controller, or -1 if it's not available
*
@ -211,6 +236,11 @@ extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *g
*/
extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
/**
* Set the player index of an opened game controller
*/
extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index);
/**
* Get the USB vendor ID of an opened controller, if available.
* If the vendor ID isn't available this function returns 0.

View file

@ -164,6 +164,21 @@ extern "C" {
*/
#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
/**
* \brief A variable controlling whether the graphics context is externally managed.
*
* This variable can be set to the following values:
* "0" - SDL will manage graphics contexts that are attached to windows.
* "1" - Disable graphics context management on windows.
*
* By default SDL will manage OpenGL contexts in certain situations. For example, on Android the
* context will be automatically saved and restored when pausing the application. Additionally, some
* platforms will assume usage of OpenGL if Vulkan isn't used. Setting this to "1" will prevent this
* behavior, which is desireable when the application manages the graphics context, such as
* an externally managed OpenGL context or attaching a Vulkan surface to the window.
*/
#define SDL_HINT_VIDEO_EXTERNAL_CONTEXT "SDL_VIDEO_EXTERNAL_CONTEXT"
/**
* \brief A variable controlling whether the X11 VidMode extension should be used.
*
@ -507,7 +522,7 @@ extern "C" {
* "0" - Report the face buttons by position, as though they were on an Xbox controller.
* "1" - Report the face buttons by label instead of position
*
* The default value is "0". This hint may be set at any time.
* The default value is "1". This hint may be set at any time.
*/
#define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"
@ -594,6 +609,17 @@ extern "C" {
*/
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
/**
* \brief A variable controlling whether the HIDAPI driver for Nintendo GameCube controllers should be used.
*
* This variable can be set to the following values:
* "0" - HIDAPI driver is not used
* "1" - HIDAPI driver is used
*
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
*/
#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
/**
* \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
*

View file

@ -192,7 +192,12 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
/**
* Return the SDL_Joystick associated with an instance id.
*/
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID joyid);
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID instance_id);
/**
* Return the SDL_Joystick associated with a player index.
*/
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index);
/**
* Return the name for this currently opened joystick.
@ -207,6 +212,11 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
*/
extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick);
/**
* Set the player index of an opened joystick
*/
extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick * joystick, int player_index);
/**
* Return the GUID for this opened joystick
*/

View file

@ -191,6 +191,9 @@ typedef enum
SDL_PIXELFORMAT_RGB444 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
SDL_PACKEDLAYOUT_4444, 12, 2),
SDL_PIXELFORMAT_BGR444 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
SDL_PACKEDLAYOUT_4444, 12, 2),
SDL_PIXELFORMAT_RGB555 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
SDL_PACKEDLAYOUT_1555, 15, 2),

View file

@ -85,6 +85,16 @@ typedef struct SDL_RendererInfo
int max_texture_height; /**< The maximum texture height */
} SDL_RendererInfo;
/**
* \brief The scaling mode for a texture.
*/
typedef enum
{
SDL_ScaleModeNearest, /**< nearest pixel sampling */
SDL_ScaleModeLinear, /**< linear filtering */
SDL_ScaleModeBest /**< anisotropic filtering */
} SDL_ScaleMode;
/**
* \brief The access pattern allowed for a texture.
*/
@ -366,6 +376,35 @@ extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
SDL_BlendMode *blendMode);
/**
* \brief Set the scale mode used for texture scale operations.
*
* \param texture The texture to update.
* \param scaleMode ::SDL_ScaleMode to use for texture scaling.
*
* \return 0 on success, or -1 if the texture is not valid.
*
* \note If the scale mode is not supported, the closest supported mode is
* chosen.
*
* \sa SDL_GetTextureScaleMode()
*/
extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture,
SDL_ScaleMode scaleMode);
/**
* \brief Get the scale mode used for texture scale operations.
*
* \param texture The texture to query.
* \param scaleMode A pointer filled in with the current scale mode.
*
* \return 0 on success, or -1 if the texture is not valid.
*
* \sa SDL_SetTextureScaleMode()
*/
extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture,
SDL_ScaleMode *scaleMode);
/**
* \brief Update the given texture rectangle with new pixel data.
*

View file

@ -1,2 +1,2 @@
#define SDL_REVISION "hg-13229:0b98870c7f72"
#define SDL_REVISION_NUMBER 13229
#define SDL_REVISION "hg-13382:7cc4fc886d9e"
#define SDL_REVISION_NUMBER 13382

View file

@ -453,11 +453,14 @@ extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_
extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
extern DECLSPEC wchar_t *SDLCALL SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle);
extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);
extern DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen);
extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
@ -470,6 +473,7 @@ extern DECLSPEC char *SDLCALL SDL_strlwr(char *str);
extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);
extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
extern DECLSPEC char *SDLCALL SDL_strtokr(char *s1, const char *s2, char **saveptr);
extern DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str);
extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
@ -584,6 +588,7 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
#define SDL_strchr strchr
#define SDL_strrchr strrchr
#define SDL_strstr strstr
#define SDL_strtokr strtok_r
#define SDL_strcmp strcmp
#define SDL_strncmp strncmp
#define SDL_strcasecmp strcasecmp

View file

@ -132,7 +132,8 @@ typedef enum
SDL_SYSWM_WINRT,
SDL_SYSWM_ANDROID,
SDL_SYSWM_VIVANTE,
SDL_SYSWM_OS2
SDL_SYSWM_OS2,
SDL_SYSWM_HAIKU
} SDL_SYSWM_TYPE;
/**

Binary file not shown.

Binary file not shown.

View file

@ -116,6 +116,7 @@ SDL_GameControllerAddMappingsFromRW
SDL_GameControllerClose
SDL_GameControllerEventState
SDL_GameControllerFromInstanceID
SDL_GameControllerFromPlayerIndex
SDL_GameControllerGetAttached
SDL_GameControllerGetAxis
SDL_GameControllerGetAxisFromString
@ -129,6 +130,7 @@ SDL_GameControllerGetProduct
SDL_GameControllerGetProductVersion
SDL_GameControllerGetStringForAxis
SDL_GameControllerGetStringForButton
SDL_GameControllerGetType
SDL_GameControllerGetVendor
SDL_GameControllerMapping
SDL_GameControllerMappingForDeviceIndex
@ -139,6 +141,8 @@ SDL_GameControllerNameForIndex
SDL_GameControllerNumMappings
SDL_GameControllerOpen
SDL_GameControllerRumble
SDL_GameControllerSetPlayerIndex
SDL_GameControllerTypeForIndex
SDL_GameControllerUpdate
SDL_GetAssertionHandler
SDL_GetAssertionReport
@ -221,6 +225,7 @@ SDL_GetSystemRAM
SDL_GetTextureAlphaMod
SDL_GetTextureBlendMode
SDL_GetTextureColorMod
SDL_GetTextureScaleMode
SDL_GetThreadID
SDL_GetThreadName
SDL_GetTicks
@ -312,6 +317,7 @@ SDL_JoystickClose
SDL_JoystickCurrentPowerLevel
SDL_JoystickEventState
SDL_JoystickFromInstanceID
SDL_JoystickFromPlayerIndex
SDL_JoystickGetAttached
SDL_JoystickGetAxis
SDL_JoystickGetAxisInitialState
@ -343,6 +349,7 @@ SDL_JoystickNumButtons
SDL_JoystickNumHats
SDL_JoystickOpen
SDL_JoystickRumble
SDL_JoystickSetPlayerIndex
SDL_JoystickUpdate
SDL_LoadBMP_RW
SDL_LoadDollarTemplates
@ -519,6 +526,7 @@ SDL_SetTextInputRect
SDL_SetTextureAlphaMod
SDL_SetTextureBlendMode
SDL_SetTextureColorMod
SDL_SetTextureScaleMode
SDL_SetThreadPriority
SDL_SetWindowBordered
SDL_SetWindowBrightness
@ -662,6 +670,7 @@ SDL_strrchr
SDL_strrev
SDL_strstr
SDL_strtod
SDL_strtokr
SDL_strtol
SDL_strtoll
SDL_strtoul
@ -683,3 +692,5 @@ SDL_wcsdup
SDL_wcslcat
SDL_wcslcpy
SDL_wcslen
SDL_wcsncmp
SDL_wcsstr

View file

@ -113,6 +113,7 @@
++'_SDL_GameControllerClose'.'SDL2.DLL'..'SDL_GameControllerClose'
++'_SDL_GameControllerEventState'.'SDL2.DLL'..'SDL_GameControllerEventState'
++'_SDL_GameControllerFromInstanceID'.'SDL2.DLL'..'SDL_GameControllerFromInstanceID'
++'_SDL_GameControllerFromPlayerIndex'.'SDL2.DLL'..'SDL_GameControllerFromPlayerIndex'
++'_SDL_GameControllerGetAttached'.'SDL2.DLL'..'SDL_GameControllerGetAttached'
++'_SDL_GameControllerGetAxis'.'SDL2.DLL'..'SDL_GameControllerGetAxis'
++'_SDL_GameControllerGetAxisFromString'.'SDL2.DLL'..'SDL_GameControllerGetAxisFromString'
@ -126,6 +127,7 @@
++'_SDL_GameControllerGetProductVersion'.'SDL2.DLL'..'SDL_GameControllerGetProductVersion'
++'_SDL_GameControllerGetStringForAxis'.'SDL2.DLL'..'SDL_GameControllerGetStringForAxis'
++'_SDL_GameControllerGetStringForButton'.'SDL2.DLL'..'SDL_GameControllerGetStringForButton'
++'_SDL_GameControllerGetType'.'SDL2.DLL'..'SDL_GameControllerGetType'
++'_SDL_GameControllerGetVendor'.'SDL2.DLL'..'SDL_GameControllerGetVendor'
++'_SDL_GameControllerMapping'.'SDL2.DLL'..'SDL_GameControllerMapping'
++'_SDL_GameControllerMappingForDeviceIndex'.'SDL2.DLL'..'SDL_GameControllerMappingForDeviceIndex'
@ -136,6 +138,8 @@
++'_SDL_GameControllerNumMappings'.'SDL2.DLL'..'SDL_GameControllerNumMappings'
++'_SDL_GameControllerOpen'.'SDL2.DLL'..'SDL_GameControllerOpen'
++'_SDL_GameControllerRumble'.'SDL2.DLL'..'SDL_GameControllerRumble'
++'_SDL_GameControllerSetPlayerIndex'.'SDL2.DLL'..'SDL_GameControllerSetPlayerIndex'
++'_SDL_GameControllerTypeForIndex'.'SDL2.DLL'..'SDL_GameControllerTypeForIndex'
++'_SDL_GameControllerUpdate'.'SDL2.DLL'..'SDL_GameControllerUpdate'
++'_SDL_GetAssertionHandler'.'SDL2.DLL'..'SDL_GetAssertionHandler'
++'_SDL_GetAssertionReport'.'SDL2.DLL'..'SDL_GetAssertionReport'
@ -218,6 +222,7 @@
++'_SDL_GetTextureAlphaMod'.'SDL2.DLL'..'SDL_GetTextureAlphaMod'
++'_SDL_GetTextureBlendMode'.'SDL2.DLL'..'SDL_GetTextureBlendMode'
++'_SDL_GetTextureColorMod'.'SDL2.DLL'..'SDL_GetTextureColorMod'
++'_SDL_GetTextureScaleMode'.'SDL2.DLL'..'SDL_GetTextureScaleMode'
++'_SDL_GetThreadID'.'SDL2.DLL'..'SDL_GetThreadID'
++'_SDL_GetThreadName'.'SDL2.DLL'..'SDL_GetThreadName'
++'_SDL_GetTicks'.'SDL2.DLL'..'SDL_GetTicks'
@ -309,6 +314,7 @@
++'_SDL_JoystickCurrentPowerLevel'.'SDL2.DLL'..'SDL_JoystickCurrentPowerLevel'
++'_SDL_JoystickEventState'.'SDL2.DLL'..'SDL_JoystickEventState'
++'_SDL_JoystickFromInstanceID'.'SDL2.DLL'..'SDL_JoystickFromInstanceID'
++'_SDL_JoystickFromPlayerIndex'.'SDL2.DLL'..'SDL_JoystickFromPlayerIndex'
++'_SDL_JoystickGetAttached'.'SDL2.DLL'..'SDL_JoystickGetAttached'
++'_SDL_JoystickGetAxis'.'SDL2.DLL'..'SDL_JoystickGetAxis'
++'_SDL_JoystickGetAxisInitialState'.'SDL2.DLL'..'SDL_JoystickGetAxisInitialState'
@ -340,6 +346,7 @@
++'_SDL_JoystickNumHats'.'SDL2.DLL'..'SDL_JoystickNumHats'
++'_SDL_JoystickOpen'.'SDL2.DLL'..'SDL_JoystickOpen'
++'_SDL_JoystickRumble'.'SDL2.DLL'..'SDL_JoystickRumble'
++'_SDL_JoystickSetPlayerIndex'.'SDL2.DLL'..'SDL_JoystickSetPlayerIndex'
++'_SDL_JoystickUpdate'.'SDL2.DLL'..'SDL_JoystickUpdate'
++'_SDL_LoadBMP_RW'.'SDL2.DLL'..'SDL_LoadBMP_RW'
++'_SDL_LoadDollarTemplates'.'SDL2.DLL'..'SDL_LoadDollarTemplates'
@ -516,6 +523,7 @@
++'_SDL_SetTextureAlphaMod'.'SDL2.DLL'..'SDL_SetTextureAlphaMod'
++'_SDL_SetTextureBlendMode'.'SDL2.DLL'..'SDL_SetTextureBlendMode'
++'_SDL_SetTextureColorMod'.'SDL2.DLL'..'SDL_SetTextureColorMod'
++'_SDL_SetTextureScaleMode'.'SDL2.DLL'..'SDL_SetTextureScaleMode'
++'_SDL_SetThreadPriority'.'SDL2.DLL'..'SDL_SetThreadPriority'
++'_SDL_SetWindowBordered'.'SDL2.DLL'..'SDL_SetWindowBordered'
++'_SDL_SetWindowBrightness'.'SDL2.DLL'..'SDL_SetWindowBrightness'
@ -659,6 +667,7 @@
++'_SDL_strrev'.'SDL2.DLL'..'SDL_strrev'
++'_SDL_strstr'.'SDL2.DLL'..'SDL_strstr'
++'_SDL_strtod'.'SDL2.DLL'..'SDL_strtod'
++'_SDL_strtokr'.'SDL2.DLL'..'SDL_strtokr'
++'_SDL_strtol'.'SDL2.DLL'..'SDL_strtol'
++'_SDL_strtoll'.'SDL2.DLL'..'SDL_strtoll'
++'_SDL_strtoul'.'SDL2.DLL'..'SDL_strtoul'
@ -680,3 +689,5 @@
++'_SDL_wcslcat'.'SDL2.DLL'..'SDL_wcslcat'
++'_SDL_wcslcpy'.'SDL2.DLL'..'SDL_wcslcpy'
++'_SDL_wcslen'.'SDL2.DLL'..'SDL_wcslen'
++'_SDL_wcsncmp'.'SDL2.DLL'..'SDL_wcsncmp'
++'_SDL_wcsstr'.'SDL2.DLL'..'SDL_wcsstr'