Squashed 'external/SDL/' changes from 95c3ee77c10..b7362850534
b7362850534 examples/renderer/08-rotating-textures: Fix compiler warning on MSVC . 37d62deca16 examples/renderer/10-geometry: Fixes and cleanups. 0758b2a0c4c examples: Added renderer/10-geometry 1a90e092623 examples: Added renderer/09-scaling-textures 4fdeb6861bd examples: a few renderer fixes. 66b92e95acf examples: renamed renderer sources to match other example directories. ffcf372d275 examples: Added renderer/08-rotating-textures 0c7334cce39 examples: Added renderer/07-streaming-textures 2bd3d9cfb7b examples: Added renderer/06-textures 9d0b3eded61 examples: added renderer/05-rectangles 3413617cb64 examples: added renderer/04-points b0e528cc88a Switched ifdef from negative to positive 97d1056e16d GPU: MSAA fixes (#10917) 254b36361e5 Add SDL_PRILL? format specifiers specifically for long long type. 6f80d47d64d Use hexidecimal code for ± 4392233007d Removed tabs from headers 89c6bc5f502 Prefer Vulkan even on Windows (#10912) 980b4ff6dbe GPU: Vulkan descriptor management rewrite (#10910) fcb8a2c016c wayland: Fix animated cursor timing ea2e2e451d1 Better fix for initializing Android environment variables 095fb5f5221 Fixed infinite recursion at startup on Android 88a01fbc964 testautomation_stdlib.c: fix -Wformat warnings from mingw with %lld/%llu b4e2777820c examples/renderer/03-lines: Fix compiler warning on Visual Studio. 2e3e5abd7d4 examples/renderer/03-lines: use a gray background. fd0ce75e2ea tests: Fix tests when run with the --high-pixel-density flag 745d5e4991d examples/renderer/03-lines: Make this less obnoxious to look at. 1b266ec13d3 examples: added renderer/03-lines 6771a6020da testcamera: don't enable verbose logging 594edb6bd29 Add Thrustmaster TMX VID & PID to wheel device list. 34c60113607 Fixed Windows build d29a0e3f310 Fixed warning: no previous prototype for function 7a924b36aeb compile_shaders.sh shouldn't be in the SDL framework 1f727b61f3c Sync SDL3 wiki -> header 398dff7c259 Added support for the HORI licensed Steam Controller 481203c074d Fixed Xcode warnings 7edf7fad664 fix bool define when SDL_DEFINE_STDBOOL is defined: ff90570a3cf define SDL_DEFINE_STDBOOL for gcc < 3 git-subtree-dir: external/SDL git-subtree-split: b7362850534295f076c19f7f8bffa06e530d0968
This commit is contained in:
@@ -224,8 +224,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
||||
hard-coded at address 0xffff0fa0
|
||||
*/
|
||||
typedef void (*SDL_KernelMemoryBarrierFunc)();
|
||||
#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
|
||||
#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
|
||||
#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
|
||||
#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
|
||||
#else
|
||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
|
||||
@@ -490,7 +490,7 @@ typedef enum SDL_GPUTextureType
|
||||
SDL_GPU_TEXTURETYPE_2D_ARRAY, /**< The texture is a 2-dimensional array image. */
|
||||
SDL_GPU_TEXTURETYPE_3D, /**< The texture is a 3-dimensional image. */
|
||||
SDL_GPU_TEXTURETYPE_CUBE, /**< The texture is a cube image. */
|
||||
SDL_GPU_TEXTURETYPE_CUBE_ARRAY /**< The texture is a cube array image. */
|
||||
SDL_GPU_TEXTURETYPE_CUBE_ARRAY /**< The texture is a cube array image. */
|
||||
} SDL_GPUTextureType;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1654,6 +1654,17 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK "SDL_JOYSTICK_HIDAPI_STEAMDECK"
|
||||
|
||||
/**
|
||||
* A variable controlling whether the HIDAPI driver for HORI licensed Steam
|
||||
* 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_STEAM_HORI "SDL_JOYSTICK_HIDAPI_STEAM_HORI"
|
||||
|
||||
/**
|
||||
* A variable controlling whether the HIDAPI driver for Nintendo Switch
|
||||
* controllers should be used.
|
||||
|
||||
@@ -123,7 +123,7 @@ typedef Uint32 SDL_Keycode;
|
||||
#define SDLK_RIGHTBRACE 0x0000007du /* '}' */
|
||||
#define SDLK_TILDE 0x0000007eu /* '~' */
|
||||
#define SDLK_DELETE 0x0000007fu /* '\x7F' */
|
||||
#define SDLK_PLUSMINUS 0x000000b1u /* '±' */
|
||||
#define SDLK_PLUSMINUS 0x000000b1u /* '\xB1' */
|
||||
#define SDLK_CAPSLOCK 0x40000039u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK) */
|
||||
#define SDLK_F1 0x4000003au /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1) */
|
||||
#define SDLK_F2 0x4000003bu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2) */
|
||||
|
||||
@@ -38,6 +38,10 @@
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1910)
|
||||
#define SDL_DEFINE_STDBOOL
|
||||
#endif
|
||||
/* gcc-2.95 had non-standard stdbool.h */
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3)
|
||||
#define SDL_DEFINE_STDBOOL
|
||||
#endif
|
||||
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#include <inttypes.h>
|
||||
@@ -47,7 +51,7 @@
|
||||
#ifdef SDL_DEFINE_STDBOOL
|
||||
#ifndef __bool_true_false_are_defined
|
||||
#define __bool_true_false_are_defined 1
|
||||
#define bool int8_t
|
||||
#define bool uint8_t
|
||||
#define false 0
|
||||
#define true 1
|
||||
#endif
|
||||
@@ -96,6 +100,25 @@ void *alloca(size_t);
|
||||
# define SDL_SIZE_MAX ((size_t) -1)
|
||||
#endif
|
||||
|
||||
#ifndef SDL_COMPILE_TIME_ASSERT
|
||||
#if defined(__cplusplus)
|
||||
/* Keep C++ case alone: Some versions of gcc will define __STDC_VERSION__ even when compiling in C++ mode. */
|
||||
#if (__cplusplus >= 201103L)
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x)
|
||||
#endif
|
||||
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 202311L)
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x)
|
||||
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) _Static_assert(x, #x)
|
||||
#endif
|
||||
#endif /* !SDL_COMPILE_TIME_ASSERT */
|
||||
|
||||
#ifndef SDL_COMPILE_TIME_ASSERT
|
||||
/* universal, but may trigger -Wunused-local-typedefs */
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) \
|
||||
typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Check if the compiler supports a given builtin.
|
||||
* Supported by virtually all clang versions and recent gcc. Use this
|
||||
@@ -404,7 +427,7 @@ typedef Sint64 SDL_Time;
|
||||
/* @} *//* Floating-point constants */
|
||||
|
||||
/* Make sure we have macros for printing width-based integers.
|
||||
* <stdint.h> should define these but this is not true all platforms.
|
||||
* <inttypes.h> should define these but this is not true all platforms.
|
||||
* (for example win32) */
|
||||
#ifndef SDL_PRIs64
|
||||
#if defined(SDL_PLATFORM_WINDOWS)
|
||||
@@ -478,6 +501,25 @@ typedef Sint64 SDL_Time;
|
||||
#define SDL_PRIX32 "X"
|
||||
#endif
|
||||
#endif
|
||||
/* Specifically for the `long long` -- SDL-specific. */
|
||||
#ifdef SDL_PLATFORM_WINDOWS
|
||||
SDL_COMPILE_TIME_ASSERT(longlong_size64, sizeof(long long) == 8); /* using I64 for windows - make sure `long long` is 64 bits. */
|
||||
#define SDL_PRILL_PREFIX "I64"
|
||||
#else
|
||||
#define SDL_PRILL_PREFIX "ll"
|
||||
#endif
|
||||
#ifndef SDL_PRILLd
|
||||
#define SDL_PRILLd SDL_PRILL_PREFIX "d"
|
||||
#endif
|
||||
#ifndef SDL_PRILLu
|
||||
#define SDL_PRILLu SDL_PRILL_PREFIX "u"
|
||||
#endif
|
||||
#ifndef SDL_PRILLx
|
||||
#define SDL_PRILLx SDL_PRILL_PREFIX "x"
|
||||
#endif
|
||||
#ifndef SDL_PRILLX
|
||||
#define SDL_PRILLX SDL_PRILL_PREFIX "X"
|
||||
#endif
|
||||
|
||||
/* Annotations to help code analysis tools */
|
||||
#ifdef SDL_DISABLE_ANALYZE_MACROS
|
||||
@@ -535,25 +577,6 @@ typedef Sint64 SDL_Time;
|
||||
#endif
|
||||
#endif /* SDL_DISABLE_ANALYZE_MACROS */
|
||||
|
||||
#ifndef SDL_COMPILE_TIME_ASSERT
|
||||
#if defined(__cplusplus)
|
||||
/* Keep C++ case alone: Some versions of gcc will define __STDC_VERSION__ even when compiling in C++ mode. */
|
||||
#if (__cplusplus >= 201103L)
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x)
|
||||
#endif
|
||||
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 202311L)
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x)
|
||||
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) _Static_assert(x, #x)
|
||||
#endif
|
||||
#endif /* !SDL_COMPILE_TIME_ASSERT */
|
||||
|
||||
#ifndef SDL_COMPILE_TIME_ASSERT
|
||||
/* universal, but may trigger -Wunused-local-typedefs */
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) \
|
||||
typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
|
||||
#endif
|
||||
|
||||
/** \cond */
|
||||
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
|
||||
SDL_COMPILE_TIME_ASSERT(bool_size, sizeof(bool) == 1);
|
||||
|
||||
Reference in New Issue
Block a user