Skip to content

Commit

Permalink
update to SDL 2.28.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fallahn committed Aug 2, 2023
1 parent 109c09f commit 7fdded4
Show file tree
Hide file tree
Showing 98 changed files with 6,953 additions and 4,883 deletions.
4 changes: 2 additions & 2 deletions crogine.sln
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ Global
{B1559428-CDF8-4797-8766-0EA62BDD6D1B}.Release|Any CPU.ActiveCfg = Release|Win32
{B1559428-CDF8-4797-8766-0EA62BDD6D1B}.Release|ARM.ActiveCfg = Release|Win32
{B1559428-CDF8-4797-8766-0EA62BDD6D1B}.Release|ARM64.ActiveCfg = Release|Win32
{B1559428-CDF8-4797-8766-0EA62BDD6D1B}.Release|x64.ActiveCfg = Release|x64
{B1559428-CDF8-4797-8766-0EA62BDD6D1B}.Release|x64.Build.0 = Release|x64
{B1559428-CDF8-4797-8766-0EA62BDD6D1B}.Release|x64.ActiveCfg = ReleaseGNS|x64
{B1559428-CDF8-4797-8766-0EA62BDD6D1B}.Release|x64.Build.0 = ReleaseGNS|x64
{B1559428-CDF8-4797-8766-0EA62BDD6D1B}.Release|x86.ActiveCfg = Release|Win32
{B1559428-CDF8-4797-8766-0EA62BDD6D1B}.Release|x86.Build.0 = Release|Win32
{B1559428-CDF8-4797-8766-0EA62BDD6D1B}.Release-asan|Any CPU.ActiveCfg = Release-asan|Win32
Expand Down
2 changes: 1 addition & 1 deletion extlibs/sdl2/include/SDL.h
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-2023 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
Expand Down
14 changes: 4 additions & 10 deletions extlibs/sdl2/include/SDL_assert.h
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-2023 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
Expand Down Expand Up @@ -125,12 +125,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,
Expand All @@ -151,9 +149,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. */ \
Expand All @@ -164,8 +160,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)
Expand Down
7 changes: 3 additions & 4 deletions extlibs/sdl2/include/SDL_atomic.h
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-2023 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
Expand Down Expand Up @@ -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");
Expand All @@ -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
Expand Down
16 changes: 8 additions & 8 deletions extlibs/sdl2/include/SDL_audio.h
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-2023 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
Expand Down Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion extlibs/sdl2/include/SDL_bits.h
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-2023 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
Expand Down
4 changes: 2 additions & 2 deletions extlibs/sdl2/include/SDL_blendmode.h
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-2023 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
Expand Down Expand Up @@ -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() */
Expand Down
49 changes: 48 additions & 1 deletion extlibs/sdl2/include/SDL_clipboard.h
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-2023 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
Expand Down Expand Up @@ -82,6 +82,53 @@ extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);

/**
* Put UTF-8 text into the primary selection.
*
* \param text the text to store in the primary selection
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.26.0.
*
* \sa SDL_GetPrimarySelectionText
* \sa SDL_HasPrimarySelectionText
*/
extern DECLSPEC int SDLCALL SDL_SetPrimarySelectionText(const char *text);

/**
* Get UTF-8 text from the primary selection, which must be freed with
* SDL_free().
*
* This functions returns empty string if there was not enough memory left for
* a copy of the primary selection's content.
*
* \returns the primary selection text on success or an empty string on
* failure; call SDL_GetError() for more information. Caller must
* call SDL_free() on the returned pointer when done with it (even if
* there was an error).
*
* \since This function is available since SDL 2.26.0.
*
* \sa SDL_HasPrimarySelectionText
* \sa SDL_SetPrimarySelectionText
*/
extern DECLSPEC char * SDLCALL SDL_GetPrimarySelectionText(void);

/**
* Query whether the primary selection exists and contains a non-empty text
* string.
*
* \returns SDL_TRUE if the primary selection has text, or SDL_FALSE if it
* does not.
*
* \since This function is available since SDL 2.26.0.
*
* \sa SDL_GetPrimarySelectionText
* \sa SDL_SetPrimarySelectionText
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasPrimarySelectionText(void);


/* Ends C function definitions when using C++ */
#ifdef __cplusplus
Expand Down
34 changes: 7 additions & 27 deletions extlibs/sdl2/include/SDL_config.h
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-2023 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
Expand Down Expand Up @@ -52,10 +52,9 @@

/* This is a set of defines to configure the SDL features */

#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__clang__) || defined(__BORLANDC__) || defined(__CODEGEARC__)
#define HAVE_STDINT_H 1
#elif defined(_MSC_VER)
#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;
typedef unsigned __int8 uint8_t;
typedef signed __int16 int16_t;
Expand All @@ -72,28 +71,9 @@ typedef unsigned int uintptr_t;
#endif
#define _UINTPTR_T_DEFINED
#endif
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
#define DWORD_PTR DWORD
#endif
#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
#define LONG_PTR LONG
#endif
#else /* !__GNUC__ && !_MSC_VER */
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed int int32_t;
typedef unsigned int uint32_t;
typedef signed long long int64_t;
typedef unsigned long long uint64_t;
#ifndef _SIZE_T_DEFINED_
#define _SIZE_T_DEFINED_
typedef unsigned int size_t;
#endif
typedef unsigned int uintptr_t;
#endif /* __GNUC__ || _MSC_VER */
#else
#define HAVE_STDINT_H 1
#endif /* Visual Studio 2008 */
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */

#ifdef _WIN64
Expand Down
Loading

0 comments on commit 7fdded4

Please sign in to comment.