Merge commit 'a22ac9e1c8e7b1cd78aa197bf1727a9f97f74b5e' into dev
This commit is contained in:
4
external/SDL/include/SDL3/SDL_atomic.h
vendored
4
external/SDL/include/SDL3/SDL_atomic.h
vendored
@@ -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")
|
||||
|
||||
2
external/SDL/include/SDL3/SDL_gpu.h
vendored
2
external/SDL/include/SDL3/SDL_gpu.h
vendored
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
11
external/SDL/include/SDL3/SDL_hints.h
vendored
11
external/SDL/include/SDL3/SDL_hints.h
vendored
@@ -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.
|
||||
|
||||
2
external/SDL/include/SDL3/SDL_keycode.h
vendored
2
external/SDL/include/SDL3/SDL_keycode.h
vendored
@@ -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) */
|
||||
|
||||
65
external/SDL/include/SDL3/SDL_stdinc.h
vendored
65
external/SDL/include/SDL3/SDL_stdinc.h
vendored
@@ -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