diff --git a/quakespasm/Linux/sgml/Quakespasm.sgml b/quakespasm/Linux/sgml/Quakespasm.sgml index caf9815a..848ce1c2 100644 --- a/quakespasm/Linux/sgml/Quakespasm.sgml +++ b/quakespasm/Linux/sgml/Quakespasm.sgml @@ -157,9 +157,10 @@ these patched libSDL binaries may help. Changes in 0.93.2

Lightmaps are now dynamically allocated (from QSS), and BLOCK_WIDTH/HEIGHT raised from 128 to 256. - Fixed several uncheked limits that would crash the Slayer's Testaments mod. + Fixed several uncheked limits that would crash the Slayer's Testaments mod (sf.net bug #33). Raised MAXALIASTRIS from 2048 to 4096, so that the Slayer's Testaments mod works. Fixed 'pants' and 'shirt' types so that those textures load correctly on platforms where char is unsigned by default (sf.net bug #28). + Windows audio: WASAPI-enabled SDL2 dlls function properly now. Update the third-party libraries. Other fixes/cleanups.

diff --git a/quakespasm/MacOSX/SDL.framework/Versions/A/Headers/SDL_cpuinfo.h b/quakespasm/MacOSX/SDL.framework/Versions/A/Headers/SDL_cpuinfo.h index 4200d6d1..1335b982 100644 --- a/quakespasm/MacOSX/SDL.framework/Versions/A/Headers/SDL_cpuinfo.h +++ b/quakespasm/MacOSX/SDL.framework/Versions/A/Headers/SDL_cpuinfo.h @@ -60,6 +60,12 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void); /** This function returns true if the CPU has AltiVec features */ extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(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 ARM NEON features */ +extern DECLSPEC SDL_bool SDLCALL SDL_HasARMNEON(void); + /* Ends C function definitions when using C++ */ #ifdef __cplusplus } diff --git a/quakespasm/MacOSX/SDL.framework/Versions/A/Headers/SDL_endian.h b/quakespasm/MacOSX/SDL.framework/Versions/A/Headers/SDL_endian.h index cf2b4422..953f2c0f 100644 --- a/quakespasm/MacOSX/SDL.framework/Versions/A/Headers/SDL_endian.h +++ b/quakespasm/MacOSX/SDL.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/quakespasm/MacOSX/SDL.framework/Versions/A/SDL b/quakespasm/MacOSX/SDL.framework/Versions/A/SDL index c16bcc4b..c9316d78 100755 Binary files a/quakespasm/MacOSX/SDL.framework/Versions/A/SDL and b/quakespasm/MacOSX/SDL.framework/Versions/A/SDL differ diff --git a/quakespasm/MacOSX/SDL.framework/Versions/A/devel-lite/SDLMain.m b/quakespasm/MacOSX/SDL.framework/Versions/A/devel-lite/SDLMain.m index 07db0cc5..07d392ee 100644 --- a/quakespasm/MacOSX/SDL.framework/Versions/A/devel-lite/SDLMain.m +++ b/quakespasm/MacOSX/SDL.framework/Versions/A/devel-lite/SDLMain.m @@ -20,6 +20,22 @@ /* Use this flag to determine whether we use SDLMain.nib or not */ #define SDL_USE_NIB_FILE 0 +/* Use this flag to determine whether we use CPS (docking) or not */ +#define SDL_USE_CPS 1 +#ifdef SDL_USE_CPS +/* Portions of CPS.h */ +typedef struct CPSProcessSerNum +{ + UInt32 lo; + UInt32 hi; +} CPSProcessSerNum; + +extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn); +extern OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5); +extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn); + +#endif /* SDL_USE_CPS */ + static int gArgc; static char **gArgv; static BOOL gFinderLaunch; @@ -185,7 +201,18 @@ static void CustomApplicationMain (int argc, char **argv) SDLMain *sdlMain; /* Ensure the application object is initialised */ - [[NSApplication sharedApplication] activateIgnoringOtherApps: YES]; + [NSApplication sharedApplication]; + +#ifdef SDL_USE_CPS + { + CPSProcessSerNum PSN; + /* Tell the dock about us */ + if (!CPSGetCurrentProcess(&PSN)) + if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103)) + if (!CPSSetFrontProcess(&PSN)) + [NSApplication sharedApplication]; + } +#endif /* SDL_USE_CPS */ /* Set up the menubar */ [NSApp setMainMenu:[[NSMenu alloc] init]]; @@ -318,6 +345,7 @@ static void CustomApplicationMain (int argc, char **argv) @end + #ifdef main # undef main #endif @@ -330,25 +358,16 @@ static int IsRootCwd() return (cwd && (strcmp(cwd, "/") == 0)); } -static int IsTenPointNineOrLater() -{ - /* Gestalt() is deprecated in 10.8, but I don't care. Stop using SDL 1.2. */ - SInt32 major, minor; - Gestalt(gestaltSystemVersionMajor, &major); - Gestalt(gestaltSystemVersionMinor, &minor); - return ( ((major << 16) | minor) >= ((10 << 16) | 9) ); -} - static int IsFinderLaunch(const int argc, char **argv) { - const int bIsNewerOS = IsTenPointNineOrLater(); - /* -psn_XXX is passed if we are launched from Finder in 10.8 and earlier */ - if ( (!bIsNewerOS) && (argc >= 2) && (strncmp(argv[1], "-psn", 4) == 0) ) { + /* -psn_XXX is passed if we are launched from Finder, SOMETIMES */ + if ( (argc >= 2) && (strncmp(argv[1], "-psn", 4) == 0) ) { return 1; - } else if ((bIsNewerOS) && (argc == 1) && IsRootCwd()) { + } else if ((argc == 1) && IsRootCwd()) { /* we might still be launched from the Finder; on 10.9+, you might not - get the -psn command line anymore. Check version, if there's no - command line, and if our current working directory is "/". */ + get the -psn command line anymore. If there's no + command line, and if our current working directory is "/", it + might as well be a Finder launch. */ return 1; } return 0; /* not a Finder launch. */ diff --git a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h index 254c36d7..2035f2d0 100644 --- a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h +++ b/quakespasm/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/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_windows.h b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_windows.h index 72dcafbc..cae9902d 100644 --- a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_windows.h +++ b/quakespasm/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/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_winrt.h b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_winrt.h index c825c7f8..8eeeb512 100644 --- a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_winrt.h +++ b/quakespasm/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/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h index efbf6ff0..2d094e88 100644 --- a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h +++ b/quakespasm/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/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_endian.h b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_endian.h index 54d5d486..1e6daae1 100644 --- a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_endian.h +++ b/quakespasm/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/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h index 1e1e47eb..eaf57434 100644 --- a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h +++ b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h @@ -559,7 +559,7 @@ typedef union SDL_Event { Uint32 type; /**< Event type, shared with all events */ SDL_CommonEvent common; /**< Common event data */ - SDL_DisplayEvent display; /**< Window event data */ + SDL_DisplayEvent display; /**< Display event data */ SDL_WindowEvent window; /**< Window event data */ SDL_KeyboardEvent key; /**< Keyboard event data */ SDL_TextEditingEvent edit; /**< Text editing event data */ diff --git a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h index 9f75189d..7703095c 100644 --- a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h +++ b/quakespasm/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/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keycode.h b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keycode.h index 3bceb418..64b72dd3 100644 --- a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keycode.h +++ b/quakespasm/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/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_log.h b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_log.h index 40f768d5..430e4fd0 100644 --- a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_log.h +++ b/quakespasm/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/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_messagebox.h b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_messagebox.h index afa5a13d..bf50deb9 100644 --- a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_messagebox.h +++ b/quakespasm/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/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_pixels.h b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_pixels.h index dcb7a980..2e2b05c7 100644 --- a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_pixels.h +++ b/quakespasm/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/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_render.h b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_render.h index 096b4a57..c2a995af 100644 --- a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_render.h +++ b/quakespasm/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/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h index 0c592047..4b9565d3 100644 --- a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h +++ b/quakespasm/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-13229:0b98870c7f72" +#define SDL_REVISION_NUMBER 13229 diff --git a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_version.h b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_version.h index 6c7499d3..69b02706 100644 --- a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_version.h +++ b/quakespasm/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/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h b/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h index 352afd43..c1bb7527 100644 --- a/quakespasm/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h +++ b/quakespasm/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/quakespasm/MacOSX/SDL2.framework/Versions/A/SDL2 b/quakespasm/MacOSX/SDL2.framework/Versions/A/SDL2 index c4348769..326c1a44 100755 Binary files a/quakespasm/MacOSX/SDL2.framework/Versions/A/SDL2 and b/quakespasm/MacOSX/SDL2.framework/Versions/A/SDL2 differ diff --git a/quakespasm/MacOSX/codecs/lib/libFLAC.dylib b/quakespasm/MacOSX/codecs/lib/libFLAC.dylib index fbef4dc8..face0420 100755 Binary files a/quakespasm/MacOSX/codecs/lib/libFLAC.dylib and b/quakespasm/MacOSX/codecs/lib/libFLAC.dylib differ diff --git a/quakespasm/MacOSX/codecs/lib/libmpg123.dylib b/quakespasm/MacOSX/codecs/lib/libmpg123.dylib index 95e46ca1..c6f0b282 100755 Binary files a/quakespasm/MacOSX/codecs/lib/libmpg123.dylib and b/quakespasm/MacOSX/codecs/lib/libmpg123.dylib differ diff --git a/quakespasm/MacOSX/codecs/lib/libopusfile.dylib b/quakespasm/MacOSX/codecs/lib/libopusfile.dylib index c3357cfc..c3abf290 100755 Binary files a/quakespasm/MacOSX/codecs/lib/libopusfile.dylib and b/quakespasm/MacOSX/codecs/lib/libopusfile.dylib differ diff --git a/quakespasm/Quake/gl_model.c b/quakespasm/Quake/gl_model.c index 5416ca4d..841e7ec4 100644 --- a/quakespasm/Quake/gl_model.c +++ b/quakespasm/Quake/gl_model.c @@ -907,7 +907,7 @@ void Mod_LoadLighting (lump_t *l) { if (8+l->filelen*3 == com_filesize) { - Con_DPrintf("%s loaded\n", litfilename); + Con_DPrintf2("%s loaded\n", litfilename); loadmodel->lightdata = data + 8; return; } diff --git a/quakespasm/Quake/lodepng.c b/quakespasm/Quake/lodepng.c index a71449d0..2695fcc4 100644 --- a/quakespasm/Quake/lodepng.c +++ b/quakespasm/Quake/lodepng.c @@ -95,8 +95,10 @@ void* lodepng_realloc(void* ptr, size_t new_size); void lodepng_free(void* ptr); #endif /*LODEPNG_COMPILE_ALLOCATORS*/ -#if (defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1)) ||\ - (defined(_MSC_VER) && (_MSC_VER >= 1400)) || (defined(__WATCOMC__) && (__WATCOMC__ >= 1250)) +/* restrict is not available in C90, but use it when supported by the compiler */ +#if (defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))) ||\ + (defined(_MSC_VER) && (_MSC_VER >= 1400)) || \ + (defined(__WATCOMC__) && (__WATCOMC__ >= 1250) && !defined(__cplusplus)) #define LODEPNG_RESTRICT __restrict #else #define LODEPNG_RESTRICT /* not available */ @@ -2123,7 +2125,7 @@ unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, const unsig if(!error) { *outsize = deflatesize + 6; *out = (unsigned char*)lodepng_malloc(*outsize); - if(!out) error = 83; /*alloc fail*/ + if(!*out) error = 83; /*alloc fail*/ } if(!error) { diff --git a/quakespasm/Quake/menu.c b/quakespasm/Quake/menu.c index b914e73f..9d968ddb 100644 --- a/quakespasm/Quake/menu.c +++ b/quakespasm/Quake/menu.c @@ -1795,7 +1795,7 @@ qboolean M_Quit_TextEntry (void) void M_Quit_Draw (void) //johnfitz -- modified for new quit message { char msg1[40]; - char msg2[] = "by Ozkan, Ericw & Stevenaaus"; /* msg2/msg3 are mostly [40] */ + char msg2[] = "by Ozkan Sezer, Eric Wasylishen, others";/* msg2/msg3 are mostly [40] */ char msg3[] = "Press y to quit"; int boxlen; diff --git a/quakespasm/Quake/r_brush.c b/quakespasm/Quake/r_brush.c index 806484eb..dc095fdb 100644 --- a/quakespasm/Quake/r_brush.c +++ b/quakespasm/Quake/r_brush.c @@ -728,6 +728,8 @@ int AllocBlock (int w, int h, int *x, int *y) lightmap_count++; lightmap = (struct lightmap_s *) realloc(lightmap, sizeof(*lightmap)*lightmap_count); memset(&lightmap[texnum], 0, sizeof(lightmap[texnum])); + /* FIXME: we leave 'gaps' in malloc()ed data, CRC_Block() later accesses + * that uninitialized data and valgrind complains for it. use calloc() ? */ lightmap[texnum].data = (byte *) malloc(4*LMBLOCK_WIDTH*LMBLOCK_HEIGHT); //as we're only tracking one texture, we don't need multiple copies of allocated any more. memset(allocated, 0, sizeof(allocated)); @@ -875,7 +877,7 @@ with all the surfaces from all brush models */ void GL_BuildLightmaps (void) { - char name[16]; + char name[24]; int i, j; struct lightmap_s *lm; qmodel_t *m; @@ -937,18 +939,18 @@ void GL_BuildLightmaps (void) lm->rectchange.h = 0; //johnfitz -- use texture manager - sprintf(name, "lightmap%03i",i); + sprintf(name, "lightmap%07i",i); lm->texture = TexMgr_LoadImage (cl.worldmodel, name, LMBLOCK_WIDTH, LMBLOCK_HEIGHT, SRC_LIGHTMAP, lm->data, "", (src_offset_t)lm->data, TEXPREF_LINEAR | TEXPREF_NOPICMIP); //johnfitz } //johnfitz -- warn about exceeding old limits - //Spike: note that this warning isn't accurate. - // I've doubled the lmblock dimensions, so the standard limit is more like 64/4 now. - // additionally, ericw already changed the allocation strategy, which results in false positives. - if (i >= 64) - Con_DWarning ("%i lightmaps exceeds standard limit of 64 (max = %d).\n", i, MAX_SANITY_LIGHTMAPS); + //GLQuake limit was 64 textures of 128x128. Estimate how many 128x128 textures we would need + //given that we are using lightmap_count of LMBLOCK_WIDTH x LMBLOCK_HEIGHT + i = lightmap_count * ((LMBLOCK_WIDTH / 128) * (LMBLOCK_HEIGHT / 128)); + if (i > 64) + Con_DWarning("%i lightmaps exceeds standard limit of 64.\n",i); //johnfitz } diff --git a/quakespasm/Quake/snd_sdl.c b/quakespasm/Quake/snd_sdl.c index 2dd2f8c6..6e0791b2 100644 --- a/quakespasm/Quake/snd_sdl.c +++ b/quakespasm/Quake/snd_sdl.c @@ -80,7 +80,7 @@ static void SDLCALL paint_audio (void *unused, Uint8 *stream, int len) qboolean SNDDMA_Init (dma_t *dma) { - SDL_AudioSpec desired, obtained; + SDL_AudioSpec desired; int tmp, val; char drivername[128]; @@ -91,7 +91,7 @@ qboolean SNDDMA_Init (dma_t *dma) } /* Set up the desired format */ - desired.freq = tmp = snd_mixspeed.value; + desired.freq = snd_mixspeed.value; desired.format = (loadas8bit.value) ? AUDIO_U8 : AUDIO_S16SYS; desired.channels = 2; /* = desired_channels; */ if (desired.freq <= 11025) @@ -108,39 +108,25 @@ qboolean SNDDMA_Init (dma_t *dma) desired.userdata = NULL; /* Open the audio device */ - if (SDL_OpenAudio(&desired, &obtained) == -1) + if (SDL_OpenAudio(&desired, NULL) == -1) { Con_Printf("Couldn't open SDL audio: %s\n", SDL_GetError()); SDL_QuitSubSystem(SDL_INIT_AUDIO); return false; } - /* Make sure we can support the audio format */ - switch (obtained.format) - { - case AUDIO_S8: /* maybe needed by AHI */ - case AUDIO_U8: - case AUDIO_S16SYS: - /* Supported */ - break; - default: - Con_Printf ("Unsupported audio format received (%u)\n", obtained.format); - SDL_CloseAudio(); - SDL_QuitSubSystem(SDL_INIT_AUDIO); - return false; - } - memset ((void *) dma, 0, sizeof(dma_t)); shm = dma; /* Fill the audio DMA information block */ - shm->samplebits = (obtained.format & 0xFF); /* first byte of format is bits */ - shm->signed8 = (obtained.format == AUDIO_S8); - if (obtained.freq != tmp) - Con_Printf ("Warning: Rate set (%d) didn't match requested rate (%d)!\n", obtained.freq, tmp); - shm->speed = obtained.freq; - shm->channels = obtained.channels; - tmp = (obtained.samples * obtained.channels) * 10; + /* Since we passed NULL as the 'obtained' spec to SDL_OpenAudio(), + * SDL will convert to hardware format for us if needed, hence we + * directly use the desired values here. */ + shm->samplebits = (desired.format & 0xFF); /* first byte of format is bits */ + shm->signed8 = (desired.format == AUDIO_S8); + shm->speed = desired.freq; + shm->channels = desired.channels; + tmp = (desired.samples * desired.channels) * 10; if (tmp & (tmp - 1)) { /* make it a power of two */ val = 1; @@ -154,7 +140,7 @@ qboolean SNDDMA_Init (dma_t *dma) shm->submission_chunk = 1; Con_Printf ("SDL audio spec : %d Hz, %d samples, %d channels\n", - obtained.freq, obtained.samples, obtained.channels); + desired.freq, desired.samples, desired.channels); #if defined(USE_SDL2) { const char *driver = SDL_GetCurrentAudioDriver(); diff --git a/quakespasm/Quakespasm.html b/quakespasm/Quakespasm.html index da8bba43..66f0a81d 100644 --- a/quakespasm/Quakespasm.html +++ b/quakespasm/Quakespasm.html @@ -232,7 +232,7 @@ Compile time options include

5. Known Bugs

Brightness issues should be fixed with GLSL gamma in 0.90.1, if your system supports OpenGL 2. For reference on older systems:
- + Some versions of Xorg and SDL have brightness issues.
Try setting "export SDL_VIDEO_X11_NODIRECTCOLOR=1", or if you have Xorg >= 7.5 and broken brightness, these patched libSDL binaries may help. @@ -253,9 +253,10 @@ these patched libSDL binaries may help.

  • Lightmaps are now dynamically allocated (from QSS), and BLOCK_WIDTH/HEIGHT raised from 128 to 256.
  • -
  • Fixed several uncheked limits that would crash the Slayer's Testaments mod.
  • +
  • Fixed several uncheked limits that would crash the Slayer's Testaments mod (sf.net bug #33).
  • Raised MAXALIASTRIS from 2048 to 4096, so that the Slayer's Testaments mod works.
  • Fixed 'pants' and 'shirt' types so that those textures load correctly on platforms where char is unsigned by default (sf.net bug #28).
  • +
  • Windows audio: WASAPI-enabled SDL2 dlls function properly now.
  • Update the third-party libraries. Other fixes/cleanups.

diff --git a/quakespasm/Quakespasm.txt b/quakespasm/Quakespasm.txt index ef2d037f..38c73f0f 100644 --- a/quakespasm/Quakespasm.txt +++ b/quakespasm/Quakespasm.txt @@ -295,7 +295,7 @@ BLOCK_WIDTH/HEIGHT raised from 128 to 256. o Fixed several uncheked limits that would crash the Slayer's - Testaments mod. + Testaments mod (sf.net bug #33). o Raised MAXALIASTRIS from 2048 to 4096, so that the Slayer's Testaments mod works. @@ -304,6 +304,8 @@ correctly on platforms where char is unsigned by default (sf.net bug #28). + o Windows audio: WASAPI-enabled SDL2 dlls function properly now. + o Update the third-party libraries. Other fixes/cleanups. diff --git a/quakespasm/Windows/SDL/include/SDL_cpuinfo.h b/quakespasm/Windows/SDL/include/SDL_cpuinfo.h index 4200d6d1..1335b982 100644 --- a/quakespasm/Windows/SDL/include/SDL_cpuinfo.h +++ b/quakespasm/Windows/SDL/include/SDL_cpuinfo.h @@ -60,6 +60,12 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void); /** This function returns true if the CPU has AltiVec features */ extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(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 ARM NEON features */ +extern DECLSPEC SDL_bool SDLCALL SDL_HasARMNEON(void); + /* Ends C function definitions when using C++ */ #ifdef __cplusplus } diff --git a/quakespasm/Windows/SDL/include/SDL_endian.h b/quakespasm/Windows/SDL/include/SDL_endian.h index cf2b4422..953f2c0f 100644 --- a/quakespasm/Windows/SDL/include/SDL_endian.h +++ b/quakespasm/Windows/SDL/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/quakespasm/Windows/SDL/lib/SDL.dll b/quakespasm/Windows/SDL/lib/SDL.dll index 31f89f13..59bff48b 100644 Binary files a/quakespasm/Windows/SDL/lib/SDL.dll and b/quakespasm/Windows/SDL/lib/SDL.dll differ diff --git a/quakespasm/Windows/SDL/lib/SDL.lib b/quakespasm/Windows/SDL/lib/SDL.lib index 466fe1c1..0722a5b7 100644 Binary files a/quakespasm/Windows/SDL/lib/SDL.lib and b/quakespasm/Windows/SDL/lib/SDL.lib differ diff --git a/quakespasm/Windows/SDL/lib/libSDL.dll.a b/quakespasm/Windows/SDL/lib/libSDL.dll.a index 108f13bf..0d333d47 100644 Binary files a/quakespasm/Windows/SDL/lib/libSDL.dll.a and b/quakespasm/Windows/SDL/lib/libSDL.dll.a differ diff --git a/quakespasm/Windows/SDL/lib64/SDL.dll b/quakespasm/Windows/SDL/lib64/SDL.dll index e2311657..af8b0a3d 100644 Binary files a/quakespasm/Windows/SDL/lib64/SDL.dll and b/quakespasm/Windows/SDL/lib64/SDL.dll differ diff --git a/quakespasm/Windows/SDL/lib64/SDL.lib b/quakespasm/Windows/SDL/lib64/SDL.lib index e0db8692..ae2f687f 100644 Binary files a/quakespasm/Windows/SDL/lib64/SDL.lib and b/quakespasm/Windows/SDL/lib64/SDL.lib differ diff --git a/quakespasm/Windows/SDL/lib64/libSDL.dll.a b/quakespasm/Windows/SDL/lib64/libSDL.dll.a index 5ff56a86..e82e04d5 100644 Binary files a/quakespasm/Windows/SDL/lib64/libSDL.dll.a and b/quakespasm/Windows/SDL/lib64/libSDL.dll.a differ diff --git a/quakespasm/Windows/SDL/watcom/SDL.def b/quakespasm/Windows/SDL/watcom/SDL.def index a4c6c311..751a54bc 100644 --- a/quakespasm/Windows/SDL/watcom/SDL.def +++ b/quakespasm/Windows/SDL/watcom/SDL.def @@ -82,6 +82,8 @@ SDL_GetVideoSurface SDL_GetWMInfo SDL_Has3DNow SDL_Has3DNowExt +SDL_HasARMNEON +SDL_HasARMSIMD SDL_HasAltiVec SDL_HasMMX SDL_HasMMXExt diff --git a/quakespasm/Windows/SDL/watcom/SDL.exp b/quakespasm/Windows/SDL/watcom/SDL.exp index f79fe749..726aac98 100644 --- a/quakespasm/Windows/SDL/watcom/SDL.exp +++ b/quakespasm/Windows/SDL/watcom/SDL.exp @@ -79,6 +79,8 @@ ++'_SDL_GetWMInfo'.'SDL.DLL'..'SDL_GetWMInfo' ++'_SDL_Has3DNow'.'SDL.DLL'..'SDL_Has3DNow' ++'_SDL_Has3DNowExt'.'SDL.DLL'..'SDL_Has3DNowExt' +++'_SDL_HasARMNEON'.'SDL.DLL'..'SDL_HasARMNEON' +++'_SDL_HasARMSIMD'.'SDL.DLL'..'SDL_HasARMSIMD' ++'_SDL_HasAltiVec'.'SDL.DLL'..'SDL_HasAltiVec' ++'_SDL_HasMMX'.'SDL.DLL'..'SDL_HasMMX' ++'_SDL_HasMMXExt'.'SDL.DLL'..'SDL_HasMMXExt' diff --git a/quakespasm/Windows/SDL/watcom/SDL.lib b/quakespasm/Windows/SDL/watcom/SDL.lib index d07a56ee..79c72c98 100644 Binary files a/quakespasm/Windows/SDL/watcom/SDL.lib and b/quakespasm/Windows/SDL/watcom/SDL.lib differ diff --git a/quakespasm/Windows/SDL2/WhatsNew.txt b/quakespasm/Windows/SDL2/WhatsNew.txt index faecf1d3..ef2b07b5 100644 --- a/quakespasm/Windows/SDL2/WhatsNew.txt +++ b/quakespasm/Windows/SDL2/WhatsNew.txt @@ -1,6 +1,13 @@ This is a list of major changes in SDL's version history. +--------------------------------------------------------------------------- +2.0.11/12: +--------------------------------------------------------------------------- + +General: +* Added SDL_LockTextureToSurface(), similar to SDL_LockTexture() but the locked area is exposed as a SDL surface. + --------------------------------------------------------------------------- 2.0.10: --------------------------------------------------------------------------- diff --git a/quakespasm/Windows/SDL2/bin/sdl2-config b/quakespasm/Windows/SDL2/bin/sdl2-config index c6b0b5d1..737d36f6 100755 --- a/quakespasm/Windows/SDL2/bin/sdl2-config +++ b/quakespasm/Windows/SDL2/bin/sdl2-config @@ -40,7 +40,7 @@ while test $# -gt 0; do lib_suffix=$optarg ;; --version) - echo 2.0.10 + echo 2.0.11 ;; --cflags) echo -I${prefix}/include -Dmain=SDL_main diff --git a/quakespasm/Windows/SDL2/include/SDL_config_macosx.h b/quakespasm/Windows/SDL2/include/SDL_config_macosx.h index 254c36d7..2035f2d0 100644 --- a/quakespasm/Windows/SDL2/include/SDL_config_macosx.h +++ b/quakespasm/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/quakespasm/Windows/SDL2/include/SDL_config_windows.h b/quakespasm/Windows/SDL2/include/SDL_config_windows.h index 72dcafbc..cae9902d 100644 --- a/quakespasm/Windows/SDL2/include/SDL_config_windows.h +++ b/quakespasm/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/quakespasm/Windows/SDL2/include/SDL_config_winrt.h b/quakespasm/Windows/SDL2/include/SDL_config_winrt.h index c825c7f8..8eeeb512 100644 --- a/quakespasm/Windows/SDL2/include/SDL_config_winrt.h +++ b/quakespasm/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/quakespasm/Windows/SDL2/include/SDL_cpuinfo.h b/quakespasm/Windows/SDL2/include/SDL_cpuinfo.h index efbf6ff0..2d094e88 100644 --- a/quakespasm/Windows/SDL2/include/SDL_cpuinfo.h +++ b/quakespasm/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/quakespasm/Windows/SDL2/include/SDL_endian.h b/quakespasm/Windows/SDL2/include/SDL_endian.h index 54d5d486..1e6daae1 100644 --- a/quakespasm/Windows/SDL2/include/SDL_endian.h +++ b/quakespasm/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/quakespasm/Windows/SDL2/include/SDL_events.h b/quakespasm/Windows/SDL2/include/SDL_events.h index 1e1e47eb..eaf57434 100644 --- a/quakespasm/Windows/SDL2/include/SDL_events.h +++ b/quakespasm/Windows/SDL2/include/SDL_events.h @@ -559,7 +559,7 @@ typedef union SDL_Event { Uint32 type; /**< Event type, shared with all events */ SDL_CommonEvent common; /**< Common event data */ - SDL_DisplayEvent display; /**< Window event data */ + SDL_DisplayEvent display; /**< Display event data */ SDL_WindowEvent window; /**< Window event data */ SDL_KeyboardEvent key; /**< Keyboard event data */ SDL_TextEditingEvent edit; /**< Text editing event data */ diff --git a/quakespasm/Windows/SDL2/include/SDL_hints.h b/quakespasm/Windows/SDL2/include/SDL_hints.h index 9f75189d..7703095c 100644 --- a/quakespasm/Windows/SDL2/include/SDL_hints.h +++ b/quakespasm/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/quakespasm/Windows/SDL2/include/SDL_keycode.h b/quakespasm/Windows/SDL2/include/SDL_keycode.h index 3bceb418..64b72dd3 100644 --- a/quakespasm/Windows/SDL2/include/SDL_keycode.h +++ b/quakespasm/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/quakespasm/Windows/SDL2/include/SDL_log.h b/quakespasm/Windows/SDL2/include/SDL_log.h index 40f768d5..430e4fd0 100644 --- a/quakespasm/Windows/SDL2/include/SDL_log.h +++ b/quakespasm/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/quakespasm/Windows/SDL2/include/SDL_messagebox.h b/quakespasm/Windows/SDL2/include/SDL_messagebox.h index afa5a13d..bf50deb9 100644 --- a/quakespasm/Windows/SDL2/include/SDL_messagebox.h +++ b/quakespasm/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/quakespasm/Windows/SDL2/include/SDL_pixels.h b/quakespasm/Windows/SDL2/include/SDL_pixels.h index dcb7a980..2e2b05c7 100644 --- a/quakespasm/Windows/SDL2/include/SDL_pixels.h +++ b/quakespasm/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/quakespasm/Windows/SDL2/include/SDL_render.h b/quakespasm/Windows/SDL2/include/SDL_render.h index 096b4a57..c2a995af 100644 --- a/quakespasm/Windows/SDL2/include/SDL_render.h +++ b/quakespasm/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/quakespasm/Windows/SDL2/include/SDL_revision.h b/quakespasm/Windows/SDL2/include/SDL_revision.h index 0c592047..4b9565d3 100644 --- a/quakespasm/Windows/SDL2/include/SDL_revision.h +++ b/quakespasm/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-13229:0b98870c7f72" +#define SDL_REVISION_NUMBER 13229 diff --git a/quakespasm/Windows/SDL2/include/SDL_version.h b/quakespasm/Windows/SDL2/include/SDL_version.h index 6c7499d3..69b02706 100644 --- a/quakespasm/Windows/SDL2/include/SDL_version.h +++ b/quakespasm/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/quakespasm/Windows/SDL2/include/SDL_video.h b/quakespasm/Windows/SDL2/include/SDL_video.h index 352afd43..c1bb7527 100644 --- a/quakespasm/Windows/SDL2/include/SDL_video.h +++ b/quakespasm/Windows/SDL2/include/SDL_video.h @@ -96,7 +96,6 @@ typedef struct SDL_Window SDL_Window; */ typedef enum { - /* !!! FIXME: change this to name = (1<