diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h index 254c36d7..2035f2d0 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h @@ -159,13 +159,13 @@ #define SDL_VIDEO_DRIVER_COCOA 1 #define SDL_VIDEO_DRIVER_DUMMY 1 #undef SDL_VIDEO_DRIVER_X11 -#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib" +#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/opt/X11/lib/libX11.6.dylib" +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/opt/X11/lib/libXext.6.dylib" +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/opt/X11/lib/libXinerama.1.dylib" +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/opt/X11/lib/libXi.6.dylib" +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/opt/X11/lib/libXrandr.2.dylib" +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/opt/X11/lib/libXss.1.dylib" +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/opt/X11/lib/libXxf86vm.1.dylib" #define SDL_VIDEO_DRIVER_X11_XDBE 1 #define SDL_VIDEO_DRIVER_X11_XINERAMA 1 #define SDL_VIDEO_DRIVER_X11_XRANDR 1 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_windows.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_windows.h index 72dcafbc..cae9902d 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_windows.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_windows.h @@ -84,7 +84,6 @@ typedef unsigned int uintptr_t; #define HAVE_XINPUT_H 1 #define HAVE_MMDEVICEAPI_H 1 #define HAVE_AUDIOCLIENT_H 1 -#define HAVE_ENDPOINTVOLUME_H 1 /* This is disabled by default to avoid C runtime dependencies and manifest requirements */ #ifdef HAVE_LIBC @@ -139,7 +138,7 @@ typedef unsigned int uintptr_t; #define HAVE_ATAN2 1 #define HAVE_ATAN2F 1 #define HAVE_CEILF 1 -#define HAVE__COPYSIGN 1 +#define HAVE__COPYSIGN 1 #define HAVE_COS 1 #define HAVE_COSF 1 #define HAVE_EXP 1 @@ -168,7 +167,7 @@ typedef unsigned int uintptr_t; #define HAVE_STRTOLL 1 #define HAVE_VSSCANF 1 #define HAVE_SCALBN 1 -#define HAVE_SCALBNF 1 +#define HAVE_SCALBNF 1 #endif /* This function is available with at least the VC++ 2008 C runtime library */ #if _MSC_VER >= 1400 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_winrt.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_winrt.h index c825c7f8..8eeeb512 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_winrt.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_winrt.h @@ -100,7 +100,6 @@ typedef unsigned int uintptr_t; #define HAVE_MMDEVICEAPI_H 1 #define HAVE_AUDIOCLIENT_H 1 -#define HAVE_ENDPOINTVOLUME_H 1 #define HAVE_LIBC 1 #define STDC_HEADERS 1 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h index efbf6ff0..2d094e88 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h @@ -186,6 +186,11 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void); */ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void); +/** + * This function returns true if the CPU has ARM SIMD (ARMv6) features. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void); + /** * This function returns true if the CPU has NEON (ARM SIMD) features. */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_endian.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_endian.h index 54d5d486..1e6daae1 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_endian.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_endian.h @@ -42,10 +42,13 @@ #ifdef __linux__ #include #define SDL_BYTEORDER __BYTE_ORDER -#else /* __linux__ */ +#elif defined(__OpenBSD__) +#include +#define SDL_BYTEORDER BYTE_ORDER +#else #if defined(__hppa__) || \ defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \ - (defined(__MIPS__) && defined(__MISPEB__)) || \ + (defined(__MIPS__) && defined(__MIPSEB__)) || \ defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \ defined(__sparc__) #define SDL_BYTEORDER SDL_BIG_ENDIAN diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h index 9f75189d..7703095c 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h @@ -488,6 +488,29 @@ extern "C" { */ #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT" +/** + * \brief If set, game controller face buttons report their values according to their labels instead of their positional layout. + * + * For example, on Nintendo Switch controllers, normally you'd get: + * + * (Y) + * (X) (B) + * (A) + * + * but if this hint is set, you'll get: + * + * (X) + * (Y) (A) + * (B) + * + * The variable can be set to the following values: + * "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. + */ +#define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS" + /** * \brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background. * diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keycode.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keycode.h index 3bceb418..64b72dd3 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keycode.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keycode.h @@ -47,7 +47,7 @@ typedef Sint32 SDL_Keycode; #define SDLK_SCANCODE_MASK (1<<30) #define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK) -enum +typedef enum { SDLK_UNKNOWN = 0, @@ -317,7 +317,7 @@ enum SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND), SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD) -}; +} SDL_KeyCode; /** * \brief Enumeration of valid key mods (possibly OR'd together). diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_log.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_log.h index 40f768d5..430e4fd0 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_log.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_log.h @@ -61,7 +61,7 @@ extern "C" { * at the VERBOSE level and all other categories are enabled at the * CRITICAL level. */ -enum +typedef enum { SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_CATEGORY_ERROR, @@ -94,7 +94,7 @@ enum }; */ SDL_LOG_CATEGORY_CUSTOM -}; +} SDL_LogCategory; /** * \brief The predefined log priorities diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_messagebox.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_messagebox.h index afa5a13d..bf50deb9 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_messagebox.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_messagebox.h @@ -40,7 +40,7 @@ typedef enum SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */ SDL_MESSAGEBOX_INFORMATION = 0x00000040, /**< informational dialog */ SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT = 0x00000080, /**< buttons placed left to right */ - SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100, /**< buttons placed right to left */ + SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100 /**< buttons placed right to left */ } SDL_MessageBoxFlags; /** diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_pixels.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_pixels.h index dcb7a980..2e2b05c7 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_pixels.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_pixels.h @@ -48,7 +48,7 @@ extern "C" { /* @} */ /** Pixel type. */ -enum +typedef enum { SDL_PIXELTYPE_UNKNOWN, SDL_PIXELTYPE_INDEX1, @@ -62,18 +62,18 @@ enum SDL_PIXELTYPE_ARRAYU32, SDL_PIXELTYPE_ARRAYF16, SDL_PIXELTYPE_ARRAYF32 -}; +} SDL_PixelType; /** Bitmap pixel order, high bit -> low bit. */ -enum +typedef enum { SDL_BITMAPORDER_NONE, SDL_BITMAPORDER_4321, SDL_BITMAPORDER_1234 -}; +} SDL_BitmapOrder; /** Packed component order, high bit -> low bit. */ -enum +typedef enum { SDL_PACKEDORDER_NONE, SDL_PACKEDORDER_XRGB, @@ -84,12 +84,12 @@ enum SDL_PACKEDORDER_BGRX, SDL_PACKEDORDER_ABGR, SDL_PACKEDORDER_BGRA -}; +} SDL_PackedOrder; /** Array component order, low byte -> high byte. */ /* !!! FIXME: in 2.1, make these not overlap differently with !!! FIXME: SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */ -enum +typedef enum { SDL_ARRAYORDER_NONE, SDL_ARRAYORDER_RGB, @@ -98,10 +98,10 @@ enum SDL_ARRAYORDER_BGR, SDL_ARRAYORDER_BGRA, SDL_ARRAYORDER_ABGR -}; +} SDL_ArrayOrder; /** Packed component layout. */ -enum +typedef enum { SDL_PACKEDLAYOUT_NONE, SDL_PACKEDLAYOUT_332, @@ -112,7 +112,7 @@ enum SDL_PACKEDLAYOUT_8888, SDL_PACKEDLAYOUT_2101010, SDL_PACKEDLAYOUT_1010102 -}; +} SDL_PackedLayout; #define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D) diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_render.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_render.h index 096b4a57..c2a995af 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_render.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_render.h @@ -430,10 +430,31 @@ extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture, const SDL_Rect * rect, void **pixels, int *pitch); +/** + * \brief Lock a portion of the texture for write-only pixel access. + * Expose it as a SDL surface. + * + * \param texture The texture to lock for access, which was created with + * ::SDL_TEXTUREACCESS_STREAMING. + * \param rect A pointer to the rectangle to lock for access. If the rect + * is NULL, the entire texture will be locked. + * \param surface This is filled in with a SDL surface representing the locked area + * Surface is freed internally after calling SDL_UnlockTexture or SDL_DestroyTexture. + * + * \return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING. + * + * \sa SDL_UnlockTexture() + */ +extern DECLSPEC int SDLCALL SDL_LockTextureToSurface(SDL_Texture *texture, + const SDL_Rect *rect, + SDL_Surface **surface); + /** * \brief Unlock a texture, uploading the changes to video memory, if needed. + * If SDL_LockTextureToSurface() was called for locking, the SDL surface is freed. * * \sa SDL_LockTexture() + * \sa SDL_LockTextureToSurface() */ extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture); diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h index 0c592047..978401cd 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h @@ -1,2 +1,2 @@ -#define SDL_REVISION "hg-13074:2ede888544ac" -#define SDL_REVISION_NUMBER 13074 +#define SDL_REVISION "hg-13226:294f9fc96e56" +#define SDL_REVISION_NUMBER 13226 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_version.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_version.h index 6c7499d3..69b02706 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_version.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_version.h @@ -59,7 +59,7 @@ typedef struct SDL_version */ #define SDL_MAJOR_VERSION 2 #define SDL_MINOR_VERSION 0 -#define SDL_PATCHLEVEL 10 +#define SDL_PATCHLEVEL 11 /** * \brief Macro to determine SDL version program was compiled against. diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h index 352afd43..c1bb7527 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h @@ -96,7 +96,6 @@ typedef struct SDL_Window SDL_Window; */ typedef enum { - /* !!! FIXME: change this to name = (1<CFBundlePackageType FMWK CFBundleShortVersionString - 2.0.10 + 2.0.11 CFBundleSignature SDLX CFBundleSupportedPlatforms @@ -27,7 +27,7 @@ MacOSX CFBundleVersion - 2.0.10 + 2.0.11 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild diff --git a/MacOSX/SDL2.framework/Versions/A/SDL2 b/MacOSX/SDL2.framework/Versions/A/SDL2 index c4348769..735b878f 100755 Binary files a/MacOSX/SDL2.framework/Versions/A/SDL2 and b/MacOSX/SDL2.framework/Versions/A/SDL2 differ diff --git a/Windows/SDL2/include/SDL_config_macosx.h b/Windows/SDL2/include/SDL_config_macosx.h index 254c36d7..2035f2d0 100644 --- a/Windows/SDL2/include/SDL_config_macosx.h +++ b/Windows/SDL2/include/SDL_config_macosx.h @@ -159,13 +159,13 @@ #define SDL_VIDEO_DRIVER_COCOA 1 #define SDL_VIDEO_DRIVER_DUMMY 1 #undef SDL_VIDEO_DRIVER_X11 -#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib" +#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/opt/X11/lib/libX11.6.dylib" +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/opt/X11/lib/libXext.6.dylib" +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/opt/X11/lib/libXinerama.1.dylib" +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/opt/X11/lib/libXi.6.dylib" +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/opt/X11/lib/libXrandr.2.dylib" +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/opt/X11/lib/libXss.1.dylib" +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/opt/X11/lib/libXxf86vm.1.dylib" #define SDL_VIDEO_DRIVER_X11_XDBE 1 #define SDL_VIDEO_DRIVER_X11_XINERAMA 1 #define SDL_VIDEO_DRIVER_X11_XRANDR 1 diff --git a/Windows/SDL2/include/SDL_config_windows.h b/Windows/SDL2/include/SDL_config_windows.h index 72dcafbc..cae9902d 100644 --- a/Windows/SDL2/include/SDL_config_windows.h +++ b/Windows/SDL2/include/SDL_config_windows.h @@ -84,7 +84,6 @@ typedef unsigned int uintptr_t; #define HAVE_XINPUT_H 1 #define HAVE_MMDEVICEAPI_H 1 #define HAVE_AUDIOCLIENT_H 1 -#define HAVE_ENDPOINTVOLUME_H 1 /* This is disabled by default to avoid C runtime dependencies and manifest requirements */ #ifdef HAVE_LIBC @@ -139,7 +138,7 @@ typedef unsigned int uintptr_t; #define HAVE_ATAN2 1 #define HAVE_ATAN2F 1 #define HAVE_CEILF 1 -#define HAVE__COPYSIGN 1 +#define HAVE__COPYSIGN 1 #define HAVE_COS 1 #define HAVE_COSF 1 #define HAVE_EXP 1 @@ -168,7 +167,7 @@ typedef unsigned int uintptr_t; #define HAVE_STRTOLL 1 #define HAVE_VSSCANF 1 #define HAVE_SCALBN 1 -#define HAVE_SCALBNF 1 +#define HAVE_SCALBNF 1 #endif /* This function is available with at least the VC++ 2008 C runtime library */ #if _MSC_VER >= 1400 diff --git a/Windows/SDL2/include/SDL_config_winrt.h b/Windows/SDL2/include/SDL_config_winrt.h index c825c7f8..8eeeb512 100644 --- a/Windows/SDL2/include/SDL_config_winrt.h +++ b/Windows/SDL2/include/SDL_config_winrt.h @@ -100,7 +100,6 @@ typedef unsigned int uintptr_t; #define HAVE_MMDEVICEAPI_H 1 #define HAVE_AUDIOCLIENT_H 1 -#define HAVE_ENDPOINTVOLUME_H 1 #define HAVE_LIBC 1 #define STDC_HEADERS 1 diff --git a/Windows/SDL2/include/SDL_cpuinfo.h b/Windows/SDL2/include/SDL_cpuinfo.h index efbf6ff0..2d094e88 100644 --- a/Windows/SDL2/include/SDL_cpuinfo.h +++ b/Windows/SDL2/include/SDL_cpuinfo.h @@ -186,6 +186,11 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void); */ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void); +/** + * This function returns true if the CPU has ARM SIMD (ARMv6) features. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void); + /** * This function returns true if the CPU has NEON (ARM SIMD) features. */ diff --git a/Windows/SDL2/include/SDL_endian.h b/Windows/SDL2/include/SDL_endian.h index 54d5d486..1e6daae1 100644 --- a/Windows/SDL2/include/SDL_endian.h +++ b/Windows/SDL2/include/SDL_endian.h @@ -42,10 +42,13 @@ #ifdef __linux__ #include #define SDL_BYTEORDER __BYTE_ORDER -#else /* __linux__ */ +#elif defined(__OpenBSD__) +#include +#define SDL_BYTEORDER BYTE_ORDER +#else #if defined(__hppa__) || \ defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \ - (defined(__MIPS__) && defined(__MISPEB__)) || \ + (defined(__MIPS__) && defined(__MIPSEB__)) || \ defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \ defined(__sparc__) #define SDL_BYTEORDER SDL_BIG_ENDIAN diff --git a/Windows/SDL2/include/SDL_hints.h b/Windows/SDL2/include/SDL_hints.h index 9f75189d..7703095c 100644 --- a/Windows/SDL2/include/SDL_hints.h +++ b/Windows/SDL2/include/SDL_hints.h @@ -488,6 +488,29 @@ extern "C" { */ #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT" +/** + * \brief If set, game controller face buttons report their values according to their labels instead of their positional layout. + * + * For example, on Nintendo Switch controllers, normally you'd get: + * + * (Y) + * (X) (B) + * (A) + * + * but if this hint is set, you'll get: + * + * (X) + * (Y) (A) + * (B) + * + * The variable can be set to the following values: + * "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. + */ +#define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS" + /** * \brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background. * diff --git a/Windows/SDL2/include/SDL_keycode.h b/Windows/SDL2/include/SDL_keycode.h index 3bceb418..64b72dd3 100644 --- a/Windows/SDL2/include/SDL_keycode.h +++ b/Windows/SDL2/include/SDL_keycode.h @@ -47,7 +47,7 @@ typedef Sint32 SDL_Keycode; #define SDLK_SCANCODE_MASK (1<<30) #define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK) -enum +typedef enum { SDLK_UNKNOWN = 0, @@ -317,7 +317,7 @@ enum SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND), SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD) -}; +} SDL_KeyCode; /** * \brief Enumeration of valid key mods (possibly OR'd together). diff --git a/Windows/SDL2/include/SDL_log.h b/Windows/SDL2/include/SDL_log.h index 40f768d5..430e4fd0 100644 --- a/Windows/SDL2/include/SDL_log.h +++ b/Windows/SDL2/include/SDL_log.h @@ -61,7 +61,7 @@ extern "C" { * at the VERBOSE level and all other categories are enabled at the * CRITICAL level. */ -enum +typedef enum { SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_CATEGORY_ERROR, @@ -94,7 +94,7 @@ enum }; */ SDL_LOG_CATEGORY_CUSTOM -}; +} SDL_LogCategory; /** * \brief The predefined log priorities diff --git a/Windows/SDL2/include/SDL_messagebox.h b/Windows/SDL2/include/SDL_messagebox.h index afa5a13d..bf50deb9 100644 --- a/Windows/SDL2/include/SDL_messagebox.h +++ b/Windows/SDL2/include/SDL_messagebox.h @@ -40,7 +40,7 @@ typedef enum SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */ SDL_MESSAGEBOX_INFORMATION = 0x00000040, /**< informational dialog */ SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT = 0x00000080, /**< buttons placed left to right */ - SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100, /**< buttons placed right to left */ + SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100 /**< buttons placed right to left */ } SDL_MessageBoxFlags; /** diff --git a/Windows/SDL2/include/SDL_pixels.h b/Windows/SDL2/include/SDL_pixels.h index dcb7a980..2e2b05c7 100644 --- a/Windows/SDL2/include/SDL_pixels.h +++ b/Windows/SDL2/include/SDL_pixels.h @@ -48,7 +48,7 @@ extern "C" { /* @} */ /** Pixel type. */ -enum +typedef enum { SDL_PIXELTYPE_UNKNOWN, SDL_PIXELTYPE_INDEX1, @@ -62,18 +62,18 @@ enum SDL_PIXELTYPE_ARRAYU32, SDL_PIXELTYPE_ARRAYF16, SDL_PIXELTYPE_ARRAYF32 -}; +} SDL_PixelType; /** Bitmap pixel order, high bit -> low bit. */ -enum +typedef enum { SDL_BITMAPORDER_NONE, SDL_BITMAPORDER_4321, SDL_BITMAPORDER_1234 -}; +} SDL_BitmapOrder; /** Packed component order, high bit -> low bit. */ -enum +typedef enum { SDL_PACKEDORDER_NONE, SDL_PACKEDORDER_XRGB, @@ -84,12 +84,12 @@ enum SDL_PACKEDORDER_BGRX, SDL_PACKEDORDER_ABGR, SDL_PACKEDORDER_BGRA -}; +} SDL_PackedOrder; /** Array component order, low byte -> high byte. */ /* !!! FIXME: in 2.1, make these not overlap differently with !!! FIXME: SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */ -enum +typedef enum { SDL_ARRAYORDER_NONE, SDL_ARRAYORDER_RGB, @@ -98,10 +98,10 @@ enum SDL_ARRAYORDER_BGR, SDL_ARRAYORDER_BGRA, SDL_ARRAYORDER_ABGR -}; +} SDL_ArrayOrder; /** Packed component layout. */ -enum +typedef enum { SDL_PACKEDLAYOUT_NONE, SDL_PACKEDLAYOUT_332, @@ -112,7 +112,7 @@ enum SDL_PACKEDLAYOUT_8888, SDL_PACKEDLAYOUT_2101010, SDL_PACKEDLAYOUT_1010102 -}; +} SDL_PackedLayout; #define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D) diff --git a/Windows/SDL2/include/SDL_render.h b/Windows/SDL2/include/SDL_render.h index 096b4a57..c2a995af 100644 --- a/Windows/SDL2/include/SDL_render.h +++ b/Windows/SDL2/include/SDL_render.h @@ -430,10 +430,31 @@ extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture, const SDL_Rect * rect, void **pixels, int *pitch); +/** + * \brief Lock a portion of the texture for write-only pixel access. + * Expose it as a SDL surface. + * + * \param texture The texture to lock for access, which was created with + * ::SDL_TEXTUREACCESS_STREAMING. + * \param rect A pointer to the rectangle to lock for access. If the rect + * is NULL, the entire texture will be locked. + * \param surface This is filled in with a SDL surface representing the locked area + * Surface is freed internally after calling SDL_UnlockTexture or SDL_DestroyTexture. + * + * \return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING. + * + * \sa SDL_UnlockTexture() + */ +extern DECLSPEC int SDLCALL SDL_LockTextureToSurface(SDL_Texture *texture, + const SDL_Rect *rect, + SDL_Surface **surface); + /** * \brief Unlock a texture, uploading the changes to video memory, if needed. + * If SDL_LockTextureToSurface() was called for locking, the SDL surface is freed. * * \sa SDL_LockTexture() + * \sa SDL_LockTextureToSurface() */ extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture); diff --git a/Windows/SDL2/include/SDL_revision.h b/Windows/SDL2/include/SDL_revision.h index 0c592047..978401cd 100644 --- a/Windows/SDL2/include/SDL_revision.h +++ b/Windows/SDL2/include/SDL_revision.h @@ -1,2 +1,2 @@ -#define SDL_REVISION "hg-13074:2ede888544ac" -#define SDL_REVISION_NUMBER 13074 +#define SDL_REVISION "hg-13226:294f9fc96e56" +#define SDL_REVISION_NUMBER 13226 diff --git a/Windows/SDL2/include/SDL_version.h b/Windows/SDL2/include/SDL_version.h index 6c7499d3..69b02706 100644 --- a/Windows/SDL2/include/SDL_version.h +++ b/Windows/SDL2/include/SDL_version.h @@ -59,7 +59,7 @@ typedef struct SDL_version */ #define SDL_MAJOR_VERSION 2 #define SDL_MINOR_VERSION 0 -#define SDL_PATCHLEVEL 10 +#define SDL_PATCHLEVEL 11 /** * \brief Macro to determine SDL version program was compiled against. diff --git a/Windows/SDL2/include/SDL_video.h b/Windows/SDL2/include/SDL_video.h index 352afd43..c1bb7527 100644 --- a/Windows/SDL2/include/SDL_video.h +++ b/Windows/SDL2/include/SDL_video.h @@ -96,7 +96,6 @@ typedef struct SDL_Window SDL_Window; */ typedef enum { - /* !!! FIXME: change this to name = (1<