-
-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deps: Update SDL for Windows to 2.30.4
- Loading branch information
Showing
94 changed files
with
750 additions
and
2,723 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2022 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2022 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -55,6 +55,8 @@ assert can have unique static variables associated with it. | |
#define SDL_TriggerBreakpoint() __builtin_debugtrap() | ||
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) ) | ||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" ) | ||
#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv) | ||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" ) | ||
#elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */ | ||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" ) | ||
#elif defined(__APPLE__) && defined(__arm__) | ||
|
@@ -125,12 +127,10 @@ typedef struct SDL_AssertData | |
const struct SDL_AssertData *next; | ||
} SDL_AssertData; | ||
|
||
#if (SDL_ASSERT_LEVEL > 0) | ||
|
||
/* Never call this directly. Use the SDL_assert* macros. */ | ||
extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *, | ||
const char *, | ||
const char *, int) | ||
const char *, | ||
const char *, int) | ||
#if defined(__clang__) | ||
#if __has_feature(attribute_analyzer_noreturn) | ||
/* this tells Clang's static analysis that we're a custom assert function, | ||
|
@@ -151,9 +151,7 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *, | |
#define SDL_enabled_assert(condition) \ | ||
do { \ | ||
while ( !(condition) ) { \ | ||
static struct SDL_AssertData sdl_assert_data = { \ | ||
0, 0, #condition, 0, 0, 0, 0 \ | ||
}; \ | ||
static struct SDL_AssertData sdl_assert_data = { 0, 0, #condition, 0, 0, 0, 0 }; \ | ||
const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \ | ||
if (sdl_assert_state == SDL_ASSERTION_RETRY) { \ | ||
continue; /* go again. */ \ | ||
|
@@ -164,8 +162,6 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *, | |
} \ | ||
} while (SDL_NULL_WHILE_LOOP_CONDITION) | ||
|
||
#endif /* enabled assertions support code */ | ||
|
||
/* Enable various levels of assertions. */ | ||
#if SDL_ASSERT_LEVEL == 0 /* assertions disabled */ | ||
# define SDL_assert(condition) SDL_disabled_assert(condition) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2022 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -209,7 +209,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)(); | |
#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") | ||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory") | ||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__) | ||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) | ||
#ifdef __thumb__ | ||
/* The mcr instruction isn't available in thumb mode, use real functions */ | ||
#define SDL_MEMORY_BARRIER_USES_FUNCTION | ||
|
@@ -240,7 +240,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)(); | |
/* "REP NOP" is PAUSE, coded for tools that don't know it by that name. */ | ||
#if (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__)) | ||
#define SDL_CPUPauseInstruction() __asm__ __volatile__("pause\n") /* Some assemblers can't do REP NOP, so go with PAUSE. */ | ||
#elif (defined(__arm__) && __ARM_ARCH >= 7) || defined(__aarch64__) | ||
#elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7) || defined(__aarch64__) | ||
#define SDL_CPUPauseInstruction() __asm__ __volatile__("yield" ::: "memory") | ||
#elif (defined(__powerpc__) || defined(__powerpc64__)) | ||
#define SDL_CPUPauseInstruction() __asm__ __volatile__("or 27,27,27"); | ||
|
@@ -249,9 +249,8 @@ typedef void (*SDL_KernelMemoryBarrierFunc)(); | |
#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) | ||
#define SDL_CPUPauseInstruction() __yield() | ||
#elif defined(__WATCOMC__) && defined(__386__) | ||
/* watcom assembler rejects PAUSE if CPU < i686, and it refuses REP NOP as an invalid combination. Hardcode the bytes. */ | ||
extern __inline void SDL_CPUPauseInstruction(void); | ||
#pragma aux SDL_CPUPauseInstruction = "db 0f3h,90h" | ||
#pragma aux SDL_CPUPauseInstruction = ".686p" ".xmm2" "pause" | ||
#else | ||
#define SDL_CPUPauseInstruction() | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2022 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -169,13 +169,13 @@ typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream, | |
* The calculated values in this structure are calculated by SDL_OpenAudio(). | ||
* | ||
* For multi-channel audio, the default SDL channel mapping is: | ||
* 2: FL FR (stereo) | ||
* 3: FL FR LFE (2.1 surround) | ||
* 4: FL FR BL BR (quad) | ||
* 5: FL FR LFE BL BR (4.1 surround) | ||
* 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR) | ||
* 7: FL FR FC LFE BC SL SR (6.1 surround) | ||
* 8: FL FR FC LFE BL BR SL SR (7.1 surround) | ||
* 2: FL FR (stereo) | ||
* 3: FL FR LFE (2.1 surround) | ||
* 4: FL FR BL BR (quad) | ||
* 5: FL FR LFE BL BR (4.1 surround) | ||
* 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR) | ||
* 7: FL FR FC LFE BC SL SR (6.1 surround) | ||
* 8: FL FR FC LFE BL BR SL SR (7.1 surround) | ||
*/ | ||
typedef struct SDL_AudioSpec | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2022 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2022 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -52,7 +52,7 @@ typedef enum | |
dstA = dstA */ | ||
SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply | ||
dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)) | ||
dstA = (srcA * dstA) + (dstA * (1-srcA)) */ | ||
dstA = dstA */ | ||
SDL_BLENDMODE_INVALID = 0x7FFFFFFF | ||
|
||
/* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */ | ||
|
@@ -65,8 +65,8 @@ typedef enum | |
typedef enum | ||
{ | ||
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */ | ||
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */ | ||
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */ | ||
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */ | ||
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */ | ||
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */ | ||
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */ | ||
} SDL_BlendOperation; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2022 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2022 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -52,7 +52,7 @@ | |
|
||
/* This is a set of defines to configure the SDL features */ | ||
|
||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H) | ||
#if !defined(HAVE_STDINT_H) && !defined(_STDINT_H_) | ||
/* Most everything except Visual Studio 2008 and earlier has stdint.h now */ | ||
#if defined(_MSC_VER) && (_MSC_VER < 1600) | ||
typedef signed __int8 int8_t; | ||
|
@@ -99,9 +99,11 @@ typedef unsigned int uintptr_t; | |
#define HAVE_D3D11_H 1 | ||
#define HAVE_ROAPI_H 1 | ||
#endif | ||
#if defined(WDK_NTDDI_VERSION) && WDK_NTDDI_VERSION > 0x0A000008 /* 10.0.19041.0 */ | ||
#if defined(__has_include) | ||
#if __has_include(<d3d12.h>) && __has_include(<d3d12sdklayers.h>) | ||
#define HAVE_D3D12_H 1 | ||
#endif | ||
#endif | ||
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0603 /* Windows 8.1 SDK */ | ||
#define HAVE_SHELLSCALINGAPI_H 1 | ||
#endif | ||
|
Oops, something went wrong.