diff --git a/Source/ThirdParty/SDL/SDL3/SDL.h b/Source/ThirdParty/SDL/SDL3/SDL.h index e9f1d6bee..c7fa36677 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL.h +++ b/Source/ThirdParty/SDL/SDL3/SDL.h @@ -22,7 +22,7 @@ /** * \file SDL.h * - * Main include header for the SDL library, version 3.1.3 + * Main include header for the SDL library, version 3.1.7 */ #ifndef SDL_h_ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_assert.h b/Source/ThirdParty/SDL/SDL3/SDL_assert.h index ada270010..d09e46c0f 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_assert.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_assert.h @@ -84,7 +84,7 @@ extern "C" { * - 3: Paranoid settings: All SDL assertion macros enabled, including * SDL_assert_paranoid. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_ASSERT_LEVEL SomeNumberBasedOnVariousFactors @@ -116,9 +116,9 @@ extern "C" { * isn't supported (SDL doesn't know how to trigger a breakpoint), this macro * does nothing. * - * \threadsafety It is safe to call this function from any thread. + * \threadsafety It is safe to call this macro from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_TriggerBreakpoint() TriggerABreakpointInAPlatformSpecificManner @@ -198,7 +198,7 @@ disable assertions. * condition, try to break in a debugger, kill the program, or ignore the * problem). * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_AssertState { @@ -216,7 +216,7 @@ typedef enum SDL_AssertState * used by the assertion handler, then added to the assertion report. This is * returned as a linked list from SDL_GetAssertionReport(). * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_AssertData { @@ -240,7 +240,9 @@ typedef struct SDL_AssertData * \param line line number. * \returns assert state. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *data, const char *func, @@ -305,7 +307,9 @@ extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData * * * \param condition boolean value to test. * - * \since This macro is available since SDL 3.0.0. + * \threadsafety It is safe to call this macro from any thread. + * + * \since This macro is available since SDL 3.1.3. */ #define SDL_assert(condition) if (assertion_enabled && (condition)) { trigger_assertion; } @@ -336,7 +340,9 @@ extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData * * * \param condition boolean value to test. * - * \since This macro is available since SDL 3.0.0. + * \threadsafety It is safe to call this macro from any thread. + * + * \since This macro is available since SDL 3.1.3. */ #define SDL_assert_release(condition) SDL_disabled_assert(condition) @@ -363,7 +369,9 @@ extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData * * * \param condition boolean value to test. * - * \since This macro is available since SDL 3.0.0. + * \threadsafety It is safe to call this macro from any thread. + * + * \since This macro is available since SDL 3.1.3. */ #define SDL_assert_paranoid(condition) SDL_disabled_assert(condition) @@ -389,7 +397,7 @@ extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData * #endif /** - * An assertion test that always performed. + * An assertion test that is always performed. * * This macro is always enabled no matter what SDL_ASSERT_LEVEL is set to. You * almost never want to use this, as it could trigger on an end-user's system, @@ -405,7 +413,9 @@ extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData * * * \param condition boolean value to test. * - * \since This macro is available since SDL 3.0.0. + * \threadsafety It is safe to call this macro from any thread. + * + * \since This macro is available since SDL 3.1.3. */ #define SDL_assert_always(condition) SDL_enabled_assert(condition) @@ -418,7 +428,10 @@ extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData * * \param userdata what was passed as `userdata` to SDL_SetAssertionHandler(). * \returns an SDL_AssertState value indicating how to handle the failure. * - * \since This datatype is available since SDL 3.0.0. + * \threadsafety This callback may be called from any thread that triggers an + * assert at any time. + * + * \since This datatype is available since SDL 3.1.3. */ typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)( const SDL_AssertData *data, void *userdata); @@ -440,7 +453,9 @@ typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)( * fails or NULL for the default handler. * \param userdata a pointer that is passed to `handler`. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAssertionHandler */ @@ -459,7 +474,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetAssertionHandler( * \returns the default SDL_AssertionHandler that is called when an assert * triggers. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAssertionHandler */ @@ -482,7 +499,9 @@ extern SDL_DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler( * was passed to SDL_SetAssertionHandler(). * \returns the SDL_AssertionHandler that is called when an assert triggers. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAssertionHandler */ @@ -508,9 +527,15 @@ extern SDL_DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void ** * ``` * * \returns a list of all failed assertions or NULL if the list is empty. This - * memory should not be modified or freed by the application. + * memory should not be modified or freed by the application. This + * pointer remains valid until the next call to SDL_Quit() or + * SDL_ResetAssertionReport(). * - * \since This function is available since SDL 3.0.0. + * \threadsafety This function is not thread safe. Other threads calling + * SDL_ResetAssertionReport() simultaneously, may render the + * returned pointer invalid. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_ResetAssertionReport */ @@ -524,7 +549,11 @@ extern SDL_DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void); * no items. In addition, any previously-triggered assertions will be reset to * a trigger_count of zero, and their always_ignore state will be false. * - * \since This function is available since SDL 3.0.0. + * \threadsafety This function is not thread safe. Other threads triggering an + * assertion, or simultaneously calling this function may cause + * memory leaks or crashes. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAssertionReport */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_atomic.h b/Source/ThirdParty/SDL/SDL3/SDL_atomic.h index e36436f92..14ba31fad 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_atomic.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_atomic.h @@ -90,7 +90,9 @@ typedef int SDL_SpinLock; * \param lock a pointer to a lock variable. * \returns true if the lock succeeded, false if the lock is already held. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockSpinlock * \sa SDL_UnlockSpinlock @@ -105,7 +107,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TryLockSpinlock(SDL_SpinLock *lock); * * \param lock a pointer to a lock variable. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_TryLockSpinlock * \sa SDL_UnlockSpinlock @@ -122,7 +126,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_LockSpinlock(SDL_SpinLock *lock); * * \param lock a pointer to a lock variable. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockSpinlock * \sa SDL_TryLockSpinlock @@ -146,7 +152,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockSpinlock(SDL_SpinLock *lock); * time, but if you find yourself needing this, you are probably * dealing with some very sensitive code; be careful! * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_CompilerBarrier() DoCompilerSpecificReadWriteBarrier() #elif defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__) @@ -189,7 +195,7 @@ extern __inline void SDL_CompilerBarrier(void); * time, but if you find yourself needing this, you are probably * dealing with some very sensitive code; be careful! * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void); @@ -202,7 +208,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void); * time, but if you find yourself needing this, you are probably * dealing with some very sensitive code; be careful! * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_MemoryBarrierReleaseFunction */ @@ -275,7 +281,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)(); * * \threadsafety This macro is safe to use from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_CPUPauseInstruction() DoACPUPauseInACompilerAndArchitectureSpecificWay #elif (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__)) @@ -318,7 +324,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)(); * This is a struct so people don't accidentally use numeric operations on it * directly. You have to use SDL atomic functions. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_CompareAndSwapAtomicInt * \sa SDL_GetAtomicInt @@ -340,7 +346,7 @@ typedef struct SDL_AtomicInt { int value; } SDL_AtomicInt; * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAtomicInt * \sa SDL_SetAtomicInt @@ -361,7 +367,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CompareAndSwapAtomicInt(SDL_AtomicInt *a, i * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAtomicInt */ @@ -378,7 +384,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetAtomicInt(SDL_AtomicInt *a, int v); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAtomicInt */ @@ -398,7 +404,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetAtomicInt(SDL_AtomicInt *a); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AtomicDecRef * \sa SDL_AtomicIncRef @@ -415,7 +421,9 @@ extern SDL_DECLSPEC int SDLCALL SDL_AddAtomicInt(SDL_AtomicInt *a, int v); * \param a a pointer to an SDL_AtomicInt to increment. * \returns the previous value of the atomic variable. * - * \since This macro is available since SDL 3.0.0. + * \threadsafety It is safe to call this macro from any thread. + * + * \since This macro is available since SDL 3.1.3. * * \sa SDL_AtomicDecRef */ @@ -433,7 +441,9 @@ extern SDL_DECLSPEC int SDLCALL SDL_AddAtomicInt(SDL_AtomicInt *a, int v); * \returns true if the variable reached zero after decrementing, false * otherwise. * - * \since This macro is available since SDL 3.0.0. + * \threadsafety It is safe to call this macro from any thread. + * + * \since This macro is available since SDL 3.1.3. * * \sa SDL_AtomicIncRef */ @@ -460,12 +470,11 @@ extern SDL_DECLSPEC int SDLCALL SDL_AddAtomicInt(SDL_AtomicInt *a, int v); * This is a struct so people don't accidentally use numeric operations on it * directly. You have to use SDL atomic functions. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_CompareAndSwapAtomicU32 * \sa SDL_GetAtomicU32 * \sa SDL_SetAtomicU32 - * \sa SDL_AddAtomicU32 */ typedef struct SDL_AtomicU32 { Uint32 value; } SDL_AtomicU32; @@ -482,7 +491,7 @@ typedef struct SDL_AtomicU32 { Uint32 value; } SDL_AtomicU32; * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAtomicU32 * \sa SDL_SetAtomicU32 @@ -503,7 +512,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CompareAndSwapAtomicU32(SDL_AtomicU32 *a, U * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAtomicU32 */ @@ -520,7 +529,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_SetAtomicU32(SDL_AtomicU32 *a, Uint32 v); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAtomicU32 */ @@ -539,7 +548,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetAtomicU32(SDL_AtomicU32 *a); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CompareAndSwapAtomicInt * \sa SDL_GetAtomicPointer @@ -559,7 +568,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CompareAndSwapAtomicPointer(void **a, void * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CompareAndSwapAtomicPointer * \sa SDL_GetAtomicPointer @@ -577,7 +586,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_SetAtomicPointer(void **a, void *v); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CompareAndSwapAtomicPointer * \sa SDL_SetAtomicPointer diff --git a/Source/ThirdParty/SDL/SDL3/SDL_audio.h b/Source/ThirdParty/SDL/SDL3/SDL_audio.h index 41477d7ca..f178853bd 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_audio.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_audio.h @@ -33,8 +33,9 @@ * even if the data format changes on either side halfway through. * * An app opens an audio device and binds any number of audio streams to it, - * feeding more data to it as available. When the devices needs more data, it - * will pull it from all bound streams and mix them together for playback. + * feeding more data to the streams as available. When the device needs more + * data, it will pull it from all bound streams and mix them together for + * playback. * * Audio streams can also use an app-provided callback to supply data * on-demand, which maps pretty closely to the SDL2 audio model. @@ -43,6 +44,45 @@ * if you aren't reading from a file) as a basic means to load sound data into * your program. * + * ## Logical audio devices + * + * In SDL3, opening a physical device (like a SoundBlaster 16 Pro) gives you a + * logical device ID that you can bind audio streams to. In almost all cases, + * logical devices can be used anywhere in the API that a physical device is + * normally used. However, since each device opening generates a new logical + * device, different parts of the program (say, a VoIP library, or + * text-to-speech framework, or maybe some other sort of mixer on top of SDL) + * can have their own device opens that do not interfere with each other; each + * logical device will mix its separate audio down to a single buffer, fed to + * the physical device, behind the scenes. As many logical devices as you like + * can come and go; SDL will only have to open the physical device at the OS + * level once, and will manage all the logical devices on top of it + * internally. + * + * One other benefit of logical devices: if you don't open a specific physical + * device, instead opting for the default, SDL can automatically migrate those + * logical devices to different hardware as circumstances change: a user + * plugged in headphones? The system default changed? SDL can transparently + * migrate the logical devices to the correct physical device seamlessly and + * keep playing; the app doesn't even have to know it happened if it doesn't + * want to. + * + * ## Simplified audio + * + * As a simplified model for when a single source of audio is all that's + * needed, an app can use SDL_OpenAudioDeviceStream, which is a single + * function to open an audio device, create an audio stream, bind that stream + * to the newly-opened device, and (optionally) provide a callback for + * obtaining audio data. When using this function, the primary interface is + * the SDL_AudioStream and the device handle is mostly hidden away; destroying + * a stream created through this function will also close the device, stream + * bindings cannot be changed, etc. One other quirk of this is that the device + * is started in a _paused_ state and must be explicitly resumed; this is + * partially to offer a clean migration for SDL2 apps and partially because + * the app might have to do more setup before playback begins; in the + * non-simplified form, nothing will play until a stream is bound to a device, + * so they start _unpaused_. + * * ## Channel layouts * * Audio data passing through SDL is uncompressed PCM data, interleaved. One @@ -73,7 +113,7 @@ * - 4 channels (quad) layout: FL, FR, BL, BR * - 5 channels (4.1) layout: FL, FR, LFE, BL, BR * - 6 channels (5.1) layout: FL, FR, FC, LFE, BL, BR (last two can also be - * BL, BR) + * SL, SR) * - 7 channels (6.1) layout: FL, FR, FC, LFE, BC, SL, SR * - 8 channels (7.1) layout: FL, FR, FC, LFE, BL, BR, SL, SR * @@ -113,7 +153,7 @@ extern "C" { /** * Audio format. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. * * \sa SDL_AUDIO_BITSIZE * \sa SDL_AUDIO_BYTESIZE @@ -167,7 +207,7 @@ typedef enum SDL_AudioFormat * * \threadsafety It is safe to call this macro from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_AUDIO_BITSIZE(x) ((x) & SDL_AUDIO_MASK_BITSIZE) @@ -181,7 +221,7 @@ typedef enum SDL_AudioFormat * * \threadsafety It is safe to call this macro from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_AUDIO_BYTESIZE(x) (SDL_AUDIO_BITSIZE(x) / 8) @@ -195,7 +235,7 @@ typedef enum SDL_AudioFormat * * \threadsafety It is safe to call this macro from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_AUDIO_ISFLOAT(x) ((x) & SDL_AUDIO_MASK_FLOAT) @@ -209,7 +249,7 @@ typedef enum SDL_AudioFormat * * \threadsafety It is safe to call this macro from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_AUDIO_ISBIGENDIAN(x) ((x) & SDL_AUDIO_MASK_BIG_ENDIAN) @@ -223,7 +263,7 @@ typedef enum SDL_AudioFormat * * \threadsafety It is safe to call this macro from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_AUDIO_ISLITTLEENDIAN(x) (!SDL_AUDIO_ISBIGENDIAN(x)) @@ -237,7 +277,7 @@ typedef enum SDL_AudioFormat * * \threadsafety It is safe to call this macro from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_AUDIO_ISSIGNED(x) ((x) & SDL_AUDIO_MASK_SIGNED) @@ -251,7 +291,7 @@ typedef enum SDL_AudioFormat * * \threadsafety It is safe to call this macro from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_AUDIO_ISINT(x) (!SDL_AUDIO_ISFLOAT(x)) @@ -265,7 +305,7 @@ typedef enum SDL_AudioFormat * * \threadsafety It is safe to call this macro from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_AUDIO_ISUNSIGNED(x) (!SDL_AUDIO_ISSIGNED(x)) @@ -275,7 +315,7 @@ typedef enum SDL_AudioFormat * * Zero is used to signify an invalid/null device. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_AudioDeviceID; @@ -286,7 +326,7 @@ typedef Uint32 SDL_AudioDeviceID; * to signify the app just wants the system to choose a default device instead * of the app providing a specific one. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK ((SDL_AudioDeviceID) 0xFFFFFFFFu) @@ -297,14 +337,14 @@ typedef Uint32 SDL_AudioDeviceID; * to signify the app just wants the system to choose a default device instead * of the app providing a specific one. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_AUDIO_DEVICE_DEFAULT_RECORDING ((SDL_AudioDeviceID) 0xFFFFFFFEu) /** * Format specifier for audio data. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_AudioFormat */ @@ -326,7 +366,7 @@ typedef struct SDL_AudioSpec * * \threadsafety It is safe to call this macro from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_AUDIO_FRAMESIZE(x) (SDL_AUDIO_BYTESIZE((x).format) * (x).channels) @@ -350,7 +390,7 @@ typedef struct SDL_AudioSpec * more of them, bind them to an opened audio device, and feed data to them * (or for recording, consume data from them). * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_CreateAudioStream */ @@ -384,7 +424,7 @@ typedef struct SDL_AudioStream SDL_AudioStream; * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAudioDriver */ @@ -408,7 +448,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetNumAudioDrivers */ @@ -427,7 +467,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetAudioDriver(int index); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentAudioDriver(void); @@ -453,7 +493,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentAudioDriver(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenAudioDevice * \sa SDL_GetAudioRecordingDevices @@ -482,7 +522,7 @@ extern SDL_DECLSPEC SDL_AudioDeviceID * SDLCALL SDL_GetAudioPlaybackDevices(int * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenAudioDevice * \sa SDL_GetAudioPlaybackDevices @@ -498,11 +538,10 @@ extern SDL_DECLSPEC SDL_AudioDeviceID * SDLCALL SDL_GetAudioRecordingDevices(int * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAudioPlaybackDevices * \sa SDL_GetAudioRecordingDevices - * \sa SDL_GetDefaultAudioInfo */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetAudioDeviceName(SDL_AudioDeviceID devid); @@ -537,7 +576,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetAudioDeviceName(SDL_AudioDeviceI * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec *spec, int *sample_frames); @@ -558,7 +597,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devi * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAudioStreamInputChannelMap */ @@ -633,13 +672,52 @@ extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioDeviceChannelMap(SDL_AudioDeviceID * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CloseAudioDevice * \sa SDL_GetAudioDeviceFormat */ extern SDL_DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(SDL_AudioDeviceID devid, const SDL_AudioSpec *spec); +/** + * Determine if an audio device is physical (instead of logical). + * + * An SDL_AudioDeviceID that represents physical hardare is a physical device; + * there is one for each piece of hardware that SDL can see. Logical devices + * are created by calling SDL_OpenAudioDevice or SDL_OpenAudioDeviceStream, + * and while each is associated with a physical device, there can be any + * number of logical devices on one physical device. + * + * For the most part, logical and physical IDs are interchangeable--if you try + * to open a logical device, SDL understands to assign that effort to the + * underlying physical device, etc. However, it might be useful to know if an + * arbitrary device ID is physical or logical. This function reports which. + * + * This function may return either true or false for invalid device IDs. + * + * \param devid the device ID to query. + * \returns true if devid is a physical device, false if it is logical. + * + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.2.0. + */ +extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePhysical(SDL_AudioDeviceID devid); + +/** + * Determine if an audio device is a playback device (instead of recording). + * + * This function may return either true or false for invalid device IDs. + * + * \param devid the device ID to query. + * \returns true if devid is a playback device, false if it is recording. + * + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.2.0. + */ +extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePlayback(SDL_AudioDeviceID devid); + /** * Use this function to pause audio playback on a specified device. * @@ -664,7 +742,7 @@ extern SDL_DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(SDL_AudioDevic * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ResumeAudioDevice * \sa SDL_AudioDevicePaused @@ -692,7 +770,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AudioDevicePaused * \sa SDL_PauseAudioDevice @@ -714,7 +792,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioDevice(SDL_AudioDeviceID dev); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_PauseAudioDevice * \sa SDL_ResumeAudioDevice @@ -738,7 +816,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_AudioDevicePaused(SDL_AudioDeviceID dev); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAudioDeviceGain */ @@ -773,7 +851,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetAudioDeviceGain(SDL_AudioDeviceID devid * \threadsafety It is safe to call this function from any thread, as it holds * a stream-specific mutex while running. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAudioDeviceGain */ @@ -794,7 +872,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioDeviceGain(SDL_AudioDeviceID devid, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenAudioDevice */ @@ -829,7 +907,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID devid); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BindAudioStreams * \sa SDL_UnbindAudioStream @@ -850,7 +928,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_BindAudioStreams(SDL_AudioDeviceID devid, S * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BindAudioStreams * \sa SDL_UnbindAudioStream @@ -872,7 +950,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_BindAudioStream(SDL_AudioDeviceID devid, SD * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BindAudioStreams */ @@ -888,7 +966,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnbindAudioStreams(SDL_AudioStream **stream * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BindAudioStream */ @@ -907,7 +985,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnbindAudioStream(SDL_AudioStream *stream); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BindAudioStream * \sa SDL_BindAudioStreams @@ -924,7 +1002,7 @@ extern SDL_DECLSPEC SDL_AudioDeviceID SDLCALL SDL_GetAudioStreamDevice(SDL_Audio * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_PutAudioStreamData * \sa SDL_GetAudioStreamData @@ -943,7 +1021,9 @@ extern SDL_DECLSPEC SDL_AudioStream * SDLCALL SDL_CreateAudioStream(const SDL_Au * \returns a valid property ID on success or 0 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetAudioStreamProperties(SDL_AudioStream *stream); @@ -959,7 +1039,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetAudioStreamProperties(SDL_Au * \threadsafety It is safe to call this function from any thread, as it holds * a stream-specific mutex while running. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAudioStreamFormat */ @@ -989,7 +1069,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetAudioStreamFormat(SDL_AudioStream *strea * \threadsafety It is safe to call this function from any thread, as it holds * a stream-specific mutex while running. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAudioStreamFormat * \sa SDL_SetAudioStreamFrequencyRatio @@ -1006,7 +1086,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamFormat(SDL_AudioStream *strea * \threadsafety It is safe to call this function from any thread, as it holds * a stream-specific mutex while running. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAudioStreamFrequencyRatio */ @@ -1033,7 +1113,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetAudioStreamFrequencyRatio(SDL_AudioStre * \threadsafety It is safe to call this function from any thread, as it holds * a stream-specific mutex while running. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAudioStreamFrequencyRatio * \sa SDL_SetAudioStreamFormat @@ -1055,7 +1135,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamFrequencyRatio(SDL_AudioStrea * \threadsafety It is safe to call this function from any thread, as it holds * a stream-specific mutex while running. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAudioStreamGain */ @@ -1080,7 +1160,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetAudioStreamGain(SDL_AudioStream *stream * \threadsafety It is safe to call this function from any thread, as it holds * a stream-specific mutex while running. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAudioStreamGain */ @@ -1104,7 +1184,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamGain(SDL_AudioStream *stream, * \threadsafety It is safe to call this function from any thread, as it holds * a stream-specific mutex while running. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAudioStreamInputChannelMap */ @@ -1128,7 +1208,7 @@ extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioStreamInputChannelMap(SDL_AudioStr * \threadsafety It is safe to call this function from any thread, as it holds * a stream-specific mutex while running. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAudioStreamInputChannelMap */ @@ -1148,8 +1228,12 @@ extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioStreamOutputChannelMap(SDL_AudioSt * channel that it should be remapped to. To reverse a stereo signal's left * and right values, you'd have an array of `{ 1, 0 }`. It is legal to remap * multiple channels to the same thing, so `{ 1, 1 }` would duplicate the - * right channel to both channels of a stereo signal. You cannot change the - * number of channels through a channel map, just reorder them. + * right channel to both channels of a stereo signal. An element in the + * channel map set to -1 instead of a valid channel will mute that channel, + * setting it to a silence value. + * + * You cannot change the number of channels through a channel map, just + * reorder/mute them. * * Data that was previously queued in the stream will still be operated on in * the order that was current when it was added, which is to say you can put @@ -1164,8 +1248,8 @@ extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioStreamOutputChannelMap(SDL_AudioSt * after this call. * * If `count` is not equal to the current number of channels in the audio - * stream's format, this will fail. This is a safety measure to make sure a a - * race condition hasn't changed the format while you this call is setting the + * stream's format, this will fail. This is a safety measure to make sure a + * race condition hasn't changed the format while this call is setting the * channel map. * * \param stream the SDL_AudioStream to change. @@ -1179,7 +1263,7 @@ extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioStreamOutputChannelMap(SDL_AudioSt * stream's format to have a different number of channels from a * a different thread at the same time, though! * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAudioStreamInputChannelMap */ @@ -1194,12 +1278,16 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamInputChannelMap(SDL_AudioStre * The output channel map reorders data that leaving a stream via * SDL_GetAudioStreamData. * - * Each item in the array represents an output channel, and its value is the + * Each item in the array represents an input channel, and its value is the * channel that it should be remapped to. To reverse a stereo signal's left * and right values, you'd have an array of `{ 1, 0 }`. It is legal to remap * multiple channels to the same thing, so `{ 1, 1 }` would duplicate the - * right channel to both channels of a stereo signal. You cannot change the - * number of channels through a channel map, just reorder them. + * right channel to both channels of a stereo signal. An element in the + * channel map set to -1 instead of a valid channel will mute that channel, + * setting it to a silence value. + * + * You cannot change the number of channels through a channel map, just + * reorder/mute them. * * The output channel map can be changed at any time, as output remapping is * applied during SDL_GetAudioStreamData. @@ -1211,8 +1299,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamInputChannelMap(SDL_AudioStre * after this call. * * If `count` is not equal to the current number of channels in the audio - * stream's format, this will fail. This is a safety measure to make sure a a - * race condition hasn't changed the format while you this call is setting the + * stream's format, this will fail. This is a safety measure to make sure a + * race condition hasn't changed the format while this call is setting the * channel map. * * \param stream the SDL_AudioStream to change. @@ -1226,7 +1314,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamInputChannelMap(SDL_AudioStre * stream's format to have a different number of channels from a * a different thread at the same time, though! * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAudioStreamInputChannelMap */ @@ -1253,7 +1341,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamOutputChannelMap(SDL_AudioStr * stream has a callback set, the caller might need to manage * extra locking. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ClearAudioStream * \sa SDL_FlushAudioStream @@ -1284,7 +1372,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PutAudioStreamData(SDL_AudioStream *stream, * stream has a callback set, the caller might need to manage * extra locking. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ClearAudioStream * \sa SDL_GetAudioStreamAvailable @@ -1311,7 +1399,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetAudioStreamData(SDL_AudioStream *stream, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAudioStreamData * \sa SDL_PutAudioStreamData @@ -1350,7 +1438,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetAudioStreamAvailable(SDL_AudioStream *str * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_PutAudioStreamData * \sa SDL_ClearAudioStream @@ -1372,7 +1460,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetAudioStreamQueued(SDL_AudioStream *stream * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_PutAudioStreamData */ @@ -1390,7 +1478,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_FlushAudioStream(SDL_AudioStream *stream); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAudioStreamAvailable * \sa SDL_GetAudioStreamData @@ -1417,7 +1505,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ClearAudioStream(SDL_AudioStream *stream); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ResumeAudioStreamDevice */ @@ -1437,7 +1525,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioStreamDevice(SDL_AudioStream *str * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_PauseAudioStreamDevice */ @@ -1465,7 +1553,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioStreamDevice(SDL_AudioStream *st * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_UnlockAudioStream */ @@ -1484,7 +1572,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_LockAudioStream(SDL_AudioStream *stream); * \threadsafety You should only call this from the same thread that * previously called SDL_LockAudioStream. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockAudioStream */ @@ -1525,7 +1613,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_UnlockAudioStream(SDL_AudioStream *stream); * is called, so your callback does not need to manage the lock * explicitly. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_SetAudioStreamGetCallback * \sa SDL_SetAudioStreamPutCallback @@ -1572,7 +1660,7 @@ typedef void (SDLCALL *SDL_AudioStreamCallback)(void *userdata, SDL_AudioStream * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAudioStreamPutCallback */ @@ -1621,7 +1709,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamGetCallback(SDL_AudioStream * * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAudioStreamGetCallback */ @@ -1643,7 +1731,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamPutCallback(SDL_AudioStream * * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateAudioStream */ @@ -1705,7 +1793,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyAudioStream(SDL_AudioStream *stream) * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAudioStreamDevice * \sa SDL_ResumeAudioStreamDevice @@ -1743,7 +1831,7 @@ extern SDL_DECLSPEC SDL_AudioStream * SDLCALL SDL_OpenAudioDeviceStream(SDL_Audi * application is responsible for locking resources the callback * touches that need to be protected. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_SetAudioPostmixCallback */ @@ -1799,7 +1887,7 @@ typedef void (SDLCALL *SDL_AudioPostmixCallback)(void *userdata, const SDL_Audio * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, SDL_AudioPostmixCallback callback, void *userdata); @@ -1845,7 +1933,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioPostmixCallback(SDL_AudioDeviceID d * Example: * * ```c - * SDL_LoadWAV_IO(SDL_IOFromFile("sample.wav", "rb"), 1, &spec, &buf, &len); + * SDL_LoadWAV_IO(SDL_IOFromFile("sample.wav", "rb"), true, &spec, &buf, &len); * ``` * * Note that the SDL_LoadWAV function does this same thing for you, but in a @@ -1877,7 +1965,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioPostmixCallback(SDL_AudioDeviceID d * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_free * \sa SDL_LoadWAV @@ -1913,7 +2001,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_LoadWAV_IO(SDL_IOStream *src, bool closeio, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_free * \sa SDL_LoadWAV_IO @@ -1952,7 +2040,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_LoadWAV(const char *path, SDL_AudioSpec *sp * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_MixAudio(Uint8 *dst, const Uint8 *src, SDL_AudioFormat format, Uint32 len, float volume); @@ -1982,7 +2070,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_MixAudio(Uint8 *dst, const Uint8 *src, SDL_ * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ConvertAudioSamples(const SDL_AudioSpec *src_spec, const Uint8 *src_data, int src_len, const SDL_AudioSpec *dst_spec, Uint8 **dst_data, int *dst_len); @@ -1995,7 +2083,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ConvertAudioSamples(const SDL_AudioSpec *sr * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetAudioFormatName(SDL_AudioFormat format); @@ -2011,7 +2099,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetAudioFormatName(SDL_AudioFormat * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_GetSilenceValueForFormat(SDL_AudioFormat format); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_bits.h b/Source/ThirdParty/SDL/SDL3/SDL_bits.h index 15548bc66..cabf92d17 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_bits.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_bits.h @@ -65,7 +65,7 @@ extern __inline int _SDL_bsr_watcom(Uint32); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32(Uint32 x) { @@ -85,7 +85,7 @@ SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32(Uint32 x) #elif defined(_MSC_VER) unsigned long index; if (_BitScanReverse(&index, x)) { - return index; + return (int)index; } return -1; #else @@ -132,7 +132,7 @@ SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32(Uint32 x) * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ SDL_FORCE_INLINE bool SDL_HasExactlyOneBitSet32(Uint32 x) { diff --git a/Source/ThirdParty/SDL/SDL3/SDL_blendmode.h b/Source/ThirdParty/SDL/SDL3/SDL_blendmode.h index 76aa19732..0998c1a1e 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_blendmode.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_blendmode.h @@ -45,7 +45,7 @@ extern "C" { * * Additional values may be obtained from SDL_ComposeCustomBlendMode. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_ComposeCustomBlendMode */ @@ -64,7 +64,7 @@ typedef Uint32 SDL_BlendMode; * The blend operation used when combining source and destination pixel * components. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_BlendOperation { @@ -83,7 +83,7 @@ typedef enum SDL_BlendOperation * operation. The comma-separated factors listed above are always applied in * the component order red, green, blue, and alpha. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_BlendFactor { @@ -177,7 +177,9 @@ typedef enum SDL_BlendFactor * \returns an SDL_BlendMode that represents the chosen factors and * operations. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetRenderDrawBlendMode * \sa SDL_GetRenderDrawBlendMode diff --git a/Source/ThirdParty/SDL/SDL3/SDL_camera.h b/Source/ThirdParty/SDL/SDL3/SDL_camera.h index db2eb6940..5ac47ea6d 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_camera.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_camera.h @@ -28,6 +28,22 @@ * devices can be enumerated, queried, and opened. Once opened, it will * provide SDL_Surface objects as new frames of video come in. These surfaces * can be uploaded to an SDL_Texture or processed as pixels in memory. + * + * ## Camera gotchas + * + * Consumer-level camera hardware tends to take a little while to warm up, + * once the device has been opened. Generally most camera apps have some sort + * of UI to take a picture (a button to snap a pic while a preview is showing, + * some sort of multi-second countdown for the user to pose, like a photo + * booth), which puts control in the users' hands, or they are intended to + * stay on for long times (Pokemon Go, etc). + * + * It's not uncommon that a newly-opened camera will provide a couple of + * completely black frames, maybe followed by some under-exposed images. If + * taking single frame automatically, or recording video from a camera's input + * without the user initiating it from a preview, it could be wise to drop the + * first several frames (if not the first several _seconds_ worth of frames!) + * before using images from a camera. */ #ifndef SDL_camera_h_ @@ -53,7 +69,7 @@ extern "C" { * * The value 0 is an invalid ID. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_GetCameras */ @@ -62,7 +78,7 @@ typedef Uint32 SDL_CameraID; /** * The opaque structure used to identify an opened SDL camera. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_Camera SDL_Camera; @@ -72,7 +88,7 @@ typedef struct SDL_Camera SDL_Camera; * Cameras often support multiple formats; each one will be encapsulated in * this struct. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_GetCameraSupportedFormats * \sa SDL_GetCameraFormat @@ -90,7 +106,7 @@ typedef struct SDL_CameraSpec /** * The position of camera in relation to system device. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. * * \sa SDL_GetCameraPosition */ @@ -119,7 +135,7 @@ typedef enum SDL_CameraPosition * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetCameraDriver */ @@ -143,7 +159,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumCameraDrivers(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetNumCameraDrivers */ @@ -161,7 +177,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCameraDriver(int index); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentCameraDriver(void); @@ -176,7 +192,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentCameraDriver(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenCamera */ @@ -214,7 +230,7 @@ extern SDL_DECLSPEC SDL_CameraID * SDLCALL SDL_GetCameras(int *count); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetCameras * \sa SDL_OpenCamera @@ -230,7 +246,7 @@ extern SDL_DECLSPEC SDL_CameraSpec ** SDLCALL SDL_GetCameraSupportedFormats(SDL_ * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetCameras */ @@ -249,7 +265,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCameraName(SDL_CameraID instance * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetCameras */ @@ -268,7 +284,7 @@ extern SDL_DECLSPEC SDL_CameraPosition SDLCALL SDL_GetCameraPosition(SDL_CameraI * * You can call SDL_GetCameraFormat() to get the actual data format if passing * a NULL spec here. You can see the exact specs a device can support without - * conversion with SDL_GetCameraSupportedSpecs(). + * conversion with SDL_GetCameraSupportedFormats(). * * SDL will not attempt to emulate framerate; it will try to set the hardware * to the rate closest to the requested speed, but it won't attempt to limit @@ -281,10 +297,11 @@ extern SDL_DECLSPEC SDL_CameraPosition SDLCALL SDL_GetCameraPosition(SDL_CameraI * the camera, and they can choose Yes or No at that point. Until they do, the * camera will not be usable. The app should either wait for an * SDL_EVENT_CAMERA_DEVICE_APPROVED (or SDL_EVENT_CAMERA_DEVICE_DENIED) event, - * or poll SDL_IsCameraApproved() occasionally until it returns non-zero. On - * platforms that don't require explicit user approval (and perhaps in places - * where the user previously permitted access), the approval event might come - * immediately, but it might come seconds, minutes, or hours later! + * or poll SDL_GetCameraPermissionState() occasionally until it returns + * non-zero. On platforms that don't require explicit user approval (and + * perhaps in places where the user previously permitted access), the approval + * event might come immediately, but it might come seconds, minutes, or hours + * later! * * \param instance_id the camera device instance ID. * \param spec the desired format for data the device will provide. Can be @@ -294,7 +311,7 @@ extern SDL_DECLSPEC SDL_CameraPosition SDLCALL SDL_GetCameraPosition(SDL_CameraI * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetCameras * \sa SDL_GetCameraFormat @@ -327,7 +344,7 @@ extern SDL_DECLSPEC SDL_Camera * SDLCALL SDL_OpenCamera(SDL_CameraID instance_id * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenCamera * \sa SDL_CloseCamera @@ -343,7 +360,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetCameraPermissionState(SDL_Camera *camera) * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenCamera */ @@ -358,7 +375,7 @@ extern SDL_DECLSPEC SDL_CameraID SDLCALL SDL_GetCameraID(SDL_Camera *camera); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetCameraProperties(SDL_Camera *camera); @@ -372,7 +389,8 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetCameraProperties(SDL_Camera * some platforms require, this will return false, but this isn't necessarily * a fatal error; you should either wait for an * SDL_EVENT_CAMERA_DEVICE_APPROVED (or SDL_EVENT_CAMERA_DEVICE_DENIED) event, - * or poll SDL_IsCameraApproved() occasionally until it returns non-zero. + * or poll SDL_GetCameraPermissionState() occasionally until it returns + * non-zero. * * \param camera opened camera device. * \param spec the SDL_CameraSpec to be initialized by this function. @@ -381,7 +399,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetCameraProperties(SDL_Camera * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenCamera */ @@ -407,14 +425,14 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetCameraFormat(SDL_Camera *camera, SDL_Cam * After use, the frame should be released with SDL_ReleaseCameraFrame(). If * you don't do this, the system may stop providing more video! * - * Do not call SDL_FreeSurface() on the returned surface! It must be given + * Do not call SDL_DestroySurface() on the returned surface! It must be given * back to the camera subsystem with SDL_ReleaseCameraFrame! * * If the system is waiting for the user to approve access to the camera, as * some platforms require, this will return NULL (no frames available); you * should either wait for an SDL_EVENT_CAMERA_DEVICE_APPROVED (or - * SDL_EVENT_CAMERA_DEVICE_DENIED) event, or poll SDL_IsCameraApproved() - * occasionally until it returns non-zero. + * SDL_EVENT_CAMERA_DEVICE_DENIED) event, or poll + * SDL_GetCameraPermissionState() occasionally until it returns non-zero. * * \param camera opened camera device. * \param timestampNS a pointer filled in with the frame's timestamp, or 0 on @@ -424,7 +442,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetCameraFormat(SDL_Camera *camera, SDL_Cam * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ReleaseCameraFrame */ @@ -452,7 +470,7 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_AcquireCameraFrame(SDL_Camera *cam * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AcquireCameraFrame */ @@ -467,9 +485,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseCameraFrame(SDL_Camera *camera, SDL_ * \threadsafety It is safe to call this function from any thread, but no * thread may reference `device` once this function is called. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * - * \sa SDL_OpenCameraWithSpec * \sa SDL_OpenCamera */ extern SDL_DECLSPEC void SDLCALL SDL_CloseCamera(SDL_Camera *camera); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_clipboard.h b/Source/ThirdParty/SDL/SDL3/SDL_clipboard.h index 94d8c0edf..b23bdb786 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_clipboard.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_clipboard.h @@ -49,7 +49,9 @@ extern "C" { * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \threadsafety You may only call this function from the main thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetClipboardText * \sa SDL_HasClipboardText @@ -59,14 +61,16 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetClipboardText(const char *text); /** * Get UTF-8 text from the clipboard. * - * This functions returns empty string if there was not enough memory left for - * a copy of the clipboard's content. + * This functions returns an empty string if there was not enough memory left + * for a copy of the clipboard's content. * * \returns the clipboard text on success or an empty string on failure; call * SDL_GetError() for more information. This should be freed with * SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \threadsafety You may only call this function from the main thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasClipboardText * \sa SDL_SetClipboardText @@ -78,7 +82,9 @@ extern SDL_DECLSPEC char * SDLCALL SDL_GetClipboardText(void); * * \returns true if the clipboard has text, or false if it does not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety You may only call this function from the main thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetClipboardText * \sa SDL_SetClipboardText @@ -92,7 +98,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasClipboardText(void); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \threadsafety You may only call this function from the main thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPrimarySelectionText * \sa SDL_HasPrimarySelectionText @@ -102,14 +110,16 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetPrimarySelectionText(const char *text); /** * Get UTF-8 text from the primary selection. * - * This functions returns empty string if there was not enough memory left for - * a copy of the primary selection's content. + * This functions returns an 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. This should be * freed with SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \threadsafety You may only call this function from the main thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasPrimarySelectionText * \sa SDL_SetPrimarySelectionText @@ -122,7 +132,9 @@ extern SDL_DECLSPEC char * SDLCALL SDL_GetPrimarySelectionText(void); * * \returns true if the primary selection has text, or false if it does not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety You may only call this function from the main thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPrimarySelectionText * \sa SDL_SetPrimarySelectionText @@ -147,7 +159,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasPrimarySelectionText(void); * breakage in receiving applications. The returned data will not be * freed so it needs to be retained and dealt with internally. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetClipboardData */ @@ -159,7 +171,7 @@ typedef const void *(SDLCALL *SDL_ClipboardDataCallback)(void *userdata, const c * * \param userdata a pointer to provided user data. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetClipboardData */ @@ -187,7 +199,9 @@ typedef void (SDLCALL *SDL_ClipboardCleanupCallback)(void *userdata); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \threadsafety You may only call this function from the main thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_ClearClipboardData * \sa SDL_GetClipboardData @@ -201,7 +215,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetClipboardData(SDL_ClipboardDataCallback * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \threadsafety You may only call this function from the main thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetClipboardData */ @@ -219,7 +235,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ClearClipboardData(void); * for more information. This should be freed with SDL_free() when it * is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \threadsafety You may only call this function from the main thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasClipboardData * \sa SDL_SetClipboardData @@ -233,7 +251,9 @@ extern SDL_DECLSPEC void * SDLCALL SDL_GetClipboardData(const char *mime_type, s * \returns true if there exists data in clipboard for the provided mime type, * false if it does not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety You may only call this function from the main thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetClipboardData * \sa SDL_GetClipboardData @@ -249,7 +269,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasClipboardData(const char *mime_type); * failure; call SDL_GetError() for more information. This should be * freed with SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \threadsafety You may only call this function from the main thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetClipboardData */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_cpuinfo.h b/Source/ThirdParty/SDL/SDL3/SDL_cpuinfo.h index ef4a90c69..8d47d92d3 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_cpuinfo.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_cpuinfo.h @@ -49,7 +49,7 @@ extern "C" { * processors have a 128 byte cache line. We use the larger value to be * generally safe. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_CACHELINE_SIZE 128 @@ -60,7 +60,9 @@ extern "C" { * technologies such as hyperthreading, the number of logical cores * may be more than the number of physical cores. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_GetNumLogicalCPUCores(void); @@ -72,7 +74,9 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumLogicalCPUCores(void); * * \returns the L1 cache line size of the CPU, in bytes. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void); @@ -84,7 +88,9 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void); * * \returns true if the CPU has AltiVec features or false if not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_HasAltiVec(void); @@ -95,7 +101,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasAltiVec(void); * * \returns true if the CPU has MMX features or false if not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_HasMMX(void); @@ -106,7 +114,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasMMX(void); * * \returns true if the CPU has SSE features or false if not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasSSE2 * \sa SDL_HasSSE3 @@ -122,7 +132,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE(void); * * \returns true if the CPU has SSE2 features or false if not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasSSE * \sa SDL_HasSSE3 @@ -138,7 +150,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE2(void); * * \returns true if the CPU has SSE3 features or false if not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasSSE * \sa SDL_HasSSE2 @@ -154,7 +168,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE3(void); * * \returns true if the CPU has SSE4.1 features or false if not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasSSE * \sa SDL_HasSSE2 @@ -170,7 +186,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE41(void); * * \returns true if the CPU has SSE4.2 features or false if not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasSSE * \sa SDL_HasSSE2 @@ -186,7 +204,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE42(void); * * \returns true if the CPU has AVX features or false if not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasAVX2 * \sa SDL_HasAVX512F @@ -200,7 +220,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasAVX(void); * * \returns true if the CPU has AVX2 features or false if not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasAVX * \sa SDL_HasAVX512F @@ -214,7 +236,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasAVX2(void); * * \returns true if the CPU has AVX-512F features or false if not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasAVX * \sa SDL_HasAVX2 @@ -230,7 +254,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasAVX512F(void); * * \returns true if the CPU has ARM SIMD features or false if not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasNEON */ @@ -243,7 +269,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasARMSIMD(void); * * \returns true if the CPU has ARM NEON features or false if not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_HasNEON(void); @@ -255,7 +283,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasNEON(void); * * \returns true if the CPU has LOONGARCH LSX features or false if not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_HasLSX(void); @@ -267,7 +297,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasLSX(void); * * \returns true if the CPU has LOONGARCH LASX features or false if not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_HasLASX(void); @@ -276,7 +308,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasLASX(void); * * \returns the amount of RAM configured in the system in MiB. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_GetSystemRAM(void); @@ -295,7 +329,9 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetSystemRAM(void); * \returns the alignment in bytes needed for available, known SIMD * instructions. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_aligned_alloc * \sa SDL_aligned_free diff --git a/Source/ThirdParty/SDL/SDL3/SDL_dialog.h b/Source/ThirdParty/SDL/SDL3/SDL_dialog.h index a2e328396..21b022c58 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_dialog.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_dialog.h @@ -49,7 +49,7 @@ extern "C" { * hyphens, underscores and periods. Alternatively, the whole string can be a * single asterisk ("*"), which serves as an "All files" filter. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_DialogFileCallback * \sa SDL_ShowOpenFileDialog @@ -76,8 +76,8 @@ typedef struct SDL_DialogFileFilter * is a null-terminated list of pointers to C strings, each containing a * path. * - * The filelist argument does not need to be freed; it will automatically be - * freed when the callback returns. + * The filelist argument should not be freed; it will automatically be freed + * when the callback returns. * * The filter argument is the index of the filter that was selected, or -1 if * no filter was selected or if the platform or method doesn't support @@ -87,7 +87,7 @@ typedef struct SDL_DialogFileFilter * \param filelist the file(s) chosen by the user. * \param filter index of the selected filter. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_DialogFileFilter * \sa SDL_ShowOpenFileDialog @@ -118,33 +118,23 @@ typedef void (SDLCALL *SDL_DialogFileCallback)(void *userdata, const char * cons * requires an event-handling loop. Apps that do not use SDL to handle events * should add a call to SDL_PumpEvents in their main loop. * - * \param callback an SDL_DialogFileCallback to be invoked when the user - * selects a file and accepts, or cancels the dialog, or an - * error occurs. The first argument is a null-terminated list - * of C strings, representing the paths chosen by the user. - * The list will be empty if the user canceled the dialog, and - * it will be NULL if an error occurred. If an error occurred, - * it can be fetched with SDL_GetError(). The second argument - * is the userdata pointer passed to the function. The third - * argument is the index of the filter selected by the user, - * or one past the index of the last filter (therefore the - * index of the terminating NULL filter) if no filter was - * chosen, or -1 if the platform does not support detecting - * the selected filter. + * \param callback a function pointer to be invoked when the user selects a + * file and accepts, or cancels the dialog, or an error + * occurs. * \param userdata an optional pointer to pass extra data to the callback when * it will be invoked. * \param window the window that the dialog should be modal for, may be NULL. * Not all platforms support this option. - * \param filters a list of SDL_DialogFileFilter's, may be NULL. Not all - * platforms support this option, and platforms that do support - * it may allow the user to ignore the filters. + * \param filters a list of filters, may be NULL. Not all platforms support + * this option, and platforms that do support it may allow the + * user to ignore the filters. * \param nfilters the number of filters. Ignored if filters is NULL. * \param default_location the default folder or file to start the dialog at, * may be NULL. Not all platforms support this option. * \param allow_many if non-zero, the user will be allowed to select multiple * entries. Not all platforms support this option. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DialogFileCallback * \sa SDL_DialogFileFilter @@ -175,31 +165,21 @@ extern SDL_DECLSPEC void SDLCALL SDL_ShowOpenFileDialog(SDL_DialogFileCallback c * requires an event-handling loop. Apps that do not use SDL to handle events * should add a call to SDL_PumpEvents in their main loop. * - * \param callback an SDL_DialogFileCallback to be invoked when the user - * selects a file and accepts, or cancels the dialog, or an - * error occurs. The first argument is a null-terminated list - * of C strings, representing the paths chosen by the user. - * The list will be empty if the user canceled the dialog, and - * it will be NULL if an error occurred. If an error occurred, - * it can be fetched with SDL_GetError(). The second argument - * is the userdata pointer passed to the function. The third - * argument is the index of the filter selected by the user, - * or one past the index of the last filter (therefore the - * index of the terminating NULL filter) if no filter was - * chosen, or -1 if the platform does not support detecting - * the selected filter. + * \param callback a function pointer to be invoked when the user selects a + * file and accepts, or cancels the dialog, or an error + * occurs. * \param userdata an optional pointer to pass extra data to the callback when * it will be invoked. * \param window the window that the dialog should be modal for, may be NULL. * Not all platforms support this option. - * \param filters a list of SDL_DialogFileFilter's, may be NULL. Not all - * platforms support this option, and platforms that do support - * it may allow the user to ignore the filters. + * \param filters a list of filters, may be NULL. Not all platforms support + * this option, and platforms that do support it may allow the + * user to ignore the filters. * \param nfilters the number of filters. Ignored if filters is NULL. * \param default_location the default folder or file to start the dialog at, * may be NULL. Not all platforms support this option. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DialogFileCallback * \sa SDL_DialogFileFilter @@ -230,15 +210,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_ShowSaveFileDialog(SDL_DialogFileCallback c * requires an event-handling loop. Apps that do not use SDL to handle events * should add a call to SDL_PumpEvents in their main loop. * - * \param callback an SDL_DialogFileCallback to be invoked when the user - * selects a file and accepts, or cancels the dialog, or an - * error occurs. The first argument is a null-terminated list - * of C strings, representing the paths chosen by the user. - * The list will be empty if the user canceled the dialog, and - * it will be NULL if an error occurred. If an error occurred, - * it can be fetched with SDL_GetError(). The second argument - * is the userdata pointer passed to the function. The third - * argument is always -1 for SDL_ShowOpenFolderDialog. + * \param callback a function pointer to be invoked when the user selects a + * file and accepts, or cancels the dialog, or an error + * occurs. * \param userdata an optional pointer to pass extra data to the callback when * it will be invoked. * \param window the window that the dialog should be modal for, may be NULL. @@ -248,7 +222,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ShowSaveFileDialog(SDL_DialogFileCallback c * \param allow_many if non-zero, the user will be allowed to select multiple * entries. Not all platforms support this option. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DialogFileCallback * \sa SDL_ShowOpenFileDialog diff --git a/Source/ThirdParty/SDL/SDL3/SDL_endian.h b/Source/ThirdParty/SDL/SDL3/SDL_endian.h index cb3d7f34e..888180443 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_endian.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_endian.h @@ -309,7 +309,7 @@ SDL_FORCE_INLINE Uint64 SDL_Swap64(Uint64 x) * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ SDL_FORCE_INLINE float SDL_SwapFloat(float x) { @@ -348,7 +348,7 @@ SDL_FORCE_INLINE float SDL_SwapFloat(float x) * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x) { return x_but_byteswapped; } @@ -369,7 +369,7 @@ SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x) { return x_but_byteswapped; } * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x) { return x_but_byteswapped; } @@ -390,7 +390,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x) { return x_but_byteswapped; } * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; } @@ -404,7 +404,9 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; } * \param x the value to swap, in littleendian byte order. * \returns `x` in native byte order. * - * \since This macro is available since SDL 3.0.0. + * \threadsafety It is safe to call this macro from any thread. + * + * \since This macro is available since SDL 3.1.3. */ #define SDL_Swap16LE(x) SwapOnlyIfNecessary(x) @@ -418,7 +420,9 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; } * \param x the value to swap, in littleendian byte order. * \returns `x` in native byte order. * - * \since This macro is available since SDL 3.0.0. + * \threadsafety It is safe to call this macro from any thread. + * + * \since This macro is available since SDL 3.1.3. */ #define SDL_Swap32LE(x) SwapOnlyIfNecessary(x) @@ -432,7 +436,9 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; } * \param x the value to swap, in littleendian byte order. * \returns `x` in native byte order. * - * \since This macro is available since SDL 3.0.0. + * \threadsafety It is safe to call this macro from any thread. + * + * \since This macro is available since SDL 3.1.3. */ #define SDL_Swap64LE(x) SwapOnlyIfNecessary(x) @@ -446,7 +452,9 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; } * \param x the value to swap, in littleendian byte order. * \returns `x` in native byte order. * - * \since This macro is available since SDL 3.0.0. + * \threadsafety It is safe to call this macro from any thread. + * + * \since This macro is available since SDL 3.1.3. */ #define SDL_SwapFloatLE(x) SwapOnlyIfNecessary(x) @@ -460,7 +468,9 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; } * \param x the value to swap, in bigendian byte order. * \returns `x` in native byte order. * - * \since This macro is available since SDL 3.0.0. + * \threadsafety It is safe to call this macro from any thread. + * + * \since This macro is available since SDL 3.1.3. */ #define SDL_Swap16BE(x) SwapOnlyIfNecessary(x) @@ -474,7 +484,9 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; } * \param x the value to swap, in bigendian byte order. * \returns `x` in native byte order. * - * \since This macro is available since SDL 3.0.0. + * \threadsafety It is safe to call this macro from any thread. + * + * \since This macro is available since SDL 3.1.3. */ #define SDL_Swap32BE(x) SwapOnlyIfNecessary(x) @@ -488,7 +500,9 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; } * \param x the value to swap, in bigendian byte order. * \returns `x` in native byte order. * - * \since This macro is available since SDL 3.0.0. + * \threadsafety It is safe to call this macro from any thread. + * + * \since This macro is available since SDL 3.1.3. */ #define SDL_Swap64BE(x) SwapOnlyIfNecessary(x) @@ -502,7 +516,9 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; } * \param x the value to swap, in bigendian byte order. * \returns `x` in native byte order. * - * \since This macro is available since SDL 3.0.0. + * \threadsafety It is safe to call this macro from any thread. + * + * \since This macro is available since SDL 3.1.3. */ #define SDL_SwapFloatBE(x) SwapOnlyIfNecessary(x) diff --git a/Source/ThirdParty/SDL/SDL3/SDL_error.h b/Source/ThirdParty/SDL/SDL3/SDL_error.h index 9256ff297..6818e411a 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_error.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_error.h @@ -78,13 +78,35 @@ extern "C" { * any. * \returns false. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_ClearError * \sa SDL_GetError + * \sa SDL_SetErrorV */ extern SDL_DECLSPEC bool SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); +/** + * Set the SDL error message for the current thread. + * + * Calling this function will replace any previous error message that was set. + * + * \param fmt a printf()-style message format string. + * \param ap a variable argument list. + * \returns false. + * + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.6. + * + * \sa SDL_ClearError + * \sa SDL_GetError + * \sa SDL_SetError + */ +extern SDL_DECLSPEC bool SDLCALL SDL_SetErrorV(SDL_PRINTF_FORMAT_STRING const char *fmt, va_list ap) SDL_PRINTF_VARARG_FUNCV(1); + /** * Set an error indicating that memory allocation failed. * @@ -92,7 +114,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const cha * * \returns false. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_OutOfMemory(void); @@ -124,7 +148,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_OutOfMemory(void); * or an empty string if there hasn't been an error message set since * the last call to SDL_ClearError(). * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_ClearError * \sa SDL_SetError @@ -136,7 +162,9 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetError(void); * * \returns true. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetError * \sa SDL_SetError diff --git a/Source/ThirdParty/SDL/SDL3/SDL_events.h b/Source/ThirdParty/SDL/SDL3/SDL_events.h index fc175df8a..aa1691b95 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_events.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_events.h @@ -55,7 +55,7 @@ extern "C" { /** * The types of events that can be delivered. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_EventType { @@ -133,7 +133,7 @@ typedef enum SDL_EventType SDL_EVENT_WINDOW_ENTER_FULLSCREEN, /**< The window has entered fullscreen mode */ SDL_EVENT_WINDOW_LEAVE_FULLSCREEN, /**< The window has left fullscreen mode */ SDL_EVENT_WINDOW_DESTROYED, /**< The window with the associated ID is being or has been destroyed. If this message is being handled - in an event watcher, the window handle is still valid and can still be used to retrieve any userdata + in an event watcher, the window handle is still valid and can still be used to retrieve any properties associated with the window. Otherwise, the handle has already been destroyed and all resources associated with it are invalid */ SDL_EVENT_WINDOW_HDR_STATE_CHANGED, /**< Window HDR properties have changed */ @@ -228,6 +228,13 @@ typedef enum SDL_EventType /* Render events */ SDL_EVENT_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */ SDL_EVENT_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */ + SDL_EVENT_RENDER_DEVICE_LOST, /**< The device has been lost and can't be recovered. */ + + /* Reserved events for private platforms */ + SDL_EVENT_PRIVATE0 = 0x4000, + SDL_EVENT_PRIVATE1, + SDL_EVENT_PRIVATE2, + SDL_EVENT_PRIVATE3, /* Internal events */ SDL_EVENT_POLL_SENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */ @@ -250,7 +257,7 @@ typedef enum SDL_EventType /** * Fields shared by every event * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_CommonEvent { @@ -262,7 +269,7 @@ typedef struct SDL_CommonEvent /** * Display state change event data (event.display.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_DisplayEvent { @@ -277,7 +284,7 @@ typedef struct SDL_DisplayEvent /** * Window state change event data (event.window.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_WindowEvent { @@ -292,7 +299,7 @@ typedef struct SDL_WindowEvent /** * Keyboard device event structure (event.kdevice.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_KeyboardDeviceEvent { @@ -311,7 +318,7 @@ typedef struct SDL_KeyboardDeviceEvent * event scancode and modifiers directly from the keyboard layout, bypassing * SDL_HINT_KEYCODE_OPTIONS, by calling SDL_GetKeyFromScancode(). * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_GetKeyFromScancode * \sa SDL_HINT_KEYCODE_OPTIONS @@ -338,7 +345,7 @@ typedef struct SDL_KeyboardEvent * will be inserted into the editing text. The length is the number of UTF-8 * characters that will be replaced by new typing. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_TextEditingEvent { @@ -354,7 +361,7 @@ typedef struct SDL_TextEditingEvent /** * Keyboard IME candidates event structure (event.edit_candidates.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_TextEditingCandidatesEvent { @@ -377,7 +384,7 @@ typedef struct SDL_TextEditingCandidatesEvent * This event will never be delivered unless text input is enabled by calling * SDL_StartTextInput(). Text input is disabled by default! * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_StartTextInput * \sa SDL_StopTextInput @@ -394,7 +401,7 @@ typedef struct SDL_TextInputEvent /** * Mouse device event structure (event.mdevice.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_MouseDeviceEvent { @@ -407,7 +414,7 @@ typedef struct SDL_MouseDeviceEvent /** * Mouse motion event structure (event.motion.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_MouseMotionEvent { @@ -426,7 +433,7 @@ typedef struct SDL_MouseMotionEvent /** * Mouse button event structure (event.button.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_MouseButtonEvent { @@ -446,7 +453,7 @@ typedef struct SDL_MouseButtonEvent /** * Mouse wheel event structure (event.wheel.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_MouseWheelEvent { @@ -465,7 +472,7 @@ typedef struct SDL_MouseWheelEvent /** * Joystick axis motion event structure (event.jaxis.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_JoyAxisEvent { @@ -484,7 +491,7 @@ typedef struct SDL_JoyAxisEvent /** * Joystick trackball motion event structure (event.jball.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_JoyBallEvent { @@ -503,7 +510,7 @@ typedef struct SDL_JoyBallEvent /** * Joystick hat position change event structure (event.jhat.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_JoyHatEvent { @@ -526,7 +533,7 @@ typedef struct SDL_JoyHatEvent /** * Joystick button event structure (event.jbutton.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_JoyButtonEvent { @@ -543,7 +550,12 @@ typedef struct SDL_JoyButtonEvent /** * Joystick device event structure (event.jdevice.*) * - * \since This struct is available since SDL 3.0.0. + * SDL will send JOYSTICK_ADDED events for devices that are already plugged in + * during SDL_Init. + * + * \since This struct is available since SDL 3.1.3. + * + * \sa SDL_GamepadDeviceEvent */ typedef struct SDL_JoyDeviceEvent { @@ -554,9 +566,9 @@ typedef struct SDL_JoyDeviceEvent } SDL_JoyDeviceEvent; /** - * Joysick battery level change event structure (event.jbattery.*) + * Joystick battery level change event structure (event.jbattery.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_JoyBatteryEvent { @@ -571,7 +583,7 @@ typedef struct SDL_JoyBatteryEvent /** * Gamepad axis motion event structure (event.gaxis.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_GamepadAxisEvent { @@ -591,7 +603,7 @@ typedef struct SDL_GamepadAxisEvent /** * Gamepad button event structure (event.gbutton.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_GamepadButtonEvent { @@ -609,7 +621,16 @@ typedef struct SDL_GamepadButtonEvent /** * Gamepad device event structure (event.gdevice.*) * - * \since This struct is available since SDL 3.0.0. + * Joysticks that are supported gamepads receive both an SDL_JoyDeviceEvent + * and an SDL_GamepadDeviceEvent. + * + * SDL will send GAMEPAD_ADDED events for joysticks that are already plugged + * in during SDL_Init() and are recognized as gamepads. It will also send + * events for joysticks that get gamepad mappings at runtime. + * + * \since This struct is available since SDL 3.1.3. + * + * \sa SDL_JoyDeviceEvent */ typedef struct SDL_GamepadDeviceEvent { @@ -622,7 +643,7 @@ typedef struct SDL_GamepadDeviceEvent /** * Gamepad touchpad event structure (event.gtouchpad.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_GamepadTouchpadEvent { @@ -640,7 +661,7 @@ typedef struct SDL_GamepadTouchpadEvent /** * Gamepad sensor event structure (event.gsensor.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_GamepadSensorEvent { @@ -656,7 +677,7 @@ typedef struct SDL_GamepadSensorEvent /** * Audio device event structure (event.adevice.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_AudioDeviceEvent { @@ -673,7 +694,7 @@ typedef struct SDL_AudioDeviceEvent /** * Camera device event structure (event.cdevice.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_CameraDeviceEvent { @@ -683,10 +704,39 @@ typedef struct SDL_CameraDeviceEvent SDL_CameraID which; /**< SDL_CameraID for the device being added or removed or changing */ } SDL_CameraDeviceEvent; + +/** + * Renderer event structure (event.render.*) + * + * \since This struct is available since SDL 3.1.7. + */ +typedef struct SDL_RenderEvent +{ + SDL_EventType type; /**< SDL_EVENT_RENDER_TARGETS_RESET, SDL_EVENT_RENDER_DEVICE_RESET, SDL_EVENT_RENDER_DEVICE_LOST */ + Uint32 reserved; + Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */ + SDL_WindowID windowID; /**< The window containing the renderer in question. */ +} SDL_RenderEvent; + + /** * Touch finger event structure (event.tfinger.*) * - * \since This struct is available since SDL 3.0.0. + * Coordinates in this event are normalized. `x` and `y` are normalized to a + * range between 0.0f and 1.0f, relative to the window, so (0,0) is the top + * left and (1,1) is the bottom right. Delta coordinates `dx` and `dy` are + * normalized in the ranges of -1.0f (traversed all the way from the bottom or + * right to all the way up or left) to 1.0f (traversed all the way from the + * top or left to all the way down or right). + * + * Note that while the coordinates are _normalized_, they are not _clamped_, + * which means in some circumstances you can get a value outside of this + * range. For example, a renderer using logical presentation might give a + * negative value when the touch is in the letterboxing. Some platforms might + * report a touch outside of the window, which will also be outside of the + * range. + * + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_TouchFingerEvent { @@ -716,7 +766,7 @@ typedef struct SDL_TouchFingerEvent * is there." The pen touching and lifting off from the tablet while not * leaving the area are handled by SDL_EVENT_PEN_DOWN and SDL_EVENT_PEN_UP. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_PenProximityEvent { @@ -736,7 +786,7 @@ typedef struct SDL_PenProximityEvent * `pen_state & SDL_PEN_INPUT_DOWN` to decide if a pen is "drawing" when * dealing with pen motion. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_PenMotionEvent { @@ -756,7 +806,7 @@ typedef struct SDL_PenMotionEvent * These events come when a pen touches a surface (a tablet, etc), or lifts * off from one. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_PenTouchEvent { @@ -778,7 +828,7 @@ typedef struct SDL_PenTouchEvent * This is for buttons on the pen itself that the user might click. The pen * itself pressing down to draw triggers a SDL_EVENT_PEN_DOWN event instead. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_PenButtonEvent { @@ -800,7 +850,7 @@ typedef struct SDL_PenButtonEvent * You might get some of these events even if the pen isn't touching the * tablet. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_PenAxisEvent { @@ -820,7 +870,7 @@ typedef struct SDL_PenAxisEvent * An event used to drop text or request a file open by the system * (event.drop.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_DropEvent { @@ -838,19 +888,22 @@ typedef struct SDL_DropEvent * An event triggered when the clipboard contents have changed * (event.clipboard.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_ClipboardEvent { SDL_EventType type; /**< SDL_EVENT_CLIPBOARD_UPDATE */ Uint32 reserved; Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */ + bool owner; /**< are we owning the clipboard (internal update) */ + Sint32 n_mime_types; /**< number of mime types */ + const char **mime_types; /**< current mime types */ } SDL_ClipboardEvent; /** * Sensor event structure (event.sensor.*) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_SensorEvent { @@ -865,7 +918,7 @@ typedef struct SDL_SensorEvent /** * The "quit requested" event * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_QuitEvent { @@ -883,7 +936,7 @@ typedef struct SDL_QuitEvent * the programmer; the only requirement is that '''type''' is a value obtained * from SDL_RegisterEvents(). * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_UserEvent { @@ -900,7 +953,10 @@ typedef struct SDL_UserEvent /** * The structure for all events in SDL. * - * \since This struct is available since SDL 3.0.0. + * The SDL_Event structure is the core of all event handling in SDL. SDL_Event + * is a union of all event structures used in SDL. + * + * \since This struct is available since SDL 3.1.3. */ typedef union SDL_Event { @@ -939,6 +995,7 @@ typedef union SDL_Event SDL_PenMotionEvent pmotion; /**< Pen motion event data */ SDL_PenButtonEvent pbutton; /**< Pen button event data */ SDL_PenAxisEvent paxis; /**< Pen axis event data */ + SDL_RenderEvent render; /**< Render event data */ SDL_DropEvent drop; /**< Drag and drop event data */ SDL_ClipboardEvent clipboard; /**< Clipboard event data */ @@ -969,10 +1026,6 @@ SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NUL * * This function updates the event queue and internal input device state. * - * **WARNING**: This should only be run in the thread that initialized the - * video subsystem, and for extra safety, you should consider only doing those - * things on the main thread in any case. - * * SDL_PumpEvents() gathers all the pending input information from devices and * places it in the event queue. Without calls to SDL_PumpEvents() no events * would ever be placed on the queue. Often the need for calls to @@ -981,7 +1034,11 @@ SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NUL * polling or waiting for events (e.g. you are filtering them), then you must * call SDL_PumpEvents() to force an event queue update. * - * \since This function is available since SDL 3.0.0. + * \threadsafety This should only be run in the thread that initialized the + * video subsystem, and for extra safety, you should consider + * only doing those things on the main thread in any case. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_PollEvent * \sa SDL_WaitEvent @@ -993,7 +1050,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_PumpEvents(void); /** * The type of action to request from SDL_PeepEvents(). * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_EventAction { @@ -1022,8 +1079,6 @@ typedef enum SDL_EventAction * Otherwise, the events may not be ready to be filtered when you call * SDL_PeepEvents(). * - * This function is thread-safe. - * * \param events destination buffer for the retrieved events, may be NULL to * leave the events in the queue and return the number of events * that would have been stored. @@ -1038,7 +1093,9 @@ typedef enum SDL_EventAction * \returns the number of events actually stored or -1 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_PollEvent * \sa SDL_PumpEvents @@ -1057,7 +1114,9 @@ extern SDL_DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event *events, int numevents, * \returns true if events matching `type` are present, or false if events * matching `type` are not present. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasEvents */ @@ -1076,7 +1135,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasEvent(Uint32 type); * \returns true if events with type >= `minType` and <= `maxType` are * present, or false if not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasEvents */ @@ -1102,7 +1163,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType); * * \param type the type of event to be cleared; see SDL_EventType for details. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_FlushEvents */ @@ -1127,7 +1190,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type); * \param maxType the high end of event type to be cleared, inclusive; see * SDL_EventType for details. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_FlushEvent */ @@ -1169,7 +1234,11 @@ extern SDL_DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType) * the queue, or NULL. * \returns true if this got an event or false if there are none available. * - * \since This function is available since SDL 3.0.0. + * \threadsafety This should only be run in the thread that initialized the + * video subsystem, and for extra safety, you should consider + * only doing those things on the main thread in any case. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_PushEvent * \sa SDL_WaitEvent @@ -1191,7 +1260,11 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PollEvent(SDL_Event *event); * \returns true on success or false if there was an error while waiting for * events; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \threadsafety This should only be run in the thread that initialized the + * video subsystem, and for extra safety, you should consider + * only doing those things on the main thread in any case. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_PollEvent * \sa SDL_PushEvent @@ -1219,7 +1292,11 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitEvent(SDL_Event *event); * \returns true if this got an event or false if the timeout elapsed without * any events available. * - * \since This function is available since SDL 3.0.0. + * \threadsafety This should only be run in the thread that initialized the + * video subsystem, and for extra safety, you should consider + * only doing those things on the main thread in any case. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_PollEvent * \sa SDL_PushEvent @@ -1239,8 +1316,6 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitEventTimeout(SDL_Event *event, Sint32 t * Note: Pushing device input events onto the queue doesn't modify the state * of the device within SDL. * - * This function is thread-safe, and can be called from other threads safely. - * * Note: Events pushed onto the queue with SDL_PushEvent() get passed through * the event filter but events added with SDL_PeepEvents() do not. * @@ -1253,7 +1328,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitEventTimeout(SDL_Event *event, Sint32 t * call SDL_GetError() for more information. A common reason for * error is the event queue being full. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_PeepEvents * \sa SDL_PollEvent @@ -1275,7 +1352,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PushEvent(SDL_Event *event); * application is responsible for locking resources the callback * touches that need to be protected. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_SetEventFilter * \sa SDL_AddEventWatch @@ -1316,11 +1393,9 @@ typedef bool (SDLCALL *SDL_EventFilter)(void *userdata, SDL_Event *event); * \param filter an SDL_EventFilter function to call when an event happens. * \param userdata a pointer that is passed to `filter`. * - * \threadsafety SDL may call the filter callback at any time from any thread; - * the application is responsible for locking resources the - * callback touches that need to be protected. + * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AddEventWatch * \sa SDL_SetEventEnabled @@ -1341,7 +1416,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter, void * be stored here. * \returns true on success or false if there is no event filter set. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetEventFilter */ @@ -1372,7 +1449,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetEventFilter(SDL_EventFilter *filter, voi * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RemoveEventWatch * \sa SDL_SetEventFilter @@ -1388,7 +1465,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_AddEventWatch(SDL_EventFilter filter, void * \param filter the function originally passed to SDL_AddEventWatch(). * \param userdata the pointer originally passed to SDL_AddEventWatch(). * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_AddEventWatch */ @@ -1405,7 +1484,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_RemoveEventWatch(SDL_EventFilter filter, vo * \param filter the SDL_EventFilter function to call when an event happens. * \param userdata a pointer that is passed to `filter`. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetEventFilter * \sa SDL_SetEventFilter @@ -1418,7 +1499,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter, void * * \param type the type of event; see SDL_EventType for details. * \param enabled whether to process the event or not. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_EventEnabled */ @@ -1430,7 +1513,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetEventEnabled(Uint32 type, bool enabled); * \param type the type of event; see SDL_EventType for details. * \returns true if the event is being processed, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetEventEnabled */ @@ -1444,7 +1529,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_EventEnabled(Uint32 type); * \returns the beginning event number, or 0 if numevents is invalid or if * there are not enough user-defined events left. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_PushEvent */ @@ -1456,7 +1543,9 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents); * \param event an event containing a `windowID`. * \returns the associated window on success or NULL if there is none. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_PollEvent * \sa SDL_WaitEvent diff --git a/Source/ThirdParty/SDL/SDL3/SDL_filesystem.h b/Source/ThirdParty/SDL/SDL3/SDL_filesystem.h index 30bfea0fc..af3eae2ac 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_filesystem.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_filesystem.h @@ -73,7 +73,7 @@ extern "C" { * doesn't implement this functionality, call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPrefPath */ @@ -128,7 +128,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetBasePath(void); * etc.). This should be freed with SDL_free() when it is no longer * needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetBasePath */ @@ -159,7 +159,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_GetPrefPath(const char *org, const char * * * Note that on macOS/iOS, the Videos folder is called "Movies". * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. * * \sa SDL_GetUserFolder */ @@ -212,7 +212,7 @@ typedef enum SDL_Folder * \returns either a null-terminated C string containing the full path to the * folder, or NULL if an error happened. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetUserFolder(SDL_Folder folder); @@ -239,7 +239,7 @@ typedef struct SDL_PathInfo /** * Flags for path matching * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_GlobDirectory * \sa SDL_GlobStorageDirectory @@ -260,14 +260,14 @@ typedef Uint32 SDL_GlobFlags; * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_CreateDirectory(const char *path); /** * Possible results from an enumeration callback. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. * * \sa SDL_EnumerateDirectoryCallback */ @@ -295,7 +295,7 @@ typedef enum SDL_EnumerationResult * \param fname the next entry in the enumeration. * \returns how the enumeration should proceed. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_EnumerateDirectory */ @@ -306,11 +306,13 @@ typedef SDL_EnumerationResult (SDLCALL *SDL_EnumerateDirectoryCallback)(void *us * * This function provides every directory entry through an app-provided * callback, called once for each directory entry, until all results have been - * provided or the callback returns <= 0. + * provided or the callback returns either SDL_ENUM_SUCCESS or + * SDL_ENUM_FAILURE. * * This will return false if there was a system problem in general, or if a - * callback returns -1. A successful return means a callback returned 1 to - * halt enumeration, or all directory entries were enumerated. + * callback returns SDL_ENUM_FAILURE. A successful return means a callback + * returned SDL_ENUM_SUCCESS to halt enumeration, or all directory entries + * were enumerated. * * \param path the path of the directory to enumerate. * \param callback a function that is called for each entry in the directory. @@ -318,7 +320,7 @@ typedef SDL_EnumerationResult (SDLCALL *SDL_EnumerateDirectoryCallback)(void *us * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_EnumerateDirectory(const char *path, SDL_EnumerateDirectoryCallback callback, void *userdata); @@ -332,7 +334,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_EnumerateDirectory(const char *path, SDL_En * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_RemovePath(const char *path); @@ -355,7 +357,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RemovePath(const char *path); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_RenamePath(const char *oldpath, const char *newpath); @@ -373,7 +375,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenamePath(const char *oldpath, const char * Note that this is not an atomic operation! If something tries to read from * `newpath` while the copy is in progress, it will see an incomplete copy of * the data, and if the calling thread terminates (or the power goes out) - * during the copy, `oldpath`'s previous contents will be gone, replaced with + * during the copy, `newpath`'s previous contents will be gone, replaced with * an incomplete copy of the data. To avoid this risk, it is recommended that * the app copy to a temporary file in the same directory as `newpath`, and if * the copy is successful, use SDL_RenamePath() to replace `newpath` with the @@ -395,7 +397,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenamePath(const char *oldpath, const char * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_CopyFile(const char *oldpath, const char *newpath); @@ -408,7 +410,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CopyFile(const char *oldpath, const char *n * \returns true on success or false if the file doesn't exist, or another * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetPathInfo(const char *path, SDL_PathInfo *info); @@ -441,10 +443,28 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetPathInfo(const char *path, SDL_PathInfo * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC char ** SDLCALL SDL_GlobDirectory(const char *path, const char *pattern, SDL_GlobFlags flags, int *count); +/** + * Get what the system believes is the "current working directory." + * + * For systems without a concept of a current working directory, this will + * still attempt to provide something reasonable. + * + * SDL does not provide a means to _change_ the current working directory; for + * platforms without this concept, this would cause surprises with file access + * outside of SDL. + * + * \returns a UTF-8 string of the current working directory in + * platform-dependent notation. NULL if there's a problem. This + * should be freed with SDL_free() when it is no longer needed. + * + * \since This function is available since SDL 3.2.0. + */ +extern SDL_DECLSPEC char * SDLCALL SDL_GetCurrentDirectory(void); + /* Ends C function definitions when using C++ */ #ifdef __cplusplus } diff --git a/Source/ThirdParty/SDL/SDL3/SDL_gamepad.h b/Source/ThirdParty/SDL/SDL3/SDL_gamepad.h index a919097a9..900a80923 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_gamepad.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_gamepad.h @@ -74,7 +74,7 @@ extern "C" { /** * The structure used to identify an SDL gamepad * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_Gamepad SDL_Gamepad; @@ -124,15 +124,15 @@ typedef enum SDL_GamepadType * You can query the labels for the face buttons using * SDL_GetGamepadButtonLabel() * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_GamepadButton { SDL_GAMEPAD_BUTTON_INVALID = -1, - SDL_GAMEPAD_BUTTON_SOUTH, /* Bottom face button (e.g. Xbox A button) */ - SDL_GAMEPAD_BUTTON_EAST, /* Right face button (e.g. Xbox B button) */ - SDL_GAMEPAD_BUTTON_WEST, /* Left face button (e.g. Xbox X button) */ - SDL_GAMEPAD_BUTTON_NORTH, /* Top face button (e.g. Xbox Y button) */ + SDL_GAMEPAD_BUTTON_SOUTH, /**< Bottom face button (e.g. Xbox A button) */ + SDL_GAMEPAD_BUTTON_EAST, /**< Right face button (e.g. Xbox B button) */ + SDL_GAMEPAD_BUTTON_WEST, /**< Left face button (e.g. Xbox X button) */ + SDL_GAMEPAD_BUTTON_NORTH, /**< Top face button (e.g. Xbox Y button) */ SDL_GAMEPAD_BUTTON_BACK, SDL_GAMEPAD_BUTTON_GUIDE, SDL_GAMEPAD_BUTTON_START, @@ -144,17 +144,17 @@ typedef enum SDL_GamepadButton SDL_GAMEPAD_BUTTON_DPAD_DOWN, SDL_GAMEPAD_BUTTON_DPAD_LEFT, SDL_GAMEPAD_BUTTON_DPAD_RIGHT, - SDL_GAMEPAD_BUTTON_MISC1, /* Additional button (e.g. Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button, Google Stadia capture button) */ - SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1, /* Upper or primary paddle, under your right hand (e.g. Xbox Elite paddle P1) */ - SDL_GAMEPAD_BUTTON_LEFT_PADDLE1, /* Upper or primary paddle, under your left hand (e.g. Xbox Elite paddle P3) */ - SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2, /* Lower or secondary paddle, under your right hand (e.g. Xbox Elite paddle P2) */ - SDL_GAMEPAD_BUTTON_LEFT_PADDLE2, /* Lower or secondary paddle, under your left hand (e.g. Xbox Elite paddle P4) */ - SDL_GAMEPAD_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */ - SDL_GAMEPAD_BUTTON_MISC2, /* Additional button */ - SDL_GAMEPAD_BUTTON_MISC3, /* Additional button */ - SDL_GAMEPAD_BUTTON_MISC4, /* Additional button */ - SDL_GAMEPAD_BUTTON_MISC5, /* Additional button */ - SDL_GAMEPAD_BUTTON_MISC6, /* Additional button */ + SDL_GAMEPAD_BUTTON_MISC1, /**< Additional button (e.g. Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button, Google Stadia capture button) */ + SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1, /**< Upper or primary paddle, under your right hand (e.g. Xbox Elite paddle P1) */ + SDL_GAMEPAD_BUTTON_LEFT_PADDLE1, /**< Upper or primary paddle, under your left hand (e.g. Xbox Elite paddle P3) */ + SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2, /**< Lower or secondary paddle, under your right hand (e.g. Xbox Elite paddle P2) */ + SDL_GAMEPAD_BUTTON_LEFT_PADDLE2, /**< Lower or secondary paddle, under your left hand (e.g. Xbox Elite paddle P4) */ + SDL_GAMEPAD_BUTTON_TOUCHPAD, /**< PS4/PS5 touchpad button */ + SDL_GAMEPAD_BUTTON_MISC2, /**< Additional button */ + SDL_GAMEPAD_BUTTON_MISC3, /**< Additional button */ + SDL_GAMEPAD_BUTTON_MISC4, /**< Additional button */ + SDL_GAMEPAD_BUTTON_MISC5, /**< Additional button */ + SDL_GAMEPAD_BUTTON_MISC6, /**< Additional button */ SDL_GAMEPAD_BUTTON_COUNT } SDL_GamepadButton; @@ -167,7 +167,7 @@ typedef enum SDL_GamepadButton * For a complete set, you should look at the button and gamepad type and have * a set of symbols that work well with your art style. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_GamepadButtonLabel { @@ -194,7 +194,7 @@ typedef enum SDL_GamepadButtonLabel * pressed) when reported by SDL_GetGamepadAxis(). Note that this is not the * same range that will be reported by the lower-level SDL_GetJoystickAxis(). * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_GamepadAxis { @@ -216,7 +216,7 @@ typedef enum SDL_GamepadAxis * gamepad. This enum is used as part of SDL_GamepadBinding to specify those * mappings. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_GamepadBindingType { @@ -237,7 +237,7 @@ typedef enum SDL_GamepadBindingType * more with a simple text string. Those strings are parsed into a collection * of these structs to make it easier to operate on the data. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_GetGamepadBindings */ @@ -295,6 +295,9 @@ typedef struct SDL_GamepadBinding * * Buttons can be used as a gamepad axes and vice versa. * + * If a device with this GUID is already plugged in, SDL will generate an + * SDL_EVENT_GAMEPAD_ADDED event. + * * This string shows an example of a valid mapping for a gamepad: * * ```c @@ -307,10 +310,15 @@ typedef struct SDL_GamepadBinding * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * + * \sa SDL_AddGamepadMappingsFromFile + * \sa SDL_AddGamepadMappingsFromIO * \sa SDL_GetGamepadMapping * \sa SDL_GetGamepadMappingForGUID + * \sa SDL_HINT_GAMECONTROLLERCONFIG + * \sa SDL_HINT_GAMECONTROLLERCONFIG_FILE + * \sa SDL_EVENT_GAMEPAD_ADDED */ extern SDL_DECLSPEC int SDLCALL SDL_AddGamepadMapping(const char *mapping); @@ -323,6 +331,9 @@ extern SDL_DECLSPEC int SDLCALL SDL_AddGamepadMapping(const char *mapping); * If a new mapping is loaded for an already known gamepad GUID, the later * version will overwrite the one currently loaded. * + * Any new mappings for already plugged in controllers will generate + * SDL_EVENT_GAMEPAD_ADDED events. + * * Mappings not belonging to the current platform or with no platform field * specified will be ignored (i.e. mappings for Linux will be ignored in * Windows, etc). @@ -339,12 +350,15 @@ extern SDL_DECLSPEC int SDLCALL SDL_AddGamepadMapping(const char *mapping); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AddGamepadMapping * \sa SDL_AddGamepadMappingsFromFile * \sa SDL_GetGamepadMapping * \sa SDL_GetGamepadMappingForGUID + * \sa SDL_HINT_GAMECONTROLLERCONFIG + * \sa SDL_HINT_GAMECONTROLLERCONFIG_FILE + * \sa SDL_EVENT_GAMEPAD_ADDED */ extern SDL_DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromIO(SDL_IOStream *src, bool closeio); @@ -357,6 +371,9 @@ extern SDL_DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromIO(SDL_IOStream *src, * If a new mapping is loaded for an already known gamepad GUID, the later * version will overwrite the one currently loaded. * + * Any new mappings for already plugged in controllers will generate + * SDL_EVENT_GAMEPAD_ADDED events. + * * Mappings not belonging to the current platform or with no platform field * specified will be ignored (i.e. mappings for Linux will be ignored in * Windows, etc). @@ -367,12 +384,15 @@ extern SDL_DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromIO(SDL_IOStream *src, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AddGamepadMapping * \sa SDL_AddGamepadMappingsFromIO * \sa SDL_GetGamepadMapping * \sa SDL_GetGamepadMappingForGUID + * \sa SDL_HINT_GAMECONTROLLERCONFIG + * \sa SDL_HINT_GAMECONTROLLERCONFIG_FILE + * \sa SDL_EVENT_GAMEPAD_ADDED */ extern SDL_DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromFile(const char *file); @@ -384,7 +404,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromFile(const char *file) * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReloadGamepadMappings(void); @@ -398,7 +418,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReloadGamepadMappings(void); * single allocation that should be freed with SDL_free() when it is * no longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC char ** SDLCALL SDL_GetGamepadMappings(int *count); @@ -410,7 +430,7 @@ extern SDL_DECLSPEC char ** SDLCALL SDL_GetGamepadMappings(int *count); * information. This should be freed with SDL_free() when it is no * longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickGUIDForID * \sa SDL_GetJoystickGUID @@ -427,7 +447,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMappingForGUID(SDL_GUID guid); * available; call SDL_GetError() for more information. This should * be freed with SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AddGamepadMapping * \sa SDL_GetGamepadMappingForID @@ -447,7 +467,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMapping(SDL_Gamepad *gamepad); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AddGamepadMapping * \sa SDL_GetGamepadMapping @@ -459,7 +479,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetGamepadMapping(SDL_JoystickID instance_i * * \returns true if a gamepad is connected, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepads */ @@ -474,7 +494,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasGamepad(void); * call SDL_GetError() for more information. This should be freed * with SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasGamepad * \sa SDL_OpenGamepad @@ -488,7 +508,7 @@ extern SDL_DECLSPEC SDL_JoystickID * SDLCALL SDL_GetGamepads(int *count); * \returns true if the given joystick is supported by the gamepad interface, * false if it isn't or it's an invalid index. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoysticks * \sa SDL_OpenGamepad @@ -504,7 +524,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsGamepad(SDL_JoystickID instance_id); * \returns the name of the selected gamepad. If no name can be found, this * function returns NULL; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadName * \sa SDL_GetGamepads @@ -520,7 +540,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadNameForID(SDL_JoystickID * \returns the path of the selected gamepad. If no path can be found, this * function returns NULL; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadPath * \sa SDL_GetGamepads @@ -535,7 +555,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadPathForID(SDL_JoystickID * \param instance_id the joystick instance ID. * \returns the player index of a gamepad, or -1 if it's not available. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadPlayerIndex * \sa SDL_GetGamepads @@ -551,7 +571,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetGamepadPlayerIndexForID(SDL_JoystickID in * \returns the GUID of the selected gamepad. If called on an invalid index, * this function returns a zero GUID. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GUIDToString * \sa SDL_GetGamepads @@ -568,7 +588,7 @@ extern SDL_DECLSPEC SDL_GUID SDLCALL SDL_GetGamepadGUIDForID(SDL_JoystickID inst * \returns the USB vendor ID of the selected gamepad. If called on an invalid * index, this function returns zero. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadVendor * \sa SDL_GetGamepads @@ -585,7 +605,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendorForID(SDL_JoystickID inst * \returns the USB product ID of the selected gamepad. If called on an * invalid index, this function returns zero. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadProduct * \sa SDL_GetGamepads @@ -602,7 +622,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductForID(SDL_JoystickID ins * \returns the product version of the selected gamepad. If called on an * invalid index, this function returns zero. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadProductVersion * \sa SDL_GetGamepads @@ -617,7 +637,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductVersionForID(SDL_Joystic * \param instance_id the joystick instance ID. * \returns the gamepad type. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadType * \sa SDL_GetGamepads @@ -633,7 +653,7 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadTypeForID(SDL_Joystick * \param instance_id the joystick instance ID. * \returns the gamepad type. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadTypeForID * \sa SDL_GetGamepads @@ -650,7 +670,7 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadTypeForID(SDL_Joys * \returns the mapping string. Returns NULL if no mapping is available. This * should be freed with SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepads * \sa SDL_GetGamepadMapping @@ -664,7 +684,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMappingForID(SDL_JoystickID ins * \returns a gamepad identifier or NULL if an error occurred; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CloseGamepad * \sa SDL_IsGamepad @@ -679,7 +699,7 @@ extern SDL_DECLSPEC SDL_Gamepad * SDLCALL SDL_OpenGamepad(SDL_JoystickID instanc * \returns an SDL_Gamepad on success or NULL on failure or if it hasn't been * opened yet; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Gamepad * SDLCALL SDL_GetGamepadFromID(SDL_JoystickID instance_id); @@ -689,7 +709,7 @@ extern SDL_DECLSPEC SDL_Gamepad * SDLCALL SDL_GetGamepadFromID(SDL_JoystickID in * \param player_index the player index, which different from the instance ID. * \returns the SDL_Gamepad associated with a player index. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadPlayerIndex * \sa SDL_SetGamepadPlayerIndex @@ -719,7 +739,7 @@ extern SDL_DECLSPEC SDL_Gamepad * SDLCALL SDL_GetGamepadFromPlayerIndex(int play * \returns a valid property ID on success or 0 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGamepadProperties(SDL_Gamepad *gamepad); @@ -737,7 +757,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGamepadProperties(SDL_Gamepa * \returns the instance ID of the specified gamepad on success or 0 on * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_JoystickID SDLCALL SDL_GetGamepadID(SDL_Gamepad *gamepad); @@ -749,7 +769,7 @@ extern SDL_DECLSPEC SDL_JoystickID SDLCALL SDL_GetGamepadID(SDL_Gamepad *gamepad * \returns the implementation dependent name for the gamepad, or NULL if * there is no name or the identifier passed is invalid. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadNameForID */ @@ -763,7 +783,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadName(SDL_Gamepad *gamepad * \returns the implementation dependent path for the gamepad, or NULL if * there is no path or the identifier passed is invalid. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadPathForID */ @@ -776,7 +796,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadPath(SDL_Gamepad *gamepad * \returns the gamepad type, or SDL_GAMEPAD_TYPE_UNKNOWN if it's not * available. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadTypeForID */ @@ -789,7 +809,7 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadType(SDL_Gamepad *game * \returns the gamepad type, or SDL_GAMEPAD_TYPE_UNKNOWN if it's not * available. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRealGamepadTypeForID */ @@ -803,7 +823,7 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadType(SDL_Gamepad * * \param gamepad the gamepad object to query. * \returns the player index for gamepad, or -1 if it's not available. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetGamepadPlayerIndex */ @@ -818,7 +838,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetGamepadPlayerIndex(SDL_Gamepad *gamepad); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadPlayerIndex */ @@ -832,7 +852,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetGamepadPlayerIndex(SDL_Gamepad *gamepad, * \param gamepad the gamepad object to query. * \returns the USB vendor ID, or zero if unavailable. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadVendorForID */ @@ -846,7 +866,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendor(SDL_Gamepad *gamepad); * \param gamepad the gamepad object to query. * \returns the USB product ID, or zero if unavailable. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadProductForID */ @@ -860,7 +880,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProduct(SDL_Gamepad *gamepad); * \param gamepad the gamepad object to query. * \returns the USB product version, or zero if unavailable. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadProductVersionForID */ @@ -874,7 +894,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductVersion(SDL_Gamepad *gam * \param gamepad the gamepad object to query. * \returns the gamepad firmware version, or zero if unavailable. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadFirmwareVersion(SDL_Gamepad *gamepad); @@ -886,7 +906,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadFirmwareVersion(SDL_Gamepad *ga * \param gamepad the gamepad object to query. * \returns the serial number, or NULL if unavailable. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadSerial(SDL_Gamepad *gamepad); @@ -899,7 +919,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadSerial(SDL_Gamepad *gamep * \param gamepad the gamepad object to query. * \returns the gamepad handle, or 0 if unavailable. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetGamepadSteamHandle(SDL_Gamepad *gamepad); @@ -911,7 +931,7 @@ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetGamepadSteamHandle(SDL_Gamepad *gamepa * `SDL_JOYSTICK_CONNECTION_INVALID` on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_JoystickConnectionState SDLCALL SDL_GetGamepadConnectionState(SDL_Gamepad *gamepad); @@ -931,7 +951,7 @@ extern SDL_DECLSPEC SDL_JoystickConnectionState SDLCALL SDL_GetGamepadConnection * battery. * \returns the current battery state. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PowerState SDLCALL SDL_GetGamepadPowerInfo(SDL_Gamepad *gamepad, int *percent); @@ -943,7 +963,7 @@ extern SDL_DECLSPEC SDL_PowerState SDLCALL SDL_GetGamepadPowerInfo(SDL_Gamepad * * \returns true if the gamepad has been opened and is currently connected, or * false if not. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GamepadConnected(SDL_Gamepad *gamepad); @@ -963,7 +983,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GamepadConnected(SDL_Gamepad *gamepad); * \returns an SDL_Joystick object, or NULL on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Joystick * SDLCALL SDL_GetGamepadJoystick(SDL_Gamepad *gamepad); @@ -975,7 +995,7 @@ extern SDL_DECLSPEC SDL_Joystick * SDLCALL SDL_GetGamepadJoystick(SDL_Gamepad *g * * \param enabled whether to process gamepad events or not. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GamepadEventsEnabled * \sa SDL_UpdateGamepads @@ -990,7 +1010,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetGamepadEventsEnabled(bool enabled); * * \returns true if gamepad events are being processed, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetGamepadEventsEnabled */ @@ -1006,7 +1026,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GamepadEventsEnabled(void); * single allocation that should be freed with SDL_free() when it is * no longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_GamepadBinding ** SDLCALL SDL_GetGamepadBindings(SDL_Gamepad *gamepad, int *count); @@ -1017,7 +1037,7 @@ extern SDL_DECLSPEC SDL_GamepadBinding ** SDLCALL SDL_GetGamepadBindings(SDL_Gam * enabled. Under such circumstances, it will not be necessary to call this * function. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_UpdateGamepads(void); @@ -1033,7 +1053,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UpdateGamepads(void); * \returns the SDL_GamepadType enum corresponding to the input string, or * `SDL_GAMEPAD_TYPE_UNKNOWN` if no match was found. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadStringForType */ @@ -1047,7 +1067,7 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadTypeFromString(const c * specified. The string returned is of the format used by * SDL_Gamepad mapping strings. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadTypeFromString */ @@ -1069,7 +1089,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadStringForType(SDL_Gamepad * \returns the SDL_GamepadAxis enum corresponding to the input string, or * `SDL_GAMEPAD_AXIS_INVALID` if no match was found. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadStringForAxis */ @@ -1083,7 +1103,7 @@ extern SDL_DECLSPEC SDL_GamepadAxis SDLCALL SDL_GetGamepadAxisFromString(const c * specified. The string returned is of the format used by * SDL_Gamepad mapping strings. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadAxisFromString */ @@ -1099,7 +1119,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadStringForAxis(SDL_Gamepad * \param axis an axis enum value (an SDL_GamepadAxis value). * \returns true if the gamepad has this axis, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GamepadHasButton * \sa SDL_GetGamepadAxis @@ -1123,7 +1143,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GamepadHasAxis(SDL_Gamepad *gamepad, SDL_Ga * \returns axis state (including 0) on success or 0 (also) on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GamepadHasAxis * \sa SDL_GetGamepadButton @@ -1142,7 +1162,7 @@ extern SDL_DECLSPEC Sint16 SDLCALL SDL_GetGamepadAxis(SDL_Gamepad *gamepad, SDL_ * \returns the SDL_GamepadButton enum corresponding to the input string, or * `SDL_GAMEPAD_BUTTON_INVALID` if no match was found. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadStringForButton */ @@ -1156,7 +1176,7 @@ extern SDL_DECLSPEC SDL_GamepadButton SDLCALL SDL_GetGamepadButtonFromString(con * specified. The string returned is of the format used by * SDL_Gamepad mapping strings. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadButtonFromString */ @@ -1172,7 +1192,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadStringForButton(SDL_Gamep * \param button a button enum value (an SDL_GamepadButton value). * \returns true if the gamepad has this button, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GamepadHasAxis */ @@ -1185,7 +1205,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GamepadHasButton(SDL_Gamepad *gamepad, SDL_ * \param button a button index (one of the SDL_GamepadButton values). * \returns true if the button is pressed, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GamepadHasButton * \sa SDL_GetGamepadAxis @@ -1199,7 +1219,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetGamepadButton(SDL_Gamepad *gamepad, SDL_ * \param button a button index (one of the SDL_GamepadButton values). * \returns the SDL_GamepadButtonLabel enum corresponding to the button label. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadButtonLabel */ @@ -1212,7 +1232,7 @@ extern SDL_DECLSPEC SDL_GamepadButtonLabel SDLCALL SDL_GetGamepadButtonLabelForT * \param button a button index (one of the SDL_GamepadButton values). * \returns the SDL_GamepadButtonLabel enum corresponding to the button label. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadButtonLabelForType */ @@ -1224,7 +1244,7 @@ extern SDL_DECLSPEC SDL_GamepadButtonLabel SDLCALL SDL_GetGamepadButtonLabel(SDL * \param gamepad a gamepad. * \returns number of touchpads. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetNumGamepadTouchpadFingers */ @@ -1238,7 +1258,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumGamepadTouchpads(SDL_Gamepad *gamepad) * \param touchpad a touchpad. * \returns number of supported simultaneous fingers. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadTouchpadFinger * \sa SDL_GetNumGamepadTouchpads @@ -1261,7 +1281,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumGamepadTouchpadFingers(SDL_Gamepad *ga * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetNumGamepadTouchpadFingers */ @@ -1274,7 +1294,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetGamepadTouchpadFinger(SDL_Gamepad *gamep * \param type the type of sensor to query. * \returns true if the sensor exists, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadSensorData * \sa SDL_GetGamepadSensorDataRate @@ -1291,7 +1311,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GamepadHasSensor(SDL_Gamepad *gamepad, SDL_ * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GamepadHasSensor * \sa SDL_GamepadSensorEnabled @@ -1305,7 +1325,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetGamepadSensorEnabled(SDL_Gamepad *gamepa * \param type the type of sensor to query. * \returns true if the sensor is enabled, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetGamepadSensorEnabled */ @@ -1318,7 +1338,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GamepadSensorEnabled(SDL_Gamepad *gamepad, * \param type the type of sensor to query. * \returns the data rate, or 0.0f if the data rate is not available. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC float SDLCALL SDL_GetGamepadSensorDataRate(SDL_Gamepad *gamepad, SDL_SensorType type); @@ -1335,7 +1355,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetGamepadSensorDataRate(SDL_Gamepad *game * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetGamepadSensorData(SDL_Gamepad *gamepad, SDL_SensorType type, float *data, int num_values); @@ -1357,7 +1377,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetGamepadSensorData(SDL_Gamepad *gamepad, * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_RumbleGamepad(SDL_Gamepad *gamepad, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); @@ -1383,7 +1403,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RumbleGamepad(SDL_Gamepad *gamepad, Uint16 * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RumbleGamepad */ @@ -1405,7 +1425,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RumbleGamepadTriggers(SDL_Gamepad *gamepad, * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetGamepadLED(SDL_Gamepad *gamepad, Uint8 red, Uint8 green, Uint8 blue); @@ -1418,7 +1438,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetGamepadLED(SDL_Gamepad *gamepad, Uint8 r * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SendGamepadEffect(SDL_Gamepad *gamepad, const void *data, int size); @@ -1428,7 +1448,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SendGamepadEffect(SDL_Gamepad *gamepad, con * \param gamepad a gamepad identifier previously returned by * SDL_OpenGamepad(). * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenGamepad */ @@ -1442,7 +1462,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_CloseGamepad(SDL_Gamepad *gamepad); * \param button a button on the gamepad. * \returns the sfSymbolsName or NULL if the name can't be found. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadAppleSFSymbolsNameForAxis */ @@ -1455,7 +1475,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadAppleSFSymbolsNameForButt * \param axis an axis on the gamepad. * \returns the sfSymbolsName or NULL if the name can't be found. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGamepadAppleSFSymbolsNameForButton */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_gpu.h b/Source/ThirdParty/SDL/SDL3/SDL_gpu.h index 7cb5bcb20..0e7c9fd84 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_gpu.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_gpu.h @@ -96,8 +96,8 @@ * efficient way of doing this, provided that the app is willing to tolerate * some latency. When the app uses SDL_DownloadFromGPUTexture() or * SDL_DownloadFromGPUBuffer(), submitting the command buffer with - * SubmitGPUCommandBufferAndAcquireFence() will return a fence handle that the - * app can poll or wait on in a thread. Once the fence indicates that the + * SDL_SubmitGPUCommandBufferAndAcquireFence() will return a fence handle that + * the app can poll or wait on in a thread. Once the fence indicates that the * command buffer is done processing, it is safe to read the downloaded data. * Make sure to call SDL_ReleaseGPUFence() when done with the fence. * @@ -128,10 +128,9 @@ * explaining this situation. * * It is optimal for apps to pre-compile the shader formats they might use, - * but for ease of use SDL provides a - * [satellite single-header library](https://github.com/libsdl-org/SDL_gpu_shadercross - * ) - * for performing runtime shader cross-compilation. + * but for ease of use SDL provides a separate project, + * [SDL_gpu_shadercross](https://github.com/libsdl-org/SDL_gpu_shadercross) + * , for performing runtime shader cross-compilation. * * This is an extremely quick overview that leaves out several important * details. Already, though, one can see that GPU programming can be quite @@ -149,6 +148,17 @@ * Examples demonstrating proper usage of this API can be found * [here](https://github.com/TheSpydog/SDL_gpu_examples) * . + * + * ## FAQ + * + * **Question: When are you adding more advanced features, like ray tracing or + * mesh shaders?** + * + * Answer: We don't have immediate plans to add more bleeding-edge features, + * but we certainly might in the future, when these features prove worthwhile, + * and reasonable to implement across several platforms and underlying APIs. + * So while these things are not in the "never" category, they are definitely + * not "near future" items either. */ #ifndef SDL_gpu_h_ @@ -171,7 +181,7 @@ extern "C" { /** * An opaque handle representing the SDL_GPU context. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 */ typedef struct SDL_GPUDevice SDL_GPUDevice; @@ -181,7 +191,7 @@ typedef struct SDL_GPUDevice SDL_GPUDevice; * Used for vertices, indices, indirect draw commands, and general compute * data. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_CreateGPUBuffer * \sa SDL_SetGPUBufferName @@ -205,7 +215,7 @@ typedef struct SDL_GPUBuffer SDL_GPUBuffer; * * Used for transferring data to and from the device. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_CreateGPUTransferBuffer * \sa SDL_MapGPUTransferBuffer @@ -221,7 +231,7 @@ typedef struct SDL_GPUTransferBuffer SDL_GPUTransferBuffer; /** * An opaque handle representing a texture. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_CreateGPUTexture * \sa SDL_SetGPUTextureName @@ -242,7 +252,7 @@ typedef struct SDL_GPUTexture SDL_GPUTexture; /** * An opaque handle representing a sampler. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_CreateGPUSampler * \sa SDL_BindGPUVertexSamplers @@ -254,7 +264,7 @@ typedef struct SDL_GPUSampler SDL_GPUSampler; /** * An opaque handle representing a compiled shader object. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_CreateGPUShader * \sa SDL_CreateGPUGraphicsPipeline @@ -267,7 +277,7 @@ typedef struct SDL_GPUShader SDL_GPUShader; * * Used during compute passes. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_CreateGPUComputePipeline * \sa SDL_BindGPUComputePipeline @@ -280,7 +290,7 @@ typedef struct SDL_GPUComputePipeline SDL_GPUComputePipeline; * * Used during render passes. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_CreateGPUGraphicsPipeline * \sa SDL_BindGPUGraphicsPipeline @@ -302,11 +312,10 @@ typedef struct SDL_GPUGraphicsPipeline SDL_GPUGraphicsPipeline; * buffer A and then command buffer B all commands in A will begin executing * before any command in B begins executing. * - * In multi-threading scenarios, you should acquire and submit a command - * buffer on the same thread. As long as you satisfy this requirement, all - * functionality related to command buffers is thread-safe. + * In multi-threading scenarios, you should only access a command buffer on + * the thread you acquired it from. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_AcquireGPUCommandBuffer * \sa SDL_SubmitGPUCommandBuffer @@ -320,7 +329,7 @@ typedef struct SDL_GPUCommandBuffer SDL_GPUCommandBuffer; * This handle is transient and should not be held or referenced after * SDL_EndGPURenderPass is called. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_BeginGPURenderPass * \sa SDL_EndGPURenderPass @@ -333,7 +342,7 @@ typedef struct SDL_GPURenderPass SDL_GPURenderPass; * This handle is transient and should not be held or referenced after * SDL_EndGPUComputePass is called. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_BeginGPUComputePass * \sa SDL_EndGPUComputePass @@ -346,7 +355,7 @@ typedef struct SDL_GPUComputePass SDL_GPUComputePass; * This handle is transient and should not be held or referenced after * SDL_EndGPUCopyPass is called. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_BeginGPUCopyPass * \sa SDL_EndGPUCopyPass @@ -356,7 +365,7 @@ typedef struct SDL_GPUCopyPass SDL_GPUCopyPass; /** * An opaque handle representing a fence. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_SubmitGPUCommandBufferAndAcquireFence * \sa SDL_QueryGPUFence @@ -368,7 +377,7 @@ typedef struct SDL_GPUFence SDL_GPUFence; /** * Specifies the primitive topology of a graphics pipeline. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUGraphicsPipeline */ @@ -385,7 +394,7 @@ typedef enum SDL_GPUPrimitiveType * Specifies how the contents of a texture attached to a render pass are * treated at the beginning of the render pass. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_BeginGPURenderPass */ @@ -400,7 +409,7 @@ typedef enum SDL_GPULoadOp * Specifies how the contents of a texture attached to a render pass are * treated at the end of the render pass. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_BeginGPURenderPass */ @@ -415,7 +424,7 @@ typedef enum SDL_GPUStoreOp /** * Specifies the size of elements in an index buffer. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUGraphicsPipeline */ @@ -506,7 +515,7 @@ typedef enum SDL_GPUIndexElementSize * Unless D16_UNORM is sufficient for your purposes, always check which of * D24/D32 is supported before creating a depth-stencil texture! * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUTexture * \sa SDL_GPUTextureSupportsFormat @@ -588,7 +597,52 @@ typedef enum SDL_GPUTextureFormat SDL_GPU_TEXTUREFORMAT_D24_UNORM, SDL_GPU_TEXTUREFORMAT_D32_FLOAT, SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT, - SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT + SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT, + /* Compressed ASTC Normalized Float Color Formats*/ + SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM, + SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM, + SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM, + SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM, + SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM, + SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM, + SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM, + SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM, + SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM, + SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM, + SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM, + SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM, + SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM, + SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM, + /* Compressed SRGB ASTC Normalized Float Color Formats*/ + SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB, + SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB, + SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB, + SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB, + SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB, + SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB, + SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB, + SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB, + SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB, + SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB, + SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB, + SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB, + SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB, + SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB, + /* Compressed ASTC Signed Float Color Formats*/ + SDL_GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT, + SDL_GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT, + SDL_GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT, + SDL_GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT, + SDL_GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT, + SDL_GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT, + SDL_GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT, + SDL_GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT, + SDL_GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT, + SDL_GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT, + SDL_GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT, + SDL_GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT, + SDL_GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT, + SDL_GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT } SDL_GPUTextureFormat; /** @@ -607,7 +661,7 @@ typedef enum SDL_GPUTextureFormat * within a compute pass. Note that SIMULTANEOUS usage is only supported by a * limited number of texture formats. * - * \since This datatype is available since SDL 3.0.0 + * \since This datatype is available since SDL 3.1.3 * * \sa SDL_CreateGPUTexture */ @@ -624,7 +678,7 @@ typedef Uint32 SDL_GPUTextureUsageFlags; /** * Specifies the type of a texture. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUTexture */ @@ -643,7 +697,7 @@ typedef enum SDL_GPUTextureType * Used in multisampling. Note that this value only applies when the texture * is used as a render target. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUTexture * \sa SDL_GPUTextureSupportsSampleCount @@ -662,7 +716,7 @@ typedef enum SDL_GPUSampleCount * * Can be passed in as the layer field in texture-related structs. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 */ typedef enum SDL_GPUCubeMapFace { @@ -683,7 +737,7 @@ typedef enum SDL_GPUCubeMapFace * Unlike textures, READ | WRITE can be used for simultaneous read-write * usage. The same data synchronization concerns as textures apply. * - * \since This datatype is available since SDL 3.0.0 + * \since This datatype is available since SDL 3.1.3 * * \sa SDL_CreateGPUBuffer */ @@ -702,7 +756,7 @@ typedef Uint32 SDL_GPUBufferUsageFlags; * Note that mapping and copying FROM an upload transfer buffer or TO a * download transfer buffer is undefined behavior. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUTransferBuffer */ @@ -715,7 +769,7 @@ typedef enum SDL_GPUTransferBufferUsage /** * Specifies which stage a shader program corresponds to. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUShader */ @@ -730,7 +784,7 @@ typedef enum SDL_GPUShaderStage * * Each format corresponds to a specific backend that accepts it. * - * \since This datatype is available since SDL 3.0.0 + * \since This datatype is available since SDL 3.1.3 * * \sa SDL_CreateGPUShader */ @@ -739,15 +793,15 @@ typedef Uint32 SDL_GPUShaderFormat; #define SDL_GPU_SHADERFORMAT_INVALID 0 #define SDL_GPU_SHADERFORMAT_PRIVATE (1u << 0) /**< Shaders for NDA'd platforms. */ #define SDL_GPU_SHADERFORMAT_SPIRV (1u << 1) /**< SPIR-V shaders for Vulkan. */ -#define SDL_GPU_SHADERFORMAT_DXBC (1u << 2) /**< DXBC SM5_0 shaders for D3D11. */ -#define SDL_GPU_SHADERFORMAT_DXIL (1u << 3) /**< DXIL shaders for D3D12. */ +#define SDL_GPU_SHADERFORMAT_DXBC (1u << 2) /**< DXBC SM5_1 shaders for D3D12. */ +#define SDL_GPU_SHADERFORMAT_DXIL (1u << 3) /**< DXIL SM6_0 shaders for D3D12. */ #define SDL_GPU_SHADERFORMAT_MSL (1u << 4) /**< MSL shaders for Metal. */ #define SDL_GPU_SHADERFORMAT_METALLIB (1u << 5) /**< Precompiled metallib shaders for Metal. */ /** * Specifies the format of a vertex attribute. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUGraphicsPipeline */ @@ -813,7 +867,7 @@ typedef enum SDL_GPUVertexElementFormat /** * Specifies the rate at which vertex attributes are pulled from buffers. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUGraphicsPipeline */ @@ -826,7 +880,7 @@ typedef enum SDL_GPUVertexInputRate /** * Specifies the fill mode of the graphics pipeline. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUGraphicsPipeline */ @@ -839,7 +893,7 @@ typedef enum SDL_GPUFillMode /** * Specifies the facing direction in which triangle faces will be culled. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUGraphicsPipeline */ @@ -854,7 +908,7 @@ typedef enum SDL_GPUCullMode * Specifies the vertex winding that will cause a triangle to be determined to * be front-facing. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUGraphicsPipeline */ @@ -867,7 +921,7 @@ typedef enum SDL_GPUFrontFace /** * Specifies a comparison operator for depth, stencil and sampler operations. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUGraphicsPipeline */ @@ -888,7 +942,7 @@ typedef enum SDL_GPUCompareOp * Specifies what happens to a stored stencil value if stencil tests fail or * pass. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUGraphicsPipeline */ @@ -912,7 +966,7 @@ typedef enum SDL_GPUStencilOp * The source color is the value written by the fragment shader. The * destination color is the value currently existing in the texture. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUGraphicsPipeline */ @@ -933,7 +987,7 @@ typedef enum SDL_GPUBlendOp * The source color is the value written by the fragment shader. The * destination color is the value currently existing in the texture. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUGraphicsPipeline */ @@ -958,7 +1012,7 @@ typedef enum SDL_GPUBlendFactor /** * Specifies which color components are written in a graphics pipeline. * - * \since This datatype is available since SDL 3.0.0 + * \since This datatype is available since SDL 3.1.3 * * \sa SDL_CreateGPUGraphicsPipeline */ @@ -972,7 +1026,7 @@ typedef Uint8 SDL_GPUColorComponentFlags; /** * Specifies a filter operation used by a sampler. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUSampler */ @@ -985,7 +1039,7 @@ typedef enum SDL_GPUFilter /** * Specifies a mipmap mode used by a sampler. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUSampler */ @@ -999,7 +1053,7 @@ typedef enum SDL_GPUSamplerMipmapMode * Specifies behavior of texture sampling when the coordinates exceed the 0-1 * range. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_CreateGPUSampler */ @@ -1027,15 +1081,15 @@ typedef enum SDL_GPUSamplerAddressMode * this present mode, AcquireGPUSwapchainTexture will block if too many * frames are in flight. * - IMMEDIATE: Immediately presents. Lowest latency option, but tearing may - * occur. When using this mode, AcquireGPUSwapchainTexture will return NULL - * if too many frames are in flight. + * occur. When using this mode, AcquireGPUSwapchainTexture will fill the + * swapchain texture pointer with NULL if too many frames are in flight. * - MAILBOX: Waits for vblank before presenting. No tearing is possible. If * there is a pending image to present, the pending image is replaced by the * new image. Similar to VSYNC, but with reduced visual latency. When using - * this mode, AcquireGPUSwapchainTexture will return NULL if too many frames - * are in flight. + * this mode, AcquireGPUSwapchainTexture will fill the swapchain texture + * pointer with NULL if too many frames are in flight. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_SetGPUSwapchainParameters * \sa SDL_WindowSupportsGPUPresentMode @@ -1067,7 +1121,7 @@ typedef enum SDL_GPUPresentMode * - HDR10_ST2048: A2R10G10B10 or A2B10G10R10 swapchain. Pixel values are in * PQ ST2048 encoding. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 * * \sa SDL_SetGPUSwapchainParameters * \sa SDL_WindowSupportsGPUSwapchainComposition @@ -1086,7 +1140,7 @@ typedef enum SDL_GPUSwapchainComposition /** * A structure specifying a viewport. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_SetGPUViewport */ @@ -1104,7 +1158,7 @@ typedef struct SDL_GPUViewport * A structure specifying parameters related to transferring data to or from a * texture. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_UploadToGPUTexture * \sa SDL_DownloadFromGPUTexture @@ -1122,7 +1176,7 @@ typedef struct SDL_GPUTextureTransferInfo * * Used when transferring buffer data to or from a transfer buffer. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_UploadToGPUBuffer * \sa SDL_DownloadFromGPUBuffer @@ -1138,7 +1192,7 @@ typedef struct SDL_GPUTransferBufferLocation * * Used when copying data from one texture to another. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_CopyGPUTextureToTexture */ @@ -1157,7 +1211,7 @@ typedef struct SDL_GPUTextureLocation * * Used when transferring data to or from a texture. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_UploadToGPUTexture * \sa SDL_DownloadFromGPUTexture @@ -1178,7 +1232,7 @@ typedef struct SDL_GPUTextureRegion /** * A structure specifying a region of a texture used in the blit operation. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_BlitGPUTexture */ @@ -1198,7 +1252,7 @@ typedef struct SDL_GPUBlitRegion * * Used when copying data between buffers. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_CopyGPUBufferToBuffer */ @@ -1213,7 +1267,7 @@ typedef struct SDL_GPUBufferLocation * * Used when transferring data to or from buffers. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_UploadToGPUBuffer * \sa SDL_DownloadFromGPUBuffer @@ -1233,7 +1287,7 @@ typedef struct SDL_GPUBufferRegion * example, SV_VertexID). If your shader depends on these variables, the * correlating draw call parameter MUST be 0. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_DrawGPUPrimitivesIndirect */ @@ -1253,7 +1307,7 @@ typedef struct SDL_GPUIndirectDrawCommand * example, SV_VertexID). If your shader depends on these variables, the * correlating draw call parameter MUST be 0. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_DrawGPUIndexedPrimitivesIndirect */ @@ -1269,7 +1323,7 @@ typedef struct SDL_GPUIndexedIndirectDrawCommand /** * A structure specifying the parameters of an indexed dispatch command. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_DispatchGPUComputeIndirect */ @@ -1285,7 +1339,7 @@ typedef struct SDL_GPUIndirectDispatchCommand /** * A structure specifying the parameters of a sampler. * - * \since This function is available since SDL 3.0.0 + * \since This function is available since SDL 3.1.3 * * \sa SDL_CreateGPUSampler */ @@ -1323,7 +1377,7 @@ typedef struct SDL_GPUSamplerCreateInfo * SDL_GPUVertexAttribute. For example, if an attribute has a buffer_slot of * 0, then that attribute belongs to the vertex buffer bound at slot 0. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_GPUVertexAttribute * \sa SDL_GPUVertexInputState @@ -1342,7 +1396,7 @@ typedef struct SDL_GPUVertexBufferDescription * All vertex attribute locations provided to an SDL_GPUVertexInputState must * be unique. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_GPUVertexBufferDescription * \sa SDL_GPUVertexInputState @@ -1359,7 +1413,7 @@ typedef struct SDL_GPUVertexAttribute * A structure specifying the parameters of a graphics pipeline vertex input * state. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_GPUGraphicsPipelineCreateInfo */ @@ -1374,7 +1428,7 @@ typedef struct SDL_GPUVertexInputState /** * A structure specifying the stencil operation state of a graphics pipeline. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_GPUDepthStencilState */ @@ -1389,7 +1443,7 @@ typedef struct SDL_GPUStencilOpState /** * A structure specifying the blend state of a color target. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_GPUColorTargetDescription */ @@ -1412,7 +1466,7 @@ typedef struct SDL_GPUColorTargetBlendState /** * A structure specifying code and metadata for creating a shader object. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_CreateGPUShader */ @@ -1438,7 +1492,7 @@ typedef struct SDL_GPUShaderCreateInfo * that certain usage combinations are invalid, for example SAMPLER and * GRAPHICS_STORAGE. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_CreateGPUTexture */ @@ -1469,7 +1523,7 @@ typedef struct SDL_GPUTextureCreateInfo * Usage flags can be bitwise OR'd together for combinations of usages. Note * that certain combinations are invalid, for example VERTEX and INDEX. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_CreateGPUBuffer */ @@ -1484,7 +1538,7 @@ typedef struct SDL_GPUBufferCreateInfo /** * A structure specifying the parameters of a transfer buffer. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_CreateGPUTransferBuffer */ @@ -1507,7 +1561,7 @@ typedef struct SDL_GPUTransferBufferCreateInfo * consider enabling depth clip and then manually clamping depth in your * fragment shaders on Metal and Vulkan. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_GPUGraphicsPipelineCreateInfo */ @@ -1529,7 +1583,7 @@ typedef struct SDL_GPURasterizerState * A structure specifying the parameters of the graphics pipeline multisample * state. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_GPUGraphicsPipelineCreateInfo */ @@ -1547,7 +1601,7 @@ typedef struct SDL_GPUMultisampleState * A structure specifying the parameters of the graphics pipeline depth * stencil state. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_GPUGraphicsPipelineCreateInfo */ @@ -1570,7 +1624,7 @@ typedef struct SDL_GPUDepthStencilState * A structure specifying the parameters of color targets used in a graphics * pipeline. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_GPUGraphicsPipelineTargetInfo */ @@ -1584,7 +1638,7 @@ typedef struct SDL_GPUColorTargetDescription * A structure specifying the descriptions of render targets used in a * graphics pipeline. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_GPUGraphicsPipelineCreateInfo */ @@ -1602,7 +1656,7 @@ typedef struct SDL_GPUGraphicsPipelineTargetInfo /** * A structure specifying the parameters of a graphics pipeline state. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_CreateGPUGraphicsPipeline */ @@ -1623,7 +1677,7 @@ typedef struct SDL_GPUGraphicsPipelineCreateInfo /** * A structure specifying the parameters of a compute pipeline state. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_CreateGPUComputePipeline */ @@ -1677,7 +1731,7 @@ typedef struct SDL_GPUComputePipelineCreateInfo * stores the multisample texture's contents. Not recommended as it requires * significant memory bandwidth. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_BeginGPURenderPass */ @@ -1738,7 +1792,7 @@ typedef struct SDL_GPUColorTargetInfo * * Note that depth/stencil targets do not support multisample resolves. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_BeginGPURenderPass */ @@ -1759,7 +1813,7 @@ typedef struct SDL_GPUDepthStencilTargetInfo /** * A structure containing parameters for a blit command. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_BlitGPUTexture */ @@ -1781,21 +1835,21 @@ typedef struct SDL_GPUBlitInfo { /** * A structure specifying parameters in a buffer binding call. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_BindGPUVertexBuffers - * \sa SDL_BindGPUIndexBuffers + * \sa SDL_BindGPUIndexBuffer */ typedef struct SDL_GPUBufferBinding { - SDL_GPUBuffer *buffer; /**< The buffer to bind. Must have been created with SDL_GPU_BUFFERUSAGE_VERTEX for SDL_BindGPUVertexBuffers, or SDL_GPU_BUFFERUSAGE_INDEX for SDL_BindGPUIndexBuffers. */ + SDL_GPUBuffer *buffer; /**< The buffer to bind. Must have been created with SDL_GPU_BUFFERUSAGE_VERTEX for SDL_BindGPUVertexBuffers, or SDL_GPU_BUFFERUSAGE_INDEX for SDL_BindGPUIndexBuffer. */ Uint32 offset; /**< The starting byte of the data to bind in the buffer. */ } SDL_GPUBufferBinding; /** * A structure specifying parameters in a sampler binding call. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_BindGPUVertexSamplers * \sa SDL_BindGPUFragmentSamplers @@ -1810,7 +1864,7 @@ typedef struct SDL_GPUTextureSamplerBinding * A structure specifying parameters related to binding buffers in a compute * pass. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_BeginGPUComputePass */ @@ -1827,7 +1881,7 @@ typedef struct SDL_GPUStorageBufferReadWriteBinding * A structure specifying parameters related to binding textures in a compute * pass. * - * \since This struct is available since SDL 3.0.0 + * \since This struct is available since SDL 3.1.3 * * \sa SDL_BeginGPUComputePass */ @@ -1855,7 +1909,7 @@ typedef struct SDL_GPUStorageTextureReadWriteBinding * driver. * \returns true if supported, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateGPUDevice */ @@ -1869,7 +1923,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GPUSupportsShaderFormats( * \param props the properties to use. * \returns true if supported, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateGPUDeviceWithProperties */ @@ -1887,7 +1941,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GPUSupportsProperties( * \returns a GPU context on success or NULL on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGPUShaderFormats * \sa SDL_GetGPUDeviceDriver @@ -1904,26 +1958,26 @@ extern SDL_DECLSPEC SDL_GPUDevice *SDLCALL SDL_CreateGPUDevice( * * These are the supported properties: * - * - `SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOL`: enable debug mode properties - * and validations, defaults to true. - * - `SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOL`: enable to prefer energy - * efficiency over maximum GPU performance, defaults to false. + * - `SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN`: enable debug mode + * properties and validations, defaults to true. + * - `SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOLEAN`: enable to prefer + * energy efficiency over maximum GPU performance, defaults to false. * - `SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING`: the name of the GPU driver to * use, if a specific one is desired. * * These are the current shader format properties: * - * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOL`: The app is able to + * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN`: The app is able to * provide shaders for an NDA platform. - * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOL`: The app is able to + * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN`: The app is able to * provide SPIR-V shaders if applicable. - * - SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOL`: The app is able to provide - * DXBC shaders if applicable - * `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOL`: The app is able to + * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN`: The app is able to + * provide DXBC shaders if applicable + * `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN`: The app is able to * provide DXIL shaders if applicable. - * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOL`: The app is able to provide - * MSL shaders if applicable. - * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOL`: The app is able to + * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN`: The app is able to + * provide MSL shaders if applicable. + * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN`: The app is able to * provide Metal shader libraries if applicable. * * With the D3D12 renderer: @@ -1935,7 +1989,7 @@ extern SDL_DECLSPEC SDL_GPUDevice *SDLCALL SDL_CreateGPUDevice( * \returns a GPU context on success or NULL on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGPUShaderFormats * \sa SDL_GetGPUDeviceDriver @@ -1945,15 +1999,15 @@ extern SDL_DECLSPEC SDL_GPUDevice *SDLCALL SDL_CreateGPUDevice( extern SDL_DECLSPEC SDL_GPUDevice *SDLCALL SDL_CreateGPUDeviceWithProperties( SDL_PropertiesID props); -#define SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOL "SDL.gpu.device.create.debugmode" -#define SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOL "SDL.gpu.device.create.preferlowpower" +#define SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN "SDL.gpu.device.create.debugmode" +#define SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOLEAN "SDL.gpu.device.create.preferlowpower" #define SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING "SDL.gpu.device.create.name" -#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOL "SDL.gpu.device.create.shaders.private" -#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOL "SDL.gpu.device.create.shaders.spirv" -#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOL "SDL.gpu.device.create.shaders.dxbc" -#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOL "SDL.gpu.device.create.shaders.dxil" -#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOL "SDL.gpu.device.create.shaders.msl" -#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOL "SDL.gpu.device.create.shaders.metallib" +#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN "SDL.gpu.device.create.shaders.private" +#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN "SDL.gpu.device.create.shaders.spirv" +#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN "SDL.gpu.device.create.shaders.dxbc" +#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN "SDL.gpu.device.create.shaders.dxil" +#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN "SDL.gpu.device.create.shaders.msl" +#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN "SDL.gpu.device.create.shaders.metallib" #define SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING "SDL.gpu.device.create.d3d12.semantic" /** @@ -1961,7 +2015,7 @@ extern SDL_DECLSPEC SDL_GPUDevice *SDLCALL SDL_CreateGPUDeviceWithProperties( * * \param device a GPU Context to destroy. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateGPUDevice */ @@ -1972,7 +2026,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyGPUDevice(SDL_GPUDevice *device); * * \returns the number of built in GPU drivers. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGPUDriver */ @@ -1991,7 +2045,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumGPUDrivers(void); * \param index the index of a GPU driver. * \returns the name of the GPU driver with the given **index**. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetNumGPUDrivers */ @@ -2003,7 +2057,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGPUDriver(int index); * \param device a GPU context to query. * \returns the name of the device's driver, or NULL on error. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGPUDeviceDriver(SDL_GPUDevice *device); @@ -2014,7 +2068,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGPUDeviceDriver(SDL_GPUDevice *d * \returns a bitflag indicating which shader formats the driver is able to * consume. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_GPUShaderFormat SDLCALL SDL_GetGPUShaderFormats(SDL_GPUDevice *device); @@ -2033,15 +2087,7 @@ extern SDL_DECLSPEC SDL_GPUShaderFormat SDLCALL SDL_GetGPUShaderFormats(SDL_GPUD * - 1: Write-only storage textures, followed by write-only storage buffers * - 2: Uniform buffers * - * For DXBC Shader Model 5_0 shaders, use the following register order: - * - * - t registers: Sampled textures, followed by read-only storage textures, - * followed by read-only storage buffers - * - u registers: Write-only storage textures, followed by write-only storage - * buffers - * - b registers: Uniform buffers - * - * For DXIL shaders, use the following register order: + * For DXBC and DXIL shaders, use the following register order: * * - (t[n], space0): Sampled textures, followed by read-only storage textures, * followed by read-only storage buffers @@ -2062,7 +2108,7 @@ extern SDL_DECLSPEC SDL_GPUShaderFormat SDLCALL SDL_GetGPUShaderFormats(SDL_GPUD * \returns a compute pipeline object on success, or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BindGPUComputePipeline * \sa SDL_ReleaseGPUComputePipeline @@ -2080,7 +2126,7 @@ extern SDL_DECLSPEC SDL_GPUComputePipeline *SDLCALL SDL_CreateGPUComputePipeline * \returns a graphics pipeline object on success, or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateGPUShader * \sa SDL_BindGPUGraphicsPipeline @@ -2099,11 +2145,11 @@ extern SDL_DECLSPEC SDL_GPUGraphicsPipeline *SDLCALL SDL_CreateGPUGraphicsPipeli * \returns a sampler object on success, or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BindGPUVertexSamplers * \sa SDL_BindGPUFragmentSamplers - * \sa SDL_ReleaseSampler + * \sa SDL_ReleaseGPUSampler */ extern SDL_DECLSPEC SDL_GPUSampler *SDLCALL SDL_CreateGPUSampler( SDL_GPUDevice *device, @@ -2129,14 +2175,7 @@ extern SDL_DECLSPEC SDL_GPUSampler *SDLCALL SDL_CreateGPUSampler( * buffers * - 3: Uniform buffers * - * For DXBC Shader Model 5_0 shaders, use the following register order: - * - * - t registers: Sampled textures, followed by storage textures, followed by - * storage buffers - * - s registers: Samplers with indices corresponding to the sampled textures - * - b registers: Uniform buffers - * - * For DXIL shaders, use the following register order: + * For DXBC and DXIL shaders, use the following register order: * * For vertex shaders: * @@ -2162,14 +2201,14 @@ extern SDL_DECLSPEC SDL_GPUSampler *SDLCALL SDL_CreateGPUSampler( * is bound at [[buffer(14)]], vertex buffer 1 at [[buffer(15)]], and so on. * Rather than manually authoring vertex buffer indices, use the * [[stage_in]] attribute which will automatically use the vertex input - * information from the SDL_GPUPipeline. + * information from the SDL_GPUGraphicsPipeline. * * \param device a GPU Context. * \param createinfo a struct describing the state of the shader to create. * \returns a shader object on success, or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateGPUGraphicsPipeline * \sa SDL_ReleaseGPUShader @@ -2196,7 +2235,7 @@ extern SDL_DECLSPEC SDL_GPUShader *SDLCALL SDL_CreateGPUShader( * \returns a texture object on success, or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_UploadToGPUTexture * \sa SDL_DownloadFromGPUTexture @@ -2227,7 +2266,7 @@ extern SDL_DECLSPEC SDL_GPUTexture *SDLCALL SDL_CreateGPUTexture( * \returns a buffer object on success, or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetGPUBufferName * \sa SDL_UploadToGPUBuffer @@ -2251,13 +2290,16 @@ extern SDL_DECLSPEC SDL_GPUBuffer *SDLCALL SDL_CreateGPUBuffer( * Creates a transfer buffer to be used when uploading to or downloading from * graphics resources. * + * Download buffers can be particularly expensive to create, so it is good + * practice to reuse them if data will be downloaded regularly. + * * \param device a GPU Context. * \param createinfo a struct describing the state of the transfer buffer to * create. * \returns a transfer buffer on success, or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_UploadToGPUBuffer * \sa SDL_DownloadFromGPUBuffer @@ -2280,7 +2322,7 @@ extern SDL_DECLSPEC SDL_GPUTransferBuffer *SDLCALL SDL_CreateGPUTransferBuffer( * \param buffer a buffer to attach the name to. * \param text a UTF-8 string constant to mark as the name of the buffer. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUBufferName( SDL_GPUDevice *device, @@ -2296,7 +2338,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUBufferName( * \param texture a texture to attach the name to. * \param text a UTF-8 string constant to mark as the name of the texture. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUTextureName( SDL_GPUDevice *device, @@ -2311,7 +2353,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUTextureName( * \param command_buffer a command buffer. * \param text a UTF-8 string constant to insert as the label. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_InsertGPUDebugLabel( SDL_GPUCommandBuffer *command_buffer, @@ -2334,7 +2376,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_InsertGPUDebugLabel( * \param command_buffer a command buffer. * \param name a UTF-8 string constant that names the group. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_PopGPUDebugGroup */ @@ -2347,7 +2389,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUDebugGroup( * * \param command_buffer a command buffer. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_PushGPUDebugGroup */ @@ -2364,7 +2406,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_PopGPUDebugGroup( * \param device a GPU context. * \param texture a texture to be destroyed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUTexture( SDL_GPUDevice *device, @@ -2378,7 +2420,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUTexture( * \param device a GPU context. * \param sampler a sampler to be destroyed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUSampler( SDL_GPUDevice *device, @@ -2392,7 +2434,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUSampler( * \param device a GPU context. * \param buffer a buffer to be destroyed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUBuffer( SDL_GPUDevice *device, @@ -2406,7 +2448,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUBuffer( * \param device a GPU context. * \param transfer_buffer a transfer buffer to be destroyed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUTransferBuffer( SDL_GPUDevice *device, @@ -2420,7 +2462,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUTransferBuffer( * \param device a GPU context. * \param compute_pipeline a compute pipeline to be destroyed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUComputePipeline( SDL_GPUDevice *device, @@ -2434,7 +2476,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUComputePipeline( * \param device a GPU context. * \param shader a shader to be destroyed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUShader( SDL_GPUDevice *device, @@ -2448,7 +2490,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUShader( * \param device a GPU context. * \param graphics_pipeline a graphics pipeline to be destroyed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUGraphicsPipeline( SDL_GPUDevice *device, @@ -2466,7 +2508,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUGraphicsPipeline( * \returns a command buffer, or NULL on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SubmitGPUCommandBuffer * \sa SDL_SubmitGPUCommandBufferAndAcquireFence @@ -2504,7 +2546,7 @@ extern SDL_DECLSPEC SDL_GPUCommandBuffer *SDLCALL SDL_AcquireGPUCommandBuffer( * \param data client data to write. * \param length the length of the data to write. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUVertexUniformData( SDL_GPUCommandBuffer *command_buffer, @@ -2522,7 +2564,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUVertexUniformData( * \param data client data to write. * \param length the length of the data to write. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUFragmentUniformData( SDL_GPUCommandBuffer *command_buffer, @@ -2540,7 +2582,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUFragmentUniformData( * \param data client data to write. * \param length the length of the data to write. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUComputeUniformData( SDL_GPUCommandBuffer *command_buffer, @@ -2610,7 +2652,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUComputeUniformData( * NULL. * \returns a render pass handle. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_EndGPURenderPass */ @@ -2628,7 +2670,7 @@ extern SDL_DECLSPEC SDL_GPURenderPass *SDLCALL SDL_BeginGPURenderPass( * \param render_pass a render pass handle. * \param graphics_pipeline the graphics pipeline to bind. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUGraphicsPipeline( SDL_GPURenderPass *render_pass, @@ -2640,7 +2682,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUGraphicsPipeline( * \param render_pass a render pass handle. * \param viewport the viewport to set. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUViewport( SDL_GPURenderPass *render_pass, @@ -2652,7 +2694,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUViewport( * \param render_pass a render pass handle. * \param scissor the scissor area to set. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUScissor( SDL_GPURenderPass *render_pass, @@ -2664,7 +2706,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUScissor( * \param render_pass a render pass handle. * \param blend_constants the blend constant color. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GPU_BLENDFACTOR_CONSTANT_COLOR * \sa SDL_GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR @@ -2679,7 +2721,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUBlendConstants( * \param render_pass a render pass handle. * \param reference the stencil reference value to set. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUStencilReference( SDL_GPURenderPass *render_pass, @@ -2695,7 +2737,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUStencilReference( * buffers and offset values. * \param num_bindings the number of bindings in the bindings array. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexBuffers( SDL_GPURenderPass *render_pass, @@ -2712,7 +2754,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexBuffers( * \param index_element_size whether the index values in the buffer are 16- or * 32-bit. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUIndexBuffer( SDL_GPURenderPass *render_pass, @@ -2731,7 +2773,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUIndexBuffer( * \param num_bindings the number of texture-sampler pairs to bind from the * array. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexSamplers( SDL_GPURenderPass *render_pass, @@ -2750,7 +2792,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexSamplers( * \param storage_textures an array of storage textures. * \param num_bindings the number of storage texture to bind from the array. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageTextures( SDL_GPURenderPass *render_pass, @@ -2769,7 +2811,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageTextures( * \param storage_buffers an array of buffers. * \param num_bindings the number of buffers to bind from the array. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageBuffers( SDL_GPURenderPass *render_pass, @@ -2789,7 +2831,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageBuffers( * \param num_bindings the number of texture-sampler pairs to bind from the * array. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentSamplers( SDL_GPURenderPass *render_pass, @@ -2808,7 +2850,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentSamplers( * \param storage_textures an array of storage textures. * \param num_bindings the number of storage textures to bind from the array. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentStorageTextures( SDL_GPURenderPass *render_pass, @@ -2827,7 +2869,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentStorageTextures( * \param storage_buffers an array of storage buffers. * \param num_bindings the number of storage buffers to bind from the array. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentStorageBuffers( SDL_GPURenderPass *render_pass, @@ -2856,7 +2898,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentStorageBuffers( * vertex buffer. * \param first_instance the ID of the first instance to draw. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_DrawGPUIndexedPrimitives( SDL_GPURenderPass *render_pass, @@ -2882,7 +2924,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DrawGPUIndexedPrimitives( * \param first_vertex the index of the first vertex to draw. * \param first_instance the ID of the first instance to draw. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_DrawGPUPrimitives( SDL_GPURenderPass *render_pass, @@ -2905,7 +2947,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DrawGPUPrimitives( * \param draw_count the number of draw parameter sets that should be read * from the draw buffer. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_DrawGPUPrimitivesIndirect( SDL_GPURenderPass *render_pass, @@ -2927,7 +2969,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DrawGPUPrimitivesIndirect( * \param draw_count the number of draw parameter sets that should be read * from the draw buffer. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_DrawGPUIndexedPrimitivesIndirect( SDL_GPURenderPass *render_pass, @@ -2943,7 +2985,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DrawGPUIndexedPrimitivesIndirect( * * \param render_pass a render pass handle. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_EndGPURenderPass( SDL_GPURenderPass *render_pass); @@ -2983,7 +3025,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_EndGPURenderPass( * from the array. * \returns a compute pass handle. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_EndGPUComputePass */ @@ -3000,7 +3042,7 @@ extern SDL_DECLSPEC SDL_GPUComputePass *SDLCALL SDL_BeginGPUComputePass( * \param compute_pass a compute pass handle. * \param compute_pipeline a compute pipeline to bind. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputePipeline( SDL_GPUComputePass *compute_pass, @@ -3018,7 +3060,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputePipeline( * \param num_bindings the number of texture-sampler bindings to bind from the * array. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeSamplers( SDL_GPUComputePass *compute_pass, @@ -3037,7 +3079,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeSamplers( * \param storage_textures an array of storage textures. * \param num_bindings the number of storage textures to bind from the array. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageTextures( SDL_GPUComputePass *compute_pass, @@ -3056,7 +3098,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageTextures( * \param storage_buffers an array of storage buffer binding structs. * \param num_bindings the number of storage buffers to bind from the array. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageBuffers( SDL_GPUComputePass *compute_pass, @@ -3082,7 +3124,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageBuffers( * \param groupcount_z number of local workgroups to dispatch in the Z * dimension. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_DispatchGPUCompute( SDL_GPUComputePass *compute_pass, @@ -3106,7 +3148,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DispatchGPUCompute( * \param buffer a buffer containing dispatch parameters. * \param offset the offset to start reading from the dispatch buffer. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_DispatchGPUComputeIndirect( SDL_GPUComputePass *compute_pass, @@ -3121,7 +3163,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DispatchGPUComputeIndirect( * * \param compute_pass a compute pass handle. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_EndGPUComputePass( SDL_GPUComputePass *compute_pass); @@ -3139,7 +3181,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_EndGPUComputePass( * \returns the address of the mapped transfer buffer memory, or NULL on * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void *SDLCALL SDL_MapGPUTransferBuffer( SDL_GPUDevice *device, @@ -3152,7 +3194,7 @@ extern SDL_DECLSPEC void *SDLCALL SDL_MapGPUTransferBuffer( * \param device a GPU context. * \param transfer_buffer a previously mapped transfer buffer. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_UnmapGPUTransferBuffer( SDL_GPUDevice *device, @@ -3170,7 +3212,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnmapGPUTransferBuffer( * \param command_buffer a command buffer. * \returns a copy pass handle. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_GPUCopyPass *SDLCALL SDL_BeginGPUCopyPass( SDL_GPUCommandBuffer *command_buffer); @@ -3190,7 +3232,7 @@ extern SDL_DECLSPEC SDL_GPUCopyPass *SDLCALL SDL_BeginGPUCopyPass( * \param cycle if true, cycles the texture if the texture is bound, otherwise * overwrites the data. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_UploadToGPUTexture( SDL_GPUCopyPass *copy_pass, @@ -3212,7 +3254,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UploadToGPUTexture( * \param cycle if true, cycles the buffer if it is already bound, otherwise * overwrites the data. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_UploadToGPUBuffer( SDL_GPUCopyPass *copy_pass, @@ -3235,7 +3277,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UploadToGPUBuffer( * \param cycle if true, cycles the destination texture if the destination * texture is bound, otherwise overwrites the data. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_CopyGPUTextureToTexture( SDL_GPUCopyPass *copy_pass, @@ -3261,7 +3303,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_CopyGPUTextureToTexture( * \param cycle if true, cycles the destination buffer if it is already bound, * otherwise overwrites the data. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_CopyGPUBufferToBuffer( SDL_GPUCopyPass *copy_pass, @@ -3281,7 +3323,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_CopyGPUBufferToBuffer( * \param destination the destination transfer buffer with image layout * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_DownloadFromGPUTexture( SDL_GPUCopyPass *copy_pass, @@ -3298,7 +3340,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DownloadFromGPUTexture( * \param source the source buffer with offset and size. * \param destination the destination transfer buffer with offset. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_DownloadFromGPUBuffer( SDL_GPUCopyPass *copy_pass, @@ -3310,7 +3352,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DownloadFromGPUBuffer( * * \param copy_pass a copy pass handle. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_EndGPUCopyPass( SDL_GPUCopyPass *copy_pass); @@ -3323,7 +3365,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_EndGPUCopyPass( * \param command_buffer a command_buffer. * \param texture a texture with more than 1 mip level. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_GenerateMipmapsForGPUTexture( SDL_GPUCommandBuffer *command_buffer, @@ -3337,7 +3379,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_GenerateMipmapsForGPUTexture( * \param command_buffer a command buffer. * \param info the blit info struct containing the blit parameters. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_BlitGPUTexture( SDL_GPUCommandBuffer *command_buffer, @@ -3355,7 +3397,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BlitGPUTexture( * \param swapchain_composition the swapchain composition to check. * \returns true if supported, false if unsupported. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ClaimWindowForGPUDevice */ @@ -3374,7 +3416,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WindowSupportsGPUSwapchainComposition( * \param present_mode the presentation mode to check. * \returns true if supported, false if unsupported. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ClaimWindowForGPUDevice */ @@ -3400,7 +3442,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WindowSupportsGPUPresentMode( * \returns true on success, or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AcquireGPUSwapchainTexture * \sa SDL_ReleaseWindowFromGPUDevice @@ -3417,7 +3459,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ClaimWindowForGPUDevice( * \param device a GPU context. * \param window an SDL_Window that has been claimed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ClaimWindowForGPUDevice */ @@ -3443,7 +3485,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseWindowFromGPUDevice( * \returns true if successful, false on error; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_WindowSupportsGPUPresentMode * \sa SDL_WindowSupportsGPUSwapchainComposition @@ -3463,7 +3505,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetGPUSwapchainParameters( * \param window an SDL_Window that has been claimed. * \returns the texture format of the swapchain. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_GPUTextureFormat SDLCALL SDL_GetGPUSwapchainTextureFormat( SDL_GPUDevice *device, @@ -3483,6 +3525,12 @@ extern SDL_DECLSPEC SDL_GPUTextureFormat SDLCALL SDL_GetGPUSwapchainTextureForma * freed by the user. You MUST NOT call this function from any thread other * than the one that created the window. * + * When using SDL_GPU_PRESENTMODE_VSYNC, this function will block if too many + * frames are in flight. Otherwise, this function will fill the swapchain + * texture handle with NULL if too many frames are in flight. The best + * practice is to call SDL_CancelGPUCommandBuffer if the swapchain texture + * handle is NULL to avoid enqueuing needless work on the GPU. + * * \param command_buffer a command buffer. * \param window a window that has been claimed. * \param swapchain_texture a pointer filled in with a swapchain texture @@ -3494,11 +3542,13 @@ extern SDL_DECLSPEC SDL_GPUTextureFormat SDLCALL SDL_GetGPUSwapchainTextureForma * \returns true on success, false on error; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * + * \sa SDL_GPUPresentMode * \sa SDL_ClaimWindowForGPUDevice * \sa SDL_SubmitGPUCommandBuffer * \sa SDL_SubmitGPUCommandBufferAndAcquireFence + * \sa SDL_CancelGPUCommandBuffer * \sa SDL_GetWindowSizeInPixels */ extern SDL_DECLSPEC bool SDLCALL SDL_AcquireGPUSwapchainTexture( @@ -3522,7 +3572,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_AcquireGPUSwapchainTexture( * \returns true on success, false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AcquireGPUCommandBuffer * \sa SDL_AcquireGPUSwapchainTexture @@ -3547,7 +3597,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SubmitGPUCommandBuffer( * \returns a fence associated with the command buffer, or NULL on failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AcquireGPUCommandBuffer * \sa SDL_AcquireGPUSwapchainTexture @@ -3557,6 +3607,29 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SubmitGPUCommandBuffer( extern SDL_DECLSPEC SDL_GPUFence *SDLCALL SDL_SubmitGPUCommandBufferAndAcquireFence( SDL_GPUCommandBuffer *command_buffer); +/** + * Cancels a command buffer. + * + * None of the enqueued commands are executed. + * + * This must be called from the thread the command buffer was acquired on. + * + * You must not reference the command buffer after calling this function. It + * is an error to call this function after a swapchain texture has been + * acquired. + * + * \param command_buffer a command buffer. + * \returns true on success, false on error; call SDL_GetError() for more + * information. + * + * \since This function is available since SDL 3.1.6. + * + * \sa SDL_AcquireGPUCommandBuffer + * \sa SDL_AcquireGPUSwapchainTexture + */ +extern SDL_DECLSPEC bool SDLCALL SDL_CancelGPUCommandBuffer( + SDL_GPUCommandBuffer *command_buffer); + /** * Blocks the thread until the GPU is completely idle. * @@ -3564,7 +3637,7 @@ extern SDL_DECLSPEC SDL_GPUFence *SDLCALL SDL_SubmitGPUCommandBufferAndAcquireFe * \returns true on success, false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_WaitForGPUFences */ @@ -3582,7 +3655,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitForGPUIdle( * \returns true on success, false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SubmitGPUCommandBufferAndAcquireFence * \sa SDL_WaitForGPUIdle @@ -3600,7 +3673,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitForGPUFences( * \param fence a fence. * \returns true if the fence is signaled, false if it is not. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SubmitGPUCommandBufferAndAcquireFence */ @@ -3614,7 +3687,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_QueryGPUFence( * \param device a GPU context. * \param fence a fence. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SubmitGPUCommandBufferAndAcquireFence */ @@ -3630,7 +3703,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUFence( * \param format the texture format you want to know the texel size of. * \returns the texel block size of the texture format. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_UploadToGPUTexture */ @@ -3647,7 +3720,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_GPUTextureFormatTexelBlockSize( * \param usage a bitmask of all usage scenarios to check. * \returns whether the texture format is supported for this type and usage. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GPUTextureSupportsFormat( SDL_GPUDevice *device, @@ -3663,13 +3736,30 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GPUTextureSupportsFormat( * \param sample_count the sample count to check. * \returns a hardware-specific version of min(preferred, possible). * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GPUTextureSupportsSampleCount( SDL_GPUDevice *device, SDL_GPUTextureFormat format, SDL_GPUSampleCount sample_count); +/** + * Calculate the size in bytes of a texture format with dimensions. + * + * \param format a texture format. + * \param width width in pixels. + * \param height height in pixels. + * \param depth_or_layer_count depth for 3D textures or layer count otherwise. + * \returns the size of a texture with this format and dimensions. + * + * \since This function is available since SDL 3.1.6. + */ +extern SDL_DECLSPEC Uint32 SDLCALL SDL_CalculateGPUTextureFormatSize( + SDL_GPUTextureFormat format, + Uint32 width, + Uint32 height, + Uint32 depth_or_layer_count); + #ifdef SDL_PLATFORM_GDK /** @@ -3681,7 +3771,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GPUTextureSupportsSampleCount( * * \param device a GPU context. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AddEventWatch */ @@ -3696,7 +3786,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_GDKSuspendGPU(SDL_GPUDevice *device); * * \param device a GPU context. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AddEventWatch */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_guid.h b/Source/ThirdParty/SDL/SDL3/SDL_guid.h index d45a3c365..7806d835c 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_guid.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_guid.h @@ -54,7 +54,7 @@ extern "C" { * GUIDs may be platform-dependent (i.e., the same device may report different * GUIDs on different operating systems). * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_GUID { Uint8 data[16]; @@ -69,7 +69,7 @@ typedef struct SDL_GUID { * \param pszGUID buffer in which to write the ASCII string. * \param cbGUID the size of pszGUID, should be at least 33 bytes. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_StringToGUID */ @@ -85,7 +85,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_GUIDToString(SDL_GUID guid, char *pszGUID, * \param pchGUID string containing an ASCII representation of a GUID. * \returns a SDL_GUID structure. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GUIDToString */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_haptic.h b/Source/ThirdParty/SDL/SDL3/SDL_haptic.h index 58b5b1c99..c123cd90c 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_haptic.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_haptic.h @@ -141,7 +141,7 @@ extern "C" { /** * The haptic structure used to identify an SDL haptic. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_OpenHaptic * \sa SDL_OpenHapticFromJoystick @@ -167,7 +167,7 @@ typedef struct SDL_Haptic SDL_Haptic; * * Constant haptic effect. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticCondition */ @@ -178,7 +178,7 @@ typedef struct SDL_Haptic SDL_Haptic; * * Periodic haptic effect that simulates sine waves. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticPeriodic */ @@ -189,7 +189,7 @@ typedef struct SDL_Haptic SDL_Haptic; * * Periodic haptic effect that simulates square waves. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticPeriodic */ @@ -200,7 +200,7 @@ typedef struct SDL_Haptic SDL_Haptic; * * Periodic haptic effect that simulates triangular waves. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticPeriodic */ @@ -211,7 +211,7 @@ typedef struct SDL_Haptic SDL_Haptic; * * Periodic haptic effect that simulates saw tooth up waves. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticPeriodic */ @@ -222,7 +222,7 @@ typedef struct SDL_Haptic SDL_Haptic; * * Periodic haptic effect that simulates saw tooth down waves. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticPeriodic */ @@ -233,7 +233,7 @@ typedef struct SDL_Haptic SDL_Haptic; * * Ramp haptic effect. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticRamp */ @@ -245,7 +245,7 @@ typedef struct SDL_Haptic SDL_Haptic; * Condition haptic effect that simulates a spring. Effect is based on the * axes position. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticCondition */ @@ -257,7 +257,7 @@ typedef struct SDL_Haptic SDL_Haptic; * Condition haptic effect that simulates dampening. Effect is based on the * axes velocity. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticCondition */ @@ -269,7 +269,7 @@ typedef struct SDL_Haptic SDL_Haptic; * Condition haptic effect that simulates inertia. Effect is based on the axes * acceleration. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticCondition */ @@ -281,7 +281,7 @@ typedef struct SDL_Haptic SDL_Haptic; * Condition haptic effect that simulates friction. Effect is based on the * axes movement. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticCondition */ @@ -292,7 +292,7 @@ typedef struct SDL_Haptic SDL_Haptic; * * Haptic effect for direct control over high/low frequency motors. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticLeftRight */ @@ -301,7 +301,7 @@ typedef struct SDL_Haptic SDL_Haptic; /** * Reserved for future use * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_HAPTIC_RESERVED1 (1u<<12) #define SDL_HAPTIC_RESERVED2 (1u<<13) @@ -312,7 +312,7 @@ typedef struct SDL_Haptic SDL_Haptic; * * User defined custom haptic effect. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_HAPTIC_CUSTOM (1u<<15) @@ -325,7 +325,7 @@ typedef struct SDL_Haptic SDL_Haptic; * * Device supports setting the global gain. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_SetHapticGain */ @@ -336,7 +336,7 @@ typedef struct SDL_Haptic SDL_Haptic; * * Device supports setting autocenter. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_SetHapticAutocenter */ @@ -347,7 +347,7 @@ typedef struct SDL_Haptic SDL_Haptic; * * Device supports querying effect status. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_GetHapticEffectStatus */ @@ -358,7 +358,7 @@ typedef struct SDL_Haptic SDL_Haptic; * * Devices supports being paused. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_PauseHaptic * \sa SDL_ResumeHaptic @@ -374,7 +374,7 @@ typedef struct SDL_Haptic SDL_Haptic; /** * Uses polar coordinates for the direction. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticDirection */ @@ -383,7 +383,7 @@ typedef struct SDL_Haptic SDL_Haptic; /** * Uses cartesian coordinates for the direction. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticDirection */ @@ -392,7 +392,7 @@ typedef struct SDL_Haptic SDL_Haptic; /** * Uses spherical coordinates for the direction. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticDirection */ @@ -404,7 +404,7 @@ typedef struct SDL_Haptic SDL_Haptic; * This provides better compatibility across platforms and devices as SDL will * guess the correct axis. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_HapticDirection */ @@ -421,7 +421,7 @@ typedef struct SDL_Haptic SDL_Haptic; /** * Used to play a device an infinite number of times. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_RunHapticEffect */ @@ -522,7 +522,7 @@ typedef struct SDL_Haptic SDL_Haptic; * direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters. * ``` * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_HAPTIC_POLAR * \sa SDL_HAPTIC_CARTESIAN @@ -546,7 +546,7 @@ typedef struct SDL_HapticDirection * A constant effect applies a constant force in the specified direction to * the joystick. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_HAPTIC_CONSTANT * \sa SDL_HapticEffect @@ -628,7 +628,7 @@ typedef struct SDL_HapticConstant * \| \| \| \| \| \| \| * ``` * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_HAPTIC_SINE * \sa SDL_HAPTIC_SQUARE @@ -684,7 +684,7 @@ typedef struct SDL_HapticPeriodic * SDL_HapticDirection diagram for which side is positive and which is * negative. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_HapticDirection * \sa SDL_HAPTIC_SPRING @@ -727,7 +727,7 @@ typedef struct SDL_HapticCondition * effects get added to the ramp effect making the effect become quadratic * instead of linear. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_HAPTIC_RAMP * \sa SDL_HapticEffect @@ -766,7 +766,7 @@ typedef struct SDL_HapticRamp * motors, commonly found in modern game controllers. The small (right) motor * is high frequency, and the large (left) motor is low frequency. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_HAPTIC_LEFTRIGHT * \sa SDL_HapticEffect @@ -796,7 +796,7 @@ typedef struct SDL_HapticLeftRight * If channels is one, the effect is rotated using the defined direction. * Otherwise it uses the samples in data for the different axes. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_HAPTIC_CUSTOM * \sa SDL_HapticEffect @@ -891,7 +891,7 @@ typedef struct SDL_HapticCustom * Note either the attack_level or the fade_level may be above the actual * effect level. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_HapticConstant * \sa SDL_HapticPeriodic @@ -920,7 +920,7 @@ typedef union SDL_HapticEffect * * The value 0 is an invalid ID. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_HapticID; @@ -936,7 +936,7 @@ typedef Uint32 SDL_HapticID; * failure; call SDL_GetError() for more information. This should be * freed with SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenHaptic */ @@ -952,7 +952,7 @@ extern SDL_DECLSPEC SDL_HapticID * SDLCALL SDL_GetHaptics(int *count); * this function returns NULL; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetHapticName * \sa SDL_OpenHaptic @@ -973,7 +973,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetHapticNameForID(SDL_HapticID ins * \returns the device identifier or NULL on failure; call SDL_GetError() for * more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CloseHaptic * \sa SDL_GetHaptics @@ -992,7 +992,7 @@ extern SDL_DECLSPEC SDL_Haptic * SDLCALL SDL_OpenHaptic(SDL_HapticID instance_id * \returns an SDL_Haptic on success or NULL on failure or if it hasn't been * opened yet; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Haptic * SDLCALL SDL_GetHapticFromID(SDL_HapticID instance_id); @@ -1003,7 +1003,7 @@ extern SDL_DECLSPEC SDL_Haptic * SDLCALL SDL_GetHapticFromID(SDL_HapticID instan * \returns the instance ID of the specified haptic device on success or 0 on * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_HapticID SDLCALL SDL_GetHapticID(SDL_Haptic *haptic); @@ -1015,7 +1015,7 @@ extern SDL_DECLSPEC SDL_HapticID SDLCALL SDL_GetHapticID(SDL_Haptic *haptic); * this function returns NULL; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetHapticNameForID */ @@ -1026,7 +1026,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetHapticName(SDL_Haptic *haptic); * * \returns true if the mouse is haptic or false if it isn't. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenHapticFromMouse */ @@ -1038,7 +1038,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsMouseHaptic(void); * \returns the haptic device identifier or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CloseHaptic * \sa SDL_IsMouseHaptic @@ -1051,7 +1051,7 @@ extern SDL_DECLSPEC SDL_Haptic * SDLCALL SDL_OpenHapticFromMouse(void); * \param joystick the SDL_Joystick to test for haptic capabilities. * \returns true if the joystick is haptic or false if it isn't. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenHapticFromJoystick */ @@ -1072,7 +1072,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsJoystickHaptic(SDL_Joystick *joystick); * \returns a valid haptic device identifier on success or NULL on failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CloseHaptic * \sa SDL_IsJoystickHaptic @@ -1084,7 +1084,7 @@ extern SDL_DECLSPEC SDL_Haptic * SDLCALL SDL_OpenHapticFromJoystick(SDL_Joystick * * \param haptic the SDL_Haptic device to close. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenHaptic */ @@ -1101,7 +1101,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_CloseHaptic(SDL_Haptic *haptic); * \returns the number of effects the haptic device can store or a negative * error code on failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetMaxHapticEffectsPlaying * \sa SDL_GetHapticFeatures @@ -1117,7 +1117,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetMaxHapticEffects(SDL_Haptic *haptic); * \returns the number of effects the haptic device can play at the same time * or -1 on failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetMaxHapticEffects * \sa SDL_GetHapticFeatures @@ -1131,7 +1131,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetMaxHapticEffectsPlaying(SDL_Haptic *hapti * \returns a list of supported haptic features in bitwise manner (OR'd), or 0 * on failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_HapticEffectSupported * \sa SDL_GetMaxHapticEffects @@ -1148,7 +1148,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetHapticFeatures(SDL_Haptic *haptic); * \returns the number of axes on success or -1 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_GetNumHapticAxes(SDL_Haptic *haptic); @@ -1159,7 +1159,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumHapticAxes(SDL_Haptic *haptic); * \param effect the desired effect to query. * \returns true if the effect is supported or false if it isn't. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateHapticEffect * \sa SDL_GetHapticFeatures @@ -1175,7 +1175,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HapticEffectSupported(SDL_Haptic *haptic, c * \returns the ID of the effect on success or -1 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DestroyHapticEffect * \sa SDL_RunHapticEffect @@ -1198,7 +1198,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_CreateHapticEffect(SDL_Haptic *haptic, const * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateHapticEffect * \sa SDL_RunHapticEffect @@ -1221,7 +1221,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_UpdateHapticEffect(SDL_Haptic *haptic, int * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetHapticEffectStatus * \sa SDL_StopHapticEffect @@ -1237,7 +1237,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RunHapticEffect(SDL_Haptic *haptic, int eff * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RunHapticEffect * \sa SDL_StopHapticEffects @@ -1253,7 +1253,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_StopHapticEffect(SDL_Haptic *haptic, int ef * \param haptic the SDL_Haptic device to destroy the effect on. * \param effect the ID of the haptic effect to destroy. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateHapticEffect */ @@ -1269,7 +1269,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyHapticEffect(SDL_Haptic *haptic, int * \returns true if it is playing, false if it isn't playing or haptic status * isn't supported. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetHapticFeatures */ @@ -1291,7 +1291,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetHapticEffectStatus(SDL_Haptic *haptic, i * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetHapticFeatures */ @@ -1310,7 +1310,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetHapticGain(SDL_Haptic *haptic, int gain) * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetHapticFeatures */ @@ -1329,7 +1329,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetHapticAutocenter(SDL_Haptic *haptic, int * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ResumeHaptic */ @@ -1344,7 +1344,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PauseHaptic(SDL_Haptic *haptic); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_PauseHaptic */ @@ -1357,7 +1357,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ResumeHaptic(SDL_Haptic *haptic); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RunHapticEffect * \sa SDL_StopHapticEffects @@ -1370,7 +1370,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_StopHapticEffects(SDL_Haptic *haptic); * \param haptic haptic device to check for rumble support. * \returns true if the effect is supported or false if it isn't. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_InitHapticRumble */ @@ -1383,7 +1383,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HapticRumbleSupported(SDL_Haptic *haptic); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_PlayHapticRumble * \sa SDL_StopHapticRumble @@ -1400,7 +1400,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_InitHapticRumble(SDL_Haptic *haptic); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_InitHapticRumble * \sa SDL_StopHapticRumble @@ -1414,7 +1414,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PlayHapticRumble(SDL_Haptic *haptic, float * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_PlayHapticRumble */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_hidapi.h b/Source/ThirdParty/SDL/SDL3/SDL_hidapi.h index 730fdee42..86d78f7c4 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_hidapi.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_hidapi.h @@ -65,14 +65,14 @@ extern "C" { /** * An opaque handle representing an open HID device. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_hid_device SDL_hid_device; /** * HID underlying bus types. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_hid_bus_type { /** Unknown bus type */ @@ -107,7 +107,7 @@ typedef enum SDL_hid_bus_type { /** * Information about a connected HID device * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_hid_device_info { @@ -169,7 +169,7 @@ typedef struct SDL_hid_device_info * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_hid_exit */ @@ -184,7 +184,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_init(void); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_hid_init */ @@ -205,7 +205,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_exit(void); * \returns a change counter that is incremented with each potential device * change, or 0 if device change detection isn't available. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_hid_enumerate */ @@ -233,7 +233,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_hid_device_change_count(void); * in the case of failure. Free this linked list by calling * SDL_hid_free_enumeration(). * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_hid_device_change_count */ @@ -247,7 +247,7 @@ extern SDL_DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_enumerate(unsigned sho * \param devs pointer to a list of struct_device returned from * SDL_hid_enumerate(). * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *devs); @@ -265,7 +265,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *d * \returns a pointer to a SDL_hid_device object on success or NULL on * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number); @@ -279,7 +279,7 @@ extern SDL_DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open(unsigned short vendor_ * \returns a pointer to a SDL_hid_device object on success or NULL on * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open_path(const char *path); @@ -306,7 +306,7 @@ extern SDL_DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open_path(const char *path) * \returns the actual number of bytes written and -1 on on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_hid_write(SDL_hid_device *dev, const unsigned char *data, size_t length); @@ -327,7 +327,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_write(SDL_hid_device *dev, const unsigne * SDL_GetError() for more information. If no packet was available to * be read within the timeout period, this function returns 0. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_hid_read_timeout(SDL_hid_device *dev, unsigned char *data, size_t length, int milliseconds); @@ -348,7 +348,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_read_timeout(SDL_hid_device *dev, unsign * be read and the handle is in non-blocking mode, this function * returns 0. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_hid_read(SDL_hid_device *dev, unsigned char *data, size_t length); @@ -367,7 +367,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_read(SDL_hid_device *dev, unsigned char * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_hid_set_nonblocking(SDL_hid_device *dev, int nonblock); @@ -392,7 +392,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_set_nonblocking(SDL_hid_device *dev, int * \returns the actual number of bytes written and -1 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_hid_send_feature_report(SDL_hid_device *dev, const unsigned char *data, size_t length); @@ -415,7 +415,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_send_feature_report(SDL_hid_device *dev, * still in the first byte), or -1 on on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_feature_report(SDL_hid_device *dev, unsigned char *data, size_t length); @@ -438,7 +438,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_feature_report(SDL_hid_device *dev, * still in the first byte), or -1 on on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_input_report(SDL_hid_device *dev, unsigned char *data, size_t length); @@ -449,7 +449,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_input_report(SDL_hid_device *dev, un * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_hid_close(SDL_hid_device *dev); @@ -462,7 +462,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_close(SDL_hid_device *dev); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_manufacturer_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen); @@ -475,7 +475,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_manufacturer_string(SDL_hid_device * * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_product_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen); @@ -488,7 +488,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_product_string(SDL_hid_device *dev, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_serial_number_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen); @@ -502,7 +502,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_serial_number_string(SDL_hid_device * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_indexed_string(SDL_hid_device *dev, int string_index, wchar_t *string, size_t maxlen); @@ -514,7 +514,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_indexed_string(SDL_hid_device *dev, * on failure; call SDL_GetError() for more information. This struct * is valid until the device is closed with SDL_hid_close(). * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_get_device_info(SDL_hid_device *dev); @@ -530,7 +530,7 @@ extern SDL_DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_get_device_info(SDL_hi * \returns the number of bytes actually copied or -1 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_report_descriptor(SDL_hid_device *dev, unsigned char *buf, size_t buf_size); @@ -539,7 +539,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_report_descriptor(SDL_hid_device *de * * \param active true to start the scan, false to stop the scan. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_hid_ble_scan(bool active); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_hints.h b/Source/ThirdParty/SDL/SDL3/SDL_hints.h index 4550090a1..97b859626 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_hints.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_hints.h @@ -61,7 +61,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED "SDL_ALLOW_ALT_TAB_WHILE_GRABBED" @@ -81,7 +81,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY "SDL_ANDROID_ALLOW_RECREATE_ACTIVITY" @@ -96,10 +96,27 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE" +/** + * A variable to control whether low latency audio should be enabled. + * + * Some devices have poor quality output when this is enabled, but this is + * usually an improvement in audio latency. + * + * The variable can be set to the following values: + * + * - "0": Low latency audio is not enabled. + * - "1": Low latency audio is enabled. (default) + * + * This hint should be set before SDL audio is initialized. + * + * \since This hint is available since SDL 3.1.8. + */ +#define SDL_HINT_ANDROID_LOW_LATENCY_AUDIO "SDL_ANDROID_LOW_LATENCY_AUDIO" + /** * A variable to control whether we trap the Android back button to handle it * manually. @@ -119,7 +136,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON" @@ -135,7 +152,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_APP_ID "SDL_APP_ID" @@ -153,7 +170,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_APP_NAME "SDL_APP_NAME" @@ -176,7 +193,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS" @@ -191,7 +208,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION" @@ -205,7 +222,7 @@ extern "C" { * * This hint should be set before an audio device is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE "SDL_AUDIO_ALSA_DEFAULT_DEVICE" @@ -223,7 +240,7 @@ extern "C" { * * This hint should be set before an audio device is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY" @@ -236,7 +253,7 @@ extern "C" { * * This hint should be set before an audio device is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUDIO_CHANNELS "SDL_AUDIO_CHANNELS" @@ -259,7 +276,7 @@ extern "C" { * * This hint should be set before an audio device is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME "SDL_AUDIO_DEVICE_APP_ICON_NAME" @@ -281,7 +298,7 @@ extern "C" { * * This hint should be set before an audio device is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES "SDL_AUDIO_DEVICE_SAMPLE_FRAMES" @@ -308,7 +325,7 @@ extern "C" { * * This hint should be set before an audio device is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME" @@ -334,7 +351,7 @@ extern "C" { * * This hint should be set before an audio device is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE "SDL_AUDIO_DEVICE_STREAM_ROLE" @@ -345,7 +362,7 @@ extern "C" { * * This hint should be set before an audio device is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUDIO_DISK_INPUT_FILE "SDL_AUDIO_DISK_INPUT_FILE" @@ -356,7 +373,7 @@ extern "C" { * * This hint should be set before an audio device is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUDIO_DISK_OUTPUT_FILE "SDL_AUDIO_DISK_OUTPUT_FILE" @@ -369,7 +386,7 @@ extern "C" { * * This hint should be set before an audio device is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUDIO_DISK_TIMESCALE "SDL_AUDIO_DISK_TIMESCALE" @@ -383,7 +400,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUDIO_DRIVER "SDL_AUDIO_DRIVER" @@ -396,7 +413,7 @@ extern "C" { * * This hint should be set before an audio device is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUDIO_DUMMY_TIMESCALE "SDL_AUDIO_DUMMY_TIMESCALE" @@ -407,18 +424,23 @@ extern "C" { * device, this hint can be used to specify a default format that will be * used. * - * The variable can be set to the following values: - "U8": Unsigned 8-bit - * audio - "S8": Signed 8-bit audio - "S16LE": Signed 16-bit little-endian - * audio - "S16BE": Signed 16-bit big-endian audio - "S16": Signed 16-bit - * native-endian audio (default) - "S32LE": Signed 32-bit little-endian audio - * - "S32BE": Signed 32-bit big-endian audio - "S32": Signed 32-bit - * native-endian audio - "F32LE": Floating point little-endian audio - - * "F32BE": Floating point big-endian audio - "F32": Floating point - * native-endian audio + * The variable can be set to the following values: + * + * - "U8": Unsigned 8-bit audio + * - "S8": Signed 8-bit audio + * - "S16LE": Signed 16-bit little-endian audio + * - "S16BE": Signed 16-bit big-endian audio + * - "S16": Signed 16-bit native-endian audio (default) + * - "S32LE": Signed 32-bit little-endian audio + * - "S32BE": Signed 32-bit big-endian audio + * - "S32": Signed 32-bit native-endian audio + * - "F32LE": Floating point little-endian audio + * - "F32BE": Floating point big-endian audio + * - "F32": Floating point native-endian audio * * This hint should be set before an audio device is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUDIO_FORMAT "SDL_AUDIO_FORMAT" @@ -431,7 +453,7 @@ extern "C" { * * This hint should be set before an audio device is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUDIO_FREQUENCY "SDL_AUDIO_FREQUENCY" @@ -454,7 +476,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS" @@ -469,7 +491,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS" @@ -484,7 +506,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS" @@ -507,7 +529,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT" @@ -523,7 +545,7 @@ extern "C" { * best camera backend on your behalf. This hint needs to be set before * SDL_Init() is called to be useful. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_CAMERA_DRIVER "SDL_CAMERA_DRIVER" @@ -556,7 +578,7 @@ extern "C" { * * The items can be prefixed by '+'/'-' to add/remove features. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_CPU_FEATURE_MASK "SDL_CPU_FEATURE_MASK" @@ -570,7 +592,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_DIRECTINPUT "SDL_JOYSTICK_DIRECTINPUT" @@ -599,7 +621,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_FILE_DIALOG_DRIVER "SDL_FILE_DIALOG_DRIVER" @@ -617,7 +639,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS" @@ -638,7 +660,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY" @@ -651,7 +673,7 @@ extern "C" { * * This hint should be set before creating a window. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_EMSCRIPTEN_CANVAS_SELECTOR "SDL_EMSCRIPTEN_CANVAS_SELECTOR" @@ -671,7 +693,7 @@ extern "C" { * * This hint should be set before creating a window. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT" @@ -688,7 +710,7 @@ extern "C" { * * This hint must be set before SDL_StartTextInput() is called * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD" @@ -705,7 +727,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_EVDEV_DEVICES "SDL_EVDEV_DEVICES" @@ -729,7 +751,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING" @@ -749,7 +771,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_FORCE_RAISEWINDOW "SDL_FORCE_RAISEWINDOW" @@ -770,7 +792,7 @@ extern "C" { * * This hint should be set before calling SDL_GetWindowSurface() * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION" @@ -785,7 +807,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG" @@ -801,7 +823,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE" @@ -825,7 +847,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE" @@ -843,7 +865,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES" @@ -861,7 +883,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT" @@ -884,7 +906,7 @@ extern "C" { * * This hint should be set before a gamepad is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_GAMECONTROLLER_SENSOR_FUSION "SDL_GAMECONTROLLER_SENSOR_FUSION" @@ -896,7 +918,7 @@ extern "C" { * * This hint should be set before calling SDL_StartTextInput() * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT "SDL_GDK_TEXTINPUT_DEFAULT_TEXT" @@ -908,7 +930,7 @@ extern "C" { * * This hint should be set before calling SDL_StartTextInput() * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_GDK_TEXTINPUT_DESCRIPTION "SDL_GDK_TEXTINPUT_DESCRIPTION" @@ -923,7 +945,7 @@ extern "C" { * * This hint should be set before calling SDL_StartTextInput() * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_GDK_TEXTINPUT_MAX_LENGTH "SDL_GDK_TEXTINPUT_MAX_LENGTH" @@ -939,7 +961,7 @@ extern "C" { * * This hint should be set before calling SDL_StartTextInput() * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_GDK_TEXTINPUT_SCOPE "SDL_GDK_TEXTINPUT_SCOPE" @@ -950,7 +972,7 @@ extern "C" { * * This hint should be set before calling SDL_StartTextInput() * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_GDK_TEXTINPUT_TITLE "SDL_GDK_TEXTINPUT_TITLE" @@ -968,7 +990,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_HIDAPI_LIBUSB "SDL_HIDAPI_LIBUSB" @@ -986,7 +1008,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_HIDAPI_LIBUSB_WHITELIST "SDL_HIDAPI_LIBUSB_WHITELIST" @@ -1000,7 +1022,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_HIDAPI_UDEV "SDL_HIDAPI_UDEV" @@ -1012,9 +1034,9 @@ extern "C" { * force a specific target, such as "direct3d11" if, say, your hardware * supports D3D12 but want to try using D3D11 instead. * - * This hint should be set before SDL_GPUSelectBackend() is called. + * This hint should be set before any GPU functions are called. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_GPU_DRIVER "SDL_GPU_DRIVER" @@ -1033,7 +1055,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS "SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS" @@ -1050,7 +1072,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_HIDAPI_IGNORE_DEVICES "SDL_HIDAPI_IGNORE_DEVICES" @@ -1073,7 +1095,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_IME_IMPLEMENTED_UI "SDL_IME_IMPLEMENTED_UI" @@ -1092,7 +1114,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR" @@ -1109,7 +1131,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS" @@ -1126,7 +1148,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES "SDL_JOYSTICK_ARCADESTICK_DEVICES" @@ -1147,7 +1169,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED" @@ -1165,7 +1187,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES "SDL_JOYSTICK_BLACKLIST_DEVICES" @@ -1186,7 +1208,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED "SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED" @@ -1196,7 +1218,7 @@ extern "C" { * * This variable is currently only used by the Linux joystick driver. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE" @@ -1213,7 +1235,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES "SDL_JOYSTICK_FLIGHTSTICK_DEVICES" @@ -1234,7 +1256,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED" @@ -1244,12 +1266,14 @@ extern "C" { * * The variable can be set to the following values: * - * - "0": GameInput is not used. (default) + * - "0": GameInput is not used. * - "1": GameInput is used. * + * The default is "1" on GDK platforms, and "0" otherwise. + * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_GAMEINPUT "SDL_JOYSTICK_GAMEINPUT" @@ -1267,7 +1291,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES "SDL_JOYSTICK_GAMECUBE_DEVICES" @@ -1288,7 +1312,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED "SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED" @@ -1305,7 +1329,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI" @@ -1322,7 +1346,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS" @@ -1339,7 +1363,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE" @@ -1360,7 +1384,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE" @@ -1377,7 +1401,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS" @@ -1396,7 +1420,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED" @@ -1413,7 +1437,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_LUNA "SDL_JOYSTICK_HIDAPI_LUNA" @@ -1430,7 +1454,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC" @@ -1452,7 +1476,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_PS3 "SDL_JOYSTICK_HIDAPI_PS3" @@ -1469,7 +1493,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER "SDL_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER" @@ -1486,7 +1510,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4" @@ -1501,7 +1525,7 @@ extern "C" { * This hint can be set anytime, but only takes effect when extended input * reports are enabled. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL "SDL_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL" @@ -1527,7 +1551,7 @@ extern "C" { * * This hint can be enabled anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE" @@ -1544,7 +1568,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5" @@ -1557,7 +1581,7 @@ extern "C" { * - "0": player LEDs are not enabled. * - "1": player LEDs are enabled. (default) * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED" @@ -1582,7 +1606,7 @@ extern "C" { * * This hint can be enabled anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE "SDL_JOYSTICK_HIDAPI_PS5_RUMBLE" @@ -1599,7 +1623,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_SHIELD "SDL_JOYSTICK_HIDAPI_SHIELD" @@ -1614,7 +1638,7 @@ extern "C" { * * The default is the value of SDL_HINT_JOYSTICK_HIDAPI. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA" @@ -1631,10 +1655,29 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM" +/** + * A variable controlling whether the Steam button LED should be turned on + * when a Steam controller is opened. + * + * The variable can be set to the following values: + * + * - "0": Steam button LED is turned off. + * - "1": Steam button LED is turned on. + * + * By default the Steam button LED state is not changed. This hint can also be + * set to a floating point value between 0.0 and 1.0 which controls the + * brightness of the Steam button LED. + * + * This hint can be set anytime. + * + * \since This hint is available since SDL 3.1.8. + */ +#define SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED "SDL_JOYSTICK_HIDAPI_STEAM_HOME_LED" + /** * A variable controlling whether the HIDAPI driver for the Steam Deck builtin * controller should be used. @@ -1648,7 +1691,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK "SDL_JOYSTICK_HIDAPI_STEAMDECK" @@ -1676,7 +1719,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH" @@ -1695,7 +1738,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED" @@ -1710,7 +1753,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED" @@ -1726,7 +1769,7 @@ extern "C" { * * This hint should be set before opening a Joy-Con controller. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS" @@ -1744,7 +1787,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_WII "SDL_JOYSTICK_HIDAPI_WII" @@ -1759,7 +1802,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED" @@ -1777,7 +1820,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX" @@ -1794,7 +1837,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 "SDL_JOYSTICK_HIDAPI_XBOX_360" @@ -1809,7 +1852,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED" @@ -1826,7 +1869,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS" @@ -1843,7 +1886,7 @@ extern "C" { * * This hint should be set before enumerating controllers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE "SDL_JOYSTICK_HIDAPI_XBOX_ONE" @@ -1862,7 +1905,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED" @@ -1877,7 +1920,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_IOKIT "SDL_JOYSTICK_IOKIT" @@ -1892,7 +1935,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_LINUX_CLASSIC "SDL_JOYSTICK_LINUX_CLASSIC" @@ -1907,7 +1950,7 @@ extern "C" { * * This hint should be set before a controller is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_LINUX_DEADZONES "SDL_JOYSTICK_LINUX_DEADZONES" @@ -1925,7 +1968,7 @@ extern "C" { * * This hint should be set before a controller is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS "SDL_JOYSTICK_LINUX_DIGITAL_HATS" @@ -1941,7 +1984,7 @@ extern "C" { * * This hint should be set before a controller is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES "SDL_JOYSTICK_LINUX_HAT_DEADZONES" @@ -1956,7 +1999,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_MFI "SDL_JOYSTICK_MFI" @@ -1971,7 +2014,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT" @@ -1988,7 +2031,7 @@ extern "C" { * * This hint should be set before a gamepad is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT" @@ -2003,7 +2046,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM" @@ -2018,7 +2061,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD" @@ -2035,7 +2078,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_THROTTLE_DEVICES "SDL_JOYSTICK_THROTTLE_DEVICES" @@ -2056,7 +2099,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED "SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED" @@ -2071,7 +2114,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_WGI "SDL_JOYSTICK_WGI" @@ -2088,7 +2131,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_WHEEL_DEVICES "SDL_JOYSTICK_WHEEL_DEVICES" @@ -2109,7 +2152,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED "SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED" @@ -2127,7 +2170,7 @@ extern "C" { * * This hint should be set before a controller is opened. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES "SDL_JOYSTICK_ZERO_CENTERED_DEVICES" @@ -2161,7 +2204,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_KEYCODE_OPTIONS "SDL_KEYCODE_OPTIONS" @@ -2175,7 +2218,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_KMSDRM_DEVICE_INDEX "SDL_KMSDRM_DEVICE_INDEX" @@ -2203,7 +2246,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER" @@ -2229,7 +2272,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_LOGGING "SDL_LOGGING" @@ -2243,9 +2286,9 @@ extern "C" { * (default) * - "1": The application may remain in the background when launched. * - * This hint should be set before applicationDidFinishLaunching() is called. + * This hint needs to be set before SDL_Init(). * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP" @@ -2261,7 +2304,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK" @@ -2284,10 +2327,25 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH "SDL_MAC_OPENGL_ASYNC_DISPATCH" +/** + * A variable controlling whether SDL_EVENT_MOUSE_WHEEL event values will have + * momentum on macOS. + * + * The variable can be set to the following values: + * + * - "0": The mouse wheel events will have no momentum. (default) + * - "1": The mouse wheel events will have momentum. + * + * This hint needs to be set before SDL_Init(). + * + * \since This hint is available since SDL 3.2.0. + */ +#define SDL_HINT_MAC_SCROLL_MOMENTUM "SDL_MAC_SCROLL_MOMENTUM" + /** * Request SDL_AppIterate() be called at a specific rate. * @@ -2302,7 +2360,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MAIN_CALLBACK_RATE "SDL_MAIN_CALLBACK_RATE" @@ -2321,7 +2379,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE" @@ -2330,7 +2388,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS" @@ -2339,10 +2397,22 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME" +/** + * A variable setting which system cursor to use as the default cursor. + * + * This should be an integer corresponding to the SDL_SystemCursor enum. The + * default value is zero (SDL_SYSTEM_CURSOR_DEFAULT). + * + * This hint needs to be set before SDL_Init(). + * + * \since This hint is available since SDL 3.1.3. + */ +#define SDL_HINT_MOUSE_DEFAULT_SYSTEM_CURSOR "SDL_MOUSE_DEFAULT_SYSTEM_CURSOR" + /** * A variable controlling whether warping a hidden mouse cursor will activate * relative mouse mode. @@ -2371,7 +2441,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE "SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE" @@ -2385,7 +2455,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH" @@ -2395,7 +2465,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE" @@ -2416,7 +2486,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER" @@ -2431,7 +2501,7 @@ extern "C" { * * This hint can be set anytime relative mode is not currently enabled. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP" @@ -2441,7 +2511,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE" @@ -2460,7 +2530,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE "SDL_MOUSE_RELATIVE_SYSTEM_SCALE" @@ -2479,7 +2549,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION" @@ -2487,9 +2557,10 @@ extern "C" { * A variable controlling whether the hardware cursor stays visible when * relative mode is active. * - * This variable can be set to the following values: "0" - The cursor will be - * hidden while relative mode is active (default) "1" - The cursor will remain - * visible while relative mode is active + * This variable can be set to the following values: + * + * - "0": The cursor will be hidden while relative mode is active (default) + * - "1": The cursor will remain visible while relative mode is active * * Note that for systems without raw hardware inputs, relative mode is * implemented using warping, so the hardware cursor will visibly warp between @@ -2497,7 +2568,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE" @@ -2514,7 +2585,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MOUSE_RELATIVE_CLIP_INTERVAL "SDL_MOUSE_RELATIVE_CLIP_INTERVAL" @@ -2531,7 +2602,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS" @@ -2549,7 +2620,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_MUTE_CONSOLE_KEYBOARD "SDL_MUTE_CONSOLE_KEYBOARD" @@ -2564,7 +2635,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS" @@ -2574,7 +2645,7 @@ extern "C" { * This hint should be set before creating an OpenGL window or creating an * OpenGL context. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_OPENGL_LIBRARY "SDL_OPENGL_LIBRARY" @@ -2608,10 +2679,22 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER" +/** + * Mechanism to specify openvr_api library location + * + * By default, when using the OpenVR driver, it will search for the API + * library in the current folder. But, if you wish to use a system API you can + * specify that by using this hint. This should be the full or relative path + * to a .dll on Windows or .so on Linux. + * + * \since This hint is available since SDL 3.2.0. + */ +#define SDL_HINT_OPENVR_LIBRARY "SDL_OPENVR_LIBRARY" + /** * A variable controlling which orientations are allowed on iOS/Android. * @@ -2627,7 +2710,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_ORIENTATIONS "SDL_ORIENTATIONS" @@ -2647,7 +2730,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_POLL_SENTINEL "SDL_POLL_SENTINEL" @@ -2665,7 +2748,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES" @@ -2684,7 +2767,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE" @@ -2699,7 +2782,7 @@ extern "C" { * * This hint should be set before creating a renderer. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE" @@ -2715,7 +2798,7 @@ extern "C" { * * This hint should be set before creating a renderer. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG" @@ -2729,7 +2812,7 @@ extern "C" { * * By default, SDL does not use Vulkan Validation Layers. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_RENDER_VULKAN_DEBUG "SDL_RENDER_VULKAN_DEBUG" @@ -2743,7 +2826,7 @@ extern "C" { * * This hint should be set before creating a renderer. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_RENDER_GPU_DEBUG "SDL_RENDER_GPU_DEBUG" @@ -2758,7 +2841,7 @@ extern "C" { * * This hint should be set before creating a renderer. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_RENDER_GPU_LOW_POWER "SDL_RENDER_GPU_LOW_POWER" @@ -2767,7 +2850,7 @@ extern "C" { * * If the application doesn't pick a specific renderer to use, this variable * specifies the name of the preferred renderer. If the preferred renderer - * can't be initialized, the normal default renderer is used. + * can't be initialized, creating a renderer will fail. * * This variable is case insensitive and can be set to the following values: * @@ -2786,7 +2869,7 @@ extern "C" { * * This hint should be set before creating a renderer. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER" @@ -2804,7 +2887,7 @@ extern "C" { * * This hint should be set before creating a renderer. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD" @@ -2819,7 +2902,7 @@ extern "C" { * * This hint should be set before creating a renderer. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE" @@ -2836,7 +2919,7 @@ extern "C" { * * This hint should be set before creating a renderer. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC" @@ -2853,7 +2936,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME" @@ -2870,7 +2953,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. * * \sa SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED */ @@ -2892,7 +2975,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED "SDL_ROG_GAMEPAD_MICE_EXCLUDED" @@ -2904,7 +2987,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER" @@ -2926,7 +3009,7 @@ extern "C" { * * This hint should be set before calling SDL_DisableScreenSaver() * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME" @@ -2945,7 +3028,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_SHUTDOWN_DBUS_ON_QUIT "SDL_SHUTDOWN_DBUS_ON_QUIT" @@ -2959,7 +3042,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_STORAGE_TITLE_DRIVER "SDL_STORAGE_TITLE_DRIVER" @@ -2973,7 +3056,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_STORAGE_USER_DRIVER "SDL_STORAGE_USER_DRIVER" @@ -3002,7 +3085,7 @@ extern "C" { * * This hint should be set before calling SDL_SetCurrentThreadPriority() * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL" @@ -3025,7 +3108,7 @@ extern "C" { * * This hint should be set before calling SDL_SetCurrentThreadPriority() * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY" @@ -3045,7 +3128,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION" @@ -3060,7 +3143,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS" @@ -3081,7 +3164,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_TRACKPAD_IS_TOUCH_ONLY "SDL_TRACKPAD_IS_TOUCH_ONLY" @@ -3096,7 +3179,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK" @@ -3110,10 +3193,35 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER" +/** + * A comma separated list containing the names of the displays that SDL should + * sort to the front of the display list. + * + * When this hint is set, displays with matching name strings will be + * prioritized in the list of displays, as exposed by calling + * SDL_GetDisplays(), with the first listed becoming the primary display. The + * naming convention can vary depending on the environment, but it is usually + * a connector name (e.g. 'DP-1', 'DP-2', 'HDMI-A-1',etc...). + * + * On Wayland and X11 desktops, the connector names associated with displays + * can typically be found by using the `xrandr` utility. + * + * This hint is currently supported on the following drivers: + * + * - KMSDRM (kmsdrm) + * - Wayland (wayland) + * - X11 (x11) + * + * This hint should be set before SDL is initialized. + * + * \since This hint is available since SDL 3.2.0. + */ +#define SDL_HINT_VIDEO_DISPLAY_PRIORITY "SDL_VIDEO_DISPLAY_PRIORITY" + /** * Tell the video driver that we only want a double buffer. * @@ -3133,7 +3241,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER" @@ -3147,7 +3255,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_DRIVER "SDL_VIDEO_DRIVER" @@ -3160,7 +3268,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_DUMMY_SAVE_FRAMES "SDL_VIDEO_DUMMY_SAVE_FRAMES" @@ -3174,7 +3282,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK "SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK" @@ -3190,7 +3298,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_FORCE_EGL "SDL_VIDEO_FORCE_EGL" @@ -3208,7 +3316,7 @@ extern "C" { * * This hint should be set before creating a window. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES" @@ -3224,7 +3332,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS" @@ -3241,7 +3349,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES "SDL_VIDEO_OFFSCREEN_SAVE_FRAMES" @@ -3267,7 +3375,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS "SDL_VIDEO_SYNC_WINDOW_OPERATIONS" @@ -3285,7 +3393,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR" @@ -3305,7 +3413,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION "SDL_VIDEO_WAYLAND_MODE_EMULATION" @@ -3327,7 +3435,7 @@ extern "C" { * * This hint should be set before creating a window. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_WAYLAND_MODE_SCALING "SDL_VIDEO_WAYLAND_MODE_SCALING" @@ -3347,7 +3455,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR" @@ -3384,7 +3492,7 @@ extern "C" { * * This hint should be set before creating a window. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY "SDL_VIDEO_WAYLAND_SCALE_TO_DISPLAY" @@ -3406,7 +3514,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER" @@ -3421,7 +3529,7 @@ extern "C" { * * This hint should be set before creating a window. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR" @@ -3440,7 +3548,7 @@ extern "C" { * * This hint should be set before creating a window. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING" @@ -3454,7 +3562,7 @@ extern "C" { * * This hint should be set before initializing the video subsystem. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_X11_NODIRECTCOLOR "SDL_VIDEO_X11_NODIRECTCOLOR" @@ -3465,7 +3573,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_X11_SCALING_FACTOR "SDL_VIDEO_X11_SCALING_FACTOR" @@ -3474,7 +3582,7 @@ extern "C" { * * This hint should be set before initializing the video subsystem. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_X11_VISUALID "SDL_VIDEO_X11_VISUALID" @@ -3483,7 +3591,7 @@ extern "C" { * * This hint should be set before creating a window. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID" @@ -3497,7 +3605,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR" @@ -3512,7 +3620,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VITA_ENABLE_BACK_TOUCH "SDL_VITA_ENABLE_BACK_TOUCH" @@ -3527,7 +3635,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VITA_ENABLE_FRONT_TOUCH "SDL_VITA_ENABLE_FRONT_TOUCH" @@ -3538,7 +3646,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VITA_MODULE_PATH "SDL_VITA_MODULE_PATH" @@ -3551,7 +3659,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VITA_PVR_INIT "SDL_VITA_PVR_INIT" @@ -3566,7 +3674,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VITA_RESOLUTION "SDL_VITA_RESOLUTION" @@ -3581,7 +3689,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VITA_PVR_OPENGL "SDL_VITA_PVR_OPENGL" @@ -3597,7 +3705,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_VITA_TOUCH_MOUSE_DEVICE" @@ -3608,7 +3716,7 @@ extern "C" { * * This hint should be set before calling SDL_Vulkan_CreateSurface() * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VULKAN_DISPLAY "SDL_VULKAN_DISPLAY" @@ -3618,7 +3726,7 @@ extern "C" { * This hint should be set before creating a Vulkan window or calling * SDL_Vulkan_LoadLibrary(). * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_VULKAN_LIBRARY "SDL_VULKAN_LIBRARY" @@ -3650,7 +3758,7 @@ extern "C" { * * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO() * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK" @@ -3662,7 +3770,7 @@ extern "C" { * * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO() * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WAVE_CHUNK_LIMIT "SDL_WAVE_CHUNK_LIMIT" @@ -3690,7 +3798,7 @@ extern "C" { * * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO() * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE" @@ -3710,7 +3818,7 @@ extern "C" { * * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO() * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION" @@ -3727,7 +3835,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED "SDL_WINDOW_ACTIVATE_WHEN_RAISED" @@ -3744,7 +3852,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN "SDL_WINDOW_ACTIVATE_WHEN_SHOWN" @@ -3762,7 +3870,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WINDOW_ALLOW_TOPMOST "SDL_WINDOW_ALLOW_TOPMOST" @@ -3778,7 +3886,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN" @@ -3794,7 +3902,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4 "SDL_WINDOWS_CLOSE_ON_ALT_F4" @@ -3823,7 +3931,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS" @@ -3838,7 +3946,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP" @@ -3854,7 +3962,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WINDOWS_GAMEINPUT "SDL_WINDOWS_GAMEINPUT" @@ -3868,7 +3976,7 @@ extern "C" { * * This hint can be set anytime. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WINDOWS_RAW_KEYBOARD "SDL_WINDOWS_RAW_KEYBOARD" @@ -3889,7 +3997,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL" @@ -3899,7 +4007,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON" #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL" @@ -3926,7 +4034,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX" @@ -3943,7 +4051,7 @@ extern "C" { * * This hint should be set before creating a window. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE "SDL_WINDOWS_ERASE_BACKGROUND_MODE" @@ -3964,7 +4072,7 @@ extern "C" { * * This hint should be set before creating a window. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT" @@ -3981,7 +4089,7 @@ extern "C" { * * This hint should be set before creating a window. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE" @@ -3992,7 +4100,7 @@ extern "C" { * * This hint should be set before initializing the video subsystem. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_X11_XCB_LIBRARY "SDL_X11_XCB_LIBRARY" @@ -4007,7 +4115,7 @@ extern "C" { * * This hint should be set before SDL is initialized. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED" @@ -4031,7 +4139,7 @@ extern "C" { * This hint should be set before an assertion failure is triggered and can be * changed at any time. * - * \since This hint is available since SDL 3.0.0. + * \since This hint is available since SDL 3.1.3. */ #define SDL_HINT_ASSERT "SDL_ASSERT" @@ -4039,7 +4147,7 @@ extern "C" { /** * An enumeration of hint priorities. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_HintPriority { @@ -4063,7 +4171,7 @@ typedef enum SDL_HintPriority * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetHint * \sa SDL_ResetHint @@ -4085,7 +4193,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetHintWithPriority(const char *name, const * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetHint * \sa SDL_ResetHint @@ -4106,7 +4214,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetHint(const char *name, const char *value * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetHint * \sa SDL_ResetHints @@ -4122,7 +4230,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ResetHint(const char *name); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ResetHint */ @@ -4141,7 +4249,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ResetHints(void); * callback instead is always thread-safe, as SDL holds a lock * on the thread subsystem during the callback. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetHint * \sa SDL_SetHintWithPriority @@ -4158,7 +4266,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetHint(const char *name); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetHint * \sa SDL_SetHint @@ -4180,7 +4288,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetHintBoolean(const char *name, bool defau * hint value. SDL holds a lock on the hint subsystem when * calling this callback. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_AddHintCallback */ @@ -4201,7 +4309,7 @@ typedef void(SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RemoveHintCallback */ @@ -4217,7 +4325,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_AddHintCallback(const char *name, SDL_HintC * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AddHintCallback */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_init.h b/Source/ThirdParty/SDL/SDL3/SDL_init.h index 645dad51f..3d518e668 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_init.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_init.h @@ -67,7 +67,7 @@ extern "C" { * These are the flags which may be passed to SDL_Init(). You should specify * the subsystems which you will be using in your application. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_Init * \sa SDL_Quit @@ -104,7 +104,7 @@ typedef Uint32 SDL_InitFlags; * [Main callbacks in SDL3](https://wiki.libsdl.org/SDL3/README/main-functions#main-callbacks-in-sdl3) * for complete details. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_AppResult { @@ -164,7 +164,7 @@ typedef void (SDLCALL *SDL_AppQuit_func)(void *appstate, SDL_AppResult result); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAppMetadata * \sa SDL_SetAppMetadataProperty @@ -184,7 +184,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_Init(SDL_InitFlags flags); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Init * \sa SDL_Quit @@ -200,7 +200,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_InitSubSystem(SDL_InitFlags flags); * * \param flags any of the flags used by SDL_Init(); see SDL_Init for details. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_InitSubSystem * \sa SDL_Quit @@ -214,7 +214,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_QuitSubSystem(SDL_InitFlags flags); * \returns a mask of all initialized subsystems if `flags` is 0, otherwise it * returns the initialization status of the specified subsystems. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Init * \sa SDL_InitSubSystem @@ -232,7 +232,7 @@ extern SDL_DECLSPEC SDL_InitFlags SDLCALL SDL_WasInit(SDL_InitFlags flags); * application is shutdown, but it is not wise to do this from a library or * other dynamically loaded code. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Init * \sa SDL_QuitSubSystem @@ -271,7 +271,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_Quit(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAppMetadataProperty */ @@ -292,7 +292,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAppMetadata(const char *appname, const c * Multiple calls to this function are allowed, but various state might not * change once it has been set up with a previous call to this function. * - * Once set, this metadata can be read using SDL_GetMetadataProperty(). + * Once set, this metadata can be read using SDL_GetAppMetadataProperty(). * * These are the supported properties: * @@ -333,7 +333,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAppMetadata(const char *appname, const c * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAppMetadataProperty * \sa SDL_SetAppMetadata @@ -364,7 +364,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAppMetadataProperty(const char *name, co * freed if you call SDL_SetAppMetadataProperty() to set that * property from another thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetAppMetadata * \sa SDL_SetAppMetadataProperty diff --git a/Source/ThirdParty/SDL/SDL3/SDL_iostream.h b/Source/ThirdParty/SDL/SDL3/SDL_iostream.h index 3c4ffd5b3..c6ff1c281 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_iostream.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_iostream.h @@ -48,7 +48,7 @@ extern "C" { /** * SDL_IOStream status, set by a read or write operation. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_IOStatus { @@ -66,7 +66,7 @@ typedef enum SDL_IOStatus * These map to the same "whence" concept that `fseek` or `lseek` use in the * standard C runtime. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_IOWhence { @@ -85,7 +85,7 @@ typedef enum SDL_IOWhence * * This structure should be initialized using SDL_INIT_INTERFACE() * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_INIT_INTERFACE */ @@ -177,7 +177,7 @@ SDL_COMPILE_TIME_ASSERT(SDL_IOStreamInterface_SIZE, * SDL_OpenIO() to provide their own stream implementation behind this * struct's abstract interface. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_IOStream SDL_IOStream; @@ -260,7 +260,7 @@ typedef struct SDL_IOStream SDL_IOStream; * \returns a pointer to the SDL_IOStream structure that is created or NULL on * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CloseIO * \sa SDL_FlushIO @@ -303,7 +303,7 @@ extern SDL_DECLSPEC SDL_IOStream * SDLCALL SDL_IOFromFile(const char *file, cons * \returns a pointer to a new SDL_IOStream structure or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_IOFromConstMem * \sa SDL_CloseIO @@ -347,7 +347,7 @@ extern SDL_DECLSPEC SDL_IOStream * SDLCALL SDL_IOFromMem(void *mem, size_t size) * \returns a pointer to a new SDL_IOStream structure or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_IOFromMem * \sa SDL_CloseIO @@ -375,7 +375,7 @@ extern SDL_DECLSPEC SDL_IOStream * SDLCALL SDL_IOFromConstMem(const void *mem, s * \returns a pointer to a new SDL_IOStream structure or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CloseIO * \sa SDL_ReadIO @@ -408,7 +408,7 @@ extern SDL_DECLSPEC SDL_IOStream * SDLCALL SDL_IOFromDynamicMem(void); * \returns a pointer to the allocated memory on success or NULL on failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CloseIO * \sa SDL_INIT_INTERFACE @@ -442,7 +442,7 @@ extern SDL_DECLSPEC SDL_IOStream * SDLCALL SDL_OpenIO(const SDL_IOStreamInterfac * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenIO */ @@ -455,7 +455,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CloseIO(SDL_IOStream *context); * \returns a valid property ID on success or 0 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetIOProperties(SDL_IOStream *context); @@ -476,7 +476,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetIOProperties(SDL_IOStream *c * \threadsafety This function should not be called at the same time that * another thread is operating on the same SDL_IOStream. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_IOStatus SDLCALL SDL_GetIOStatus(SDL_IOStream *context); @@ -488,7 +488,7 @@ extern SDL_DECLSPEC SDL_IOStatus SDLCALL SDL_GetIOStatus(SDL_IOStream *context); * negative error code on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC Sint64 SDLCALL SDL_GetIOSize(SDL_IOStream *context); @@ -513,7 +513,7 @@ extern SDL_DECLSPEC Sint64 SDLCALL SDL_GetIOSize(SDL_IOStream *context); * \returns the final offset in the data stream after the seek or -1 on * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_TellIO */ @@ -531,7 +531,7 @@ extern SDL_DECLSPEC Sint64 SDLCALL SDL_SeekIO(SDL_IOStream *context, Sint64 offs * \returns the current offset in the stream, or -1 if the information can not * be determined. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SeekIO */ @@ -541,10 +541,12 @@ extern SDL_DECLSPEC Sint64 SDLCALL SDL_TellIO(SDL_IOStream *context); * Read from a data source. * * This function reads up `size` bytes from the data source to the area - * pointed at by `ptr`. This function may read less bytes than requested. It - * will return zero when the data stream is completely read, and - * SDL_GetIOStatus() will return SDL_IO_STATUS_EOF, or on error, and - * SDL_GetIOStatus() will return SDL_IO_STATUS_ERROR. + * pointed at by `ptr`. This function may read less bytes than requested. + * + * This function will return zero when the data stream is completely read, and + * SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If zero is returned and + * the stream is not at EOF, SDL_GetIOStatus() will return a different error + * value and SDL_GetError() will offer a human-readable message. * * \param context a pointer to an SDL_IOStream structure. * \param ptr a pointer to a buffer to read data into. @@ -552,7 +554,7 @@ extern SDL_DECLSPEC Sint64 SDLCALL SDL_TellIO(SDL_IOStream *context); * \returns the number of bytes read, or 0 on end of file or other failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_WriteIO * \sa SDL_GetIOStatus @@ -579,7 +581,7 @@ extern SDL_DECLSPEC size_t SDLCALL SDL_ReadIO(SDL_IOStream *context, void *ptr, * \returns the number of bytes written, which will be less than `size` on * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_IOprintf * \sa SDL_ReadIO @@ -601,7 +603,7 @@ extern SDL_DECLSPEC size_t SDLCALL SDL_WriteIO(SDL_IOStream *context, const void * \returns the number of bytes written or 0 on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_IOvprintf * \sa SDL_WriteIO @@ -619,7 +621,7 @@ extern SDL_DECLSPEC size_t SDLCALL SDL_IOprintf(SDL_IOStream *context, SDL_PRINT * \returns the number of bytes written or 0 on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_IOprintf * \sa SDL_WriteIO @@ -637,7 +639,7 @@ extern SDL_DECLSPEC size_t SDLCALL SDL_IOvprintf(SDL_IOStream *context, SDL_PRIN * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenIO * \sa SDL_WriteIO @@ -661,9 +663,10 @@ extern SDL_DECLSPEC bool SDLCALL SDL_FlushIO(SDL_IOStream *context); * \returns the data or NULL on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LoadFile + * \sa SDL_SaveFile_IO */ extern SDL_DECLSPEC void * SDLCALL SDL_LoadFile_IO(SDL_IOStream *src, size_t *datasize, bool closeio); @@ -681,12 +684,49 @@ extern SDL_DECLSPEC void * SDLCALL SDL_LoadFile_IO(SDL_IOStream *src, size_t *da * \returns the data or NULL on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LoadFile_IO + * \sa SDL_SaveFile */ extern SDL_DECLSPEC void * SDLCALL SDL_LoadFile(const char *file, size_t *datasize); +/** + * Save all the data into an SDL data stream. + * + * \param src the SDL_IOStream to write all data to. + * \param data the data to be written. If datasize is 0, may be NULL or a + * invalid pointer. + * \param datasize the number of bytes to be written. + * \param closeio if true, calls SDL_CloseIO() on `src` before returning, even + * in the case of an error. + * \returns true on success or false on failure; call SDL_GetError() for more + * information. + * + * \since This function is available since SDL 3.2.0. + * + * \sa SDL_SaveFile + * \sa SDL_LoadFile_IO + */ +extern SDL_DECLSPEC bool SDLCALL SDL_SaveFile_IO(SDL_IOStream *src, const void *data, size_t datasize, bool closeio); + +/** + * Save all the data into a file path. + * + * \param file the path to read all available data from. + * \param data the data to be written. If datasize is 0, may be NULL or a + * invalid pointer. + * \param datasize the number of bytes to be written. + * \returns true on success or false on failure; call SDL_GetError() for more + * information. + * + * \since This function is available since SDL 3.2.0. + * + * \sa SDL_SaveFile_IO + * \sa SDL_LoadFile + */ +extern SDL_DECLSPEC bool SDLCALL SDL_SaveFile(const char *file, const void *data, size_t datasize); + /** * \name Read endian functions * @@ -697,24 +737,34 @@ extern SDL_DECLSPEC void * SDLCALL SDL_LoadFile(const char *file, size_t *datasi /** * Use this function to read a byte from an SDL_IOStream. * + * This function will return false when the data stream is completely read, + * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned + * and the stream is not at EOF, SDL_GetIOStatus() will return a different + * error value and SDL_GetError() will offer a human-readable message. + * * \param src the SDL_IOStream to read from. * \param value a pointer filled in with the data read. - * \returns true on success or false on failure; call SDL_GetError() for more - * information. + * \returns true on success or false on failure or EOF; call SDL_GetError() + * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadU8(SDL_IOStream *src, Uint8 *value); /** * Use this function to read a signed byte from an SDL_IOStream. * + * This function will return false when the data stream is completely read, + * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned + * and the stream is not at EOF, SDL_GetIOStatus() will return a different + * error value and SDL_GetError() will offer a human-readable message. + * * \param src the SDL_IOStream to read from. * \param value a pointer filled in with the data read. * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadS8(SDL_IOStream *src, Sint8 *value); @@ -725,12 +775,17 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadS8(SDL_IOStream *src, Sint8 *value); * SDL byteswaps the data only if necessary, so the data returned will be in * the native byte order. * + * This function will return false when the data stream is completely read, + * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned + * and the stream is not at EOF, SDL_GetIOStatus() will return a different + * error value and SDL_GetError() will offer a human-readable message. + * * \param src the stream from which to read data. * \param value a pointer filled in with the data read. * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadU16LE(SDL_IOStream *src, Uint16 *value); @@ -741,12 +796,17 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadU16LE(SDL_IOStream *src, Uint16 *value) * SDL byteswaps the data only if necessary, so the data returned will be in * the native byte order. * + * This function will return false when the data stream is completely read, + * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned + * and the stream is not at EOF, SDL_GetIOStatus() will return a different + * error value and SDL_GetError() will offer a human-readable message. + * * \param src the stream from which to read data. * \param value a pointer filled in with the data read. * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadS16LE(SDL_IOStream *src, Sint16 *value); @@ -757,12 +817,17 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadS16LE(SDL_IOStream *src, Sint16 *value) * SDL byteswaps the data only if necessary, so the data returned will be in * the native byte order. * + * This function will return false when the data stream is completely read, + * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned + * and the stream is not at EOF, SDL_GetIOStatus() will return a different + * error value and SDL_GetError() will offer a human-readable message. + * * \param src the stream from which to read data. * \param value a pointer filled in with the data read. * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadU16BE(SDL_IOStream *src, Uint16 *value); @@ -773,12 +838,17 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadU16BE(SDL_IOStream *src, Uint16 *value) * SDL byteswaps the data only if necessary, so the data returned will be in * the native byte order. * + * This function will return false when the data stream is completely read, + * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned + * and the stream is not at EOF, SDL_GetIOStatus() will return a different + * error value and SDL_GetError() will offer a human-readable message. + * * \param src the stream from which to read data. * \param value a pointer filled in with the data read. * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadS16BE(SDL_IOStream *src, Sint16 *value); @@ -789,12 +859,17 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadS16BE(SDL_IOStream *src, Sint16 *value) * SDL byteswaps the data only if necessary, so the data returned will be in * the native byte order. * + * This function will return false when the data stream is completely read, + * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned + * and the stream is not at EOF, SDL_GetIOStatus() will return a different + * error value and SDL_GetError() will offer a human-readable message. + * * \param src the stream from which to read data. * \param value a pointer filled in with the data read. * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadU32LE(SDL_IOStream *src, Uint32 *value); @@ -805,12 +880,17 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadU32LE(SDL_IOStream *src, Uint32 *value) * SDL byteswaps the data only if necessary, so the data returned will be in * the native byte order. * + * This function will return false when the data stream is completely read, + * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned + * and the stream is not at EOF, SDL_GetIOStatus() will return a different + * error value and SDL_GetError() will offer a human-readable message. + * * \param src the stream from which to read data. * \param value a pointer filled in with the data read. * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadS32LE(SDL_IOStream *src, Sint32 *value); @@ -821,12 +901,17 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadS32LE(SDL_IOStream *src, Sint32 *value) * SDL byteswaps the data only if necessary, so the data returned will be in * the native byte order. * + * This function will return false when the data stream is completely read, + * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned + * and the stream is not at EOF, SDL_GetIOStatus() will return a different + * error value and SDL_GetError() will offer a human-readable message. + * * \param src the stream from which to read data. * \param value a pointer filled in with the data read. * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadU32BE(SDL_IOStream *src, Uint32 *value); @@ -837,12 +922,17 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadU32BE(SDL_IOStream *src, Uint32 *value) * SDL byteswaps the data only if necessary, so the data returned will be in * the native byte order. * + * This function will return false when the data stream is completely read, + * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned + * and the stream is not at EOF, SDL_GetIOStatus() will return a different + * error value and SDL_GetError() will offer a human-readable message. + * * \param src the stream from which to read data. * \param value a pointer filled in with the data read. * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadS32BE(SDL_IOStream *src, Sint32 *value); @@ -853,12 +943,17 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadS32BE(SDL_IOStream *src, Sint32 *value) * SDL byteswaps the data only if necessary, so the data returned will be in * the native byte order. * + * This function will return false when the data stream is completely read, + * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned + * and the stream is not at EOF, SDL_GetIOStatus() will return a different + * error value and SDL_GetError() will offer a human-readable message. + * * \param src the stream from which to read data. * \param value a pointer filled in with the data read. * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadU64LE(SDL_IOStream *src, Uint64 *value); @@ -869,12 +964,17 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadU64LE(SDL_IOStream *src, Uint64 *value) * SDL byteswaps the data only if necessary, so the data returned will be in * the native byte order. * + * This function will return false when the data stream is completely read, + * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned + * and the stream is not at EOF, SDL_GetIOStatus() will return a different + * error value and SDL_GetError() will offer a human-readable message. + * * \param src the stream from which to read data. * \param value a pointer filled in with the data read. * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadS64LE(SDL_IOStream *src, Sint64 *value); @@ -885,12 +985,17 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadS64LE(SDL_IOStream *src, Sint64 *value) * SDL byteswaps the data only if necessary, so the data returned will be in * the native byte order. * + * This function will return false when the data stream is completely read, + * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned + * and the stream is not at EOF, SDL_GetIOStatus() will return a different + * error value and SDL_GetError() will offer a human-readable message. + * * \param src the stream from which to read data. * \param value a pointer filled in with the data read. * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadU64BE(SDL_IOStream *src, Uint64 *value); @@ -901,12 +1006,17 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadU64BE(SDL_IOStream *src, Uint64 *value) * SDL byteswaps the data only if necessary, so the data returned will be in * the native byte order. * + * This function will return false when the data stream is completely read, + * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned + * and the stream is not at EOF, SDL_GetIOStatus() will return a different + * error value and SDL_GetError() will offer a human-readable message. + * * \param src the stream from which to read data. * \param value a pointer filled in with the data read. * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadS64BE(SDL_IOStream *src, Sint64 *value); /* @} *//* Read endian functions */ @@ -926,7 +1036,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadS64BE(SDL_IOStream *src, Sint64 *value) * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteU8(SDL_IOStream *dst, Uint8 value); @@ -938,7 +1048,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteU8(SDL_IOStream *dst, Uint8 value); * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteS8(SDL_IOStream *dst, Sint8 value); @@ -955,7 +1065,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteS8(SDL_IOStream *dst, Sint8 value); * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteU16LE(SDL_IOStream *dst, Uint16 value); @@ -972,7 +1082,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteU16LE(SDL_IOStream *dst, Uint16 value) * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteS16LE(SDL_IOStream *dst, Sint16 value); @@ -988,7 +1098,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteS16LE(SDL_IOStream *dst, Sint16 value) * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteU16BE(SDL_IOStream *dst, Uint16 value); @@ -1004,7 +1114,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteU16BE(SDL_IOStream *dst, Uint16 value) * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteS16BE(SDL_IOStream *dst, Sint16 value); @@ -1021,7 +1131,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteS16BE(SDL_IOStream *dst, Sint16 value) * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteU32LE(SDL_IOStream *dst, Uint32 value); @@ -1038,7 +1148,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteU32LE(SDL_IOStream *dst, Uint32 value) * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteS32LE(SDL_IOStream *dst, Sint32 value); @@ -1054,7 +1164,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteS32LE(SDL_IOStream *dst, Sint32 value) * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteU32BE(SDL_IOStream *dst, Uint32 value); @@ -1070,7 +1180,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteU32BE(SDL_IOStream *dst, Uint32 value) * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteS32BE(SDL_IOStream *dst, Sint32 value); @@ -1087,7 +1197,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteS32BE(SDL_IOStream *dst, Sint32 value) * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteU64LE(SDL_IOStream *dst, Uint64 value); @@ -1104,7 +1214,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteU64LE(SDL_IOStream *dst, Uint64 value) * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteS64LE(SDL_IOStream *dst, Sint64 value); @@ -1120,7 +1230,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteS64LE(SDL_IOStream *dst, Sint64 value) * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteU64BE(SDL_IOStream *dst, Uint64 value); @@ -1136,7 +1246,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteU64BE(SDL_IOStream *dst, Uint64 value) * \returns true on successful write or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteS64BE(SDL_IOStream *dst, Sint64 value); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_joystick.h b/Source/ThirdParty/SDL/SDL3/SDL_joystick.h index 520e6eb07..44770972c 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_joystick.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_joystick.h @@ -81,7 +81,7 @@ extern SDL_Mutex *SDL_joystick_lock; * * This is opaque data. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_Joystick SDL_Joystick; @@ -93,7 +93,7 @@ typedef struct SDL_Joystick SDL_Joystick; * * The value 0 is an invalid ID. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_JoystickID; @@ -107,7 +107,7 @@ typedef Uint32 SDL_JoystickID; * This is by no means a complete list of everything that can be plugged into * a computer. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_JoystickType { @@ -130,7 +130,7 @@ typedef enum SDL_JoystickType * This is used by SDL_GetJoystickConnectionState to report how a device is * connected to the system. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_JoystickConnectionState { @@ -143,7 +143,7 @@ typedef enum SDL_JoystickConnectionState /** * The largest value an SDL_Joystick's axis can report. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_JOYSTICK_AXIS_MIN */ @@ -154,7 +154,7 @@ typedef enum SDL_JoystickConnectionState * * This is a negative number! * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_JOYSTICK_AXIS_MAX */ @@ -170,14 +170,14 @@ typedef enum SDL_JoystickConnectionState * joysticks while processing to guarantee that the joystick list won't change * and joystick and gamepad events will not be delivered. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_LockJoysticks(void) SDL_ACQUIRE(SDL_joystick_lock); /** * Unlocking for atomic access to the joystick API. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_UnlockJoysticks(void) SDL_RELEASE(SDL_joystick_lock); @@ -186,7 +186,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockJoysticks(void) SDL_RELEASE(SDL_joyst * * \returns true if a joystick is connected, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoysticks */ @@ -201,7 +201,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasJoystick(void); * call SDL_GetError() for more information. This should be freed * with SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasJoystick * \sa SDL_OpenJoystick @@ -217,7 +217,7 @@ extern SDL_DECLSPEC SDL_JoystickID * SDLCALL SDL_GetJoysticks(int *count); * \returns the name of the selected joystick. If no name can be found, this * function returns NULL; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickName * \sa SDL_GetJoysticks @@ -233,7 +233,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetJoystickNameForID(SDL_JoystickID * \returns the path of the selected joystick. If no path can be found, this * function returns NULL; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickPath * \sa SDL_GetJoysticks @@ -248,7 +248,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetJoystickPathForID(SDL_JoystickID * \param instance_id the joystick instance ID. * \returns the player index of a joystick, or -1 if it's not available. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickPlayerIndex * \sa SDL_GetJoysticks @@ -264,7 +264,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetJoystickPlayerIndexForID(SDL_JoystickID i * \returns the GUID of the selected joystick. If called with an invalid * instance_id, this function returns a zero GUID. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickGUID * \sa SDL_GUIDToString @@ -281,7 +281,7 @@ extern SDL_DECLSPEC SDL_GUID SDLCALL SDL_GetJoystickGUIDForID(SDL_JoystickID ins * \returns the USB vendor ID of the selected joystick. If called with an * invalid instance_id, this function returns 0. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickVendor * \sa SDL_GetJoysticks @@ -298,7 +298,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendorForID(SDL_JoystickID ins * \returns the USB product ID of the selected joystick. If called with an * invalid instance_id, this function returns 0. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickProduct * \sa SDL_GetJoysticks @@ -315,7 +315,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductForID(SDL_JoystickID in * \returns the product version of the selected joystick. If called with an * invalid instance_id, this function returns 0. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickProductVersion * \sa SDL_GetJoysticks @@ -332,7 +332,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductVersionForID(SDL_Joysti * invalid instance_id, this function returns * `SDL_JOYSTICK_TYPE_UNKNOWN`. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickType * \sa SDL_GetJoysticks @@ -349,7 +349,7 @@ extern SDL_DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickTypeForID(SDL_Joysti * \returns a joystick identifier or NULL on failure; call SDL_GetError() for * more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CloseJoystick */ @@ -362,7 +362,7 @@ extern SDL_DECLSPEC SDL_Joystick * SDLCALL SDL_OpenJoystick(SDL_JoystickID insta * \returns an SDL_Joystick on success or NULL on failure or if it hasn't been * opened yet; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Joystick * SDLCALL SDL_GetJoystickFromID(SDL_JoystickID instance_id); @@ -373,7 +373,7 @@ extern SDL_DECLSPEC SDL_Joystick * SDLCALL SDL_GetJoystickFromID(SDL_JoystickID * \returns an SDL_Joystick on success or NULL on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickPlayerIndex * \sa SDL_SetJoystickPlayerIndex @@ -383,7 +383,7 @@ extern SDL_DECLSPEC SDL_Joystick * SDLCALL SDL_GetJoystickFromPlayerIndex(int pl /** * The structure that describes a virtual joystick touchpad. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_VirtualJoystickDesc */ @@ -396,7 +396,7 @@ typedef struct SDL_VirtualJoystickTouchpadDesc /** * The structure that describes a virtual joystick sensor. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_VirtualJoystickDesc */ @@ -412,7 +412,7 @@ typedef struct SDL_VirtualJoystickSensorDesc * This structure should be initialized using SDL_INIT_INTERFACE(). All * elements of this structure are optional. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_AttachVirtualJoystick * \sa SDL_INIT_INTERFACE @@ -469,7 +469,7 @@ SDL_COMPILE_TIME_ASSERT(SDL_VirtualJoystickDesc_SIZE, * \returns the joystick instance ID, or 0 on failure; call SDL_GetError() for * more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DetachVirtualJoystick */ @@ -483,7 +483,7 @@ extern SDL_DECLSPEC SDL_JoystickID SDLCALL SDL_AttachVirtualJoystick(const SDL_V * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AttachVirtualJoystick */ @@ -495,7 +495,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_DetachVirtualJoystick(SDL_JoystickID instan * \param instance_id the joystick instance ID. * \returns true if the joystick is virtual, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_IsJoystickVirtual(SDL_JoystickID instance_id); @@ -518,7 +518,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsJoystickVirtual(SDL_JoystickID instance_i * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value); @@ -538,7 +538,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickVirtualAxis(SDL_Joystick *joysti * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickVirtualBall(SDL_Joystick *joystick, int ball, Sint16 xrel, Sint16 yrel); @@ -557,7 +557,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickVirtualBall(SDL_Joystick *joysti * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickVirtualButton(SDL_Joystick *joystick, int button, bool down); @@ -576,7 +576,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickVirtualButton(SDL_Joystick *joys * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value); @@ -602,7 +602,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickVirtualHat(SDL_Joystick *joystic * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickVirtualTouchpad(SDL_Joystick *joystick, int touchpad, int finger, bool down, float x, float y, float pressure); @@ -624,7 +624,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickVirtualTouchpad(SDL_Joystick *jo * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SendJoystickVirtualSensorData(SDL_Joystick *joystick, SDL_SensorType type, Uint64 sensor_timestamp, const float *data, int num_values); @@ -648,7 +648,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SendJoystickVirtualSensorData(SDL_Joystick * \returns a valid property ID on success or 0 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetJoystickProperties(SDL_Joystick *joystick); @@ -665,7 +665,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetJoystickProperties(SDL_Joyst * \returns the name of the selected joystick. If no name can be found, this * function returns NULL; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickNameForID */ @@ -678,7 +678,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetJoystickName(SDL_Joystick *joyst * \returns the path of the selected joystick. If no path can be found, this * function returns NULL; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickPathForID */ @@ -693,7 +693,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetJoystickPath(SDL_Joystick *joyst * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick(). * \returns the player index, or -1 if it's not available. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetJoystickPlayerIndex */ @@ -708,7 +708,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetJoystickPlayerIndex(SDL_Joystick *joystic * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickPlayerIndex */ @@ -724,7 +724,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickPlayerIndex(SDL_Joystick *joysti * this function returns a zero GUID; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickGUIDForID * \sa SDL_GUIDToString @@ -739,7 +739,7 @@ extern SDL_DECLSPEC SDL_GUID SDLCALL SDL_GetJoystickGUID(SDL_Joystick *joystick) * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick(). * \returns the USB vendor ID of the selected joystick, or 0 if unavailable. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickVendorForID */ @@ -753,7 +753,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendor(SDL_Joystick *joystick) * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick(). * \returns the USB product ID of the selected joystick, or 0 if unavailable. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickProductForID */ @@ -767,7 +767,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProduct(SDL_Joystick *joystick * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick(). * \returns the product version of the selected joystick, or 0 if unavailable. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickProductVersionForID */ @@ -782,7 +782,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductVersion(SDL_Joystick *j * \returns the firmware version of the selected joystick, or 0 if * unavailable. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickFirmwareVersion(SDL_Joystick *joystick); @@ -795,7 +795,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickFirmwareVersion(SDL_Joystick * * \returns the serial number of the selected joystick, or NULL if * unavailable. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetJoystickSerial(SDL_Joystick *joystick); @@ -805,7 +805,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetJoystickSerial(SDL_Joystick *joy * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick(). * \returns the SDL_JoystickType of the selected joystick. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickTypeForID */ @@ -824,7 +824,7 @@ extern SDL_DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickType(SDL_Joystick *j * \param crc16 a pointer filled in with a CRC used to distinguish different * products with the same VID/PID, or 0 if not available. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickGUIDForID */ @@ -837,7 +837,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_GetJoystickGUIDInfo(SDL_GUID guid, Uint16 * * \returns true if the joystick has been opened, false if it has not; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_JoystickConnected(SDL_Joystick *joystick); @@ -848,7 +848,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_JoystickConnected(SDL_Joystick *joystick); * \returns the instance ID of the specified joystick on success or 0 on * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_JoystickID SDLCALL SDL_GetJoystickID(SDL_Joystick *joystick); @@ -863,7 +863,7 @@ extern SDL_DECLSPEC SDL_JoystickID SDLCALL SDL_GetJoystickID(SDL_Joystick *joyst * \returns the number of axis controls/number of axes on success or -1 on * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickAxis * \sa SDL_GetNumJoystickBalls @@ -884,7 +884,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumJoystickAxes(SDL_Joystick *joystick); * \returns the number of trackballs on success or -1 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickBall * \sa SDL_GetNumJoystickAxes @@ -900,7 +900,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumJoystickBalls(SDL_Joystick *joystick); * \returns the number of POV hats on success or -1 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickHat * \sa SDL_GetNumJoystickAxes @@ -916,7 +916,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumJoystickHats(SDL_Joystick *joystick); * \returns the number of buttons on success or -1 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetJoystickButton * \sa SDL_GetNumJoystickAxes @@ -934,7 +934,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumJoystickButtons(SDL_Joystick *joystick * * \param enabled whether to process joystick events or not. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_JoystickEventsEnabled * \sa SDL_UpdateJoysticks @@ -950,7 +950,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetJoystickEventsEnabled(bool enabled); * * \returns true if joystick events are being processed, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetJoystickEventsEnabled */ @@ -962,7 +962,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_JoystickEventsEnabled(void); * This is called automatically by the event loop if any joystick events are * enabled. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_UpdateJoysticks(void); @@ -984,7 +984,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UpdateJoysticks(void); * \returns a 16-bit signed integer representing the current position of the * axis or 0 on failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetNumJoystickAxes */ @@ -1002,7 +1002,7 @@ extern SDL_DECLSPEC Sint16 SDLCALL SDL_GetJoystickAxis(SDL_Joystick *joystick, i * \param state upon return, the initial value is supplied here. * \returns true if this axis has any initial value, or false if not. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetJoystickAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state); @@ -1021,7 +1021,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetJoystickAxisInitialState(SDL_Joystick *j * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetNumJoystickBalls */ @@ -1036,7 +1036,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetJoystickBall(SDL_Joystick *joystick, int * \param hat the hat index to get the state from; indices start at index 0. * \returns the current hat position. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetNumJoystickHats */ @@ -1060,7 +1060,7 @@ extern SDL_DECLSPEC Uint8 SDLCALL SDL_GetJoystickHat(SDL_Joystick *joystick, int * index 0. * \returns true if the button is pressed, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetNumJoystickButtons */ @@ -1083,7 +1083,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetJoystickButton(SDL_Joystick *joystick, i * \param duration_ms the duration of the rumble effect, in milliseconds. * \returns true, or false if rumble isn't supported on this joystick. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_RumbleJoystick(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); @@ -1110,7 +1110,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RumbleJoystick(SDL_Joystick *joystick, Uint * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RumbleJoystick */ @@ -1132,7 +1132,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RumbleJoystickTriggers(SDL_Joystick *joysti * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue); @@ -1145,7 +1145,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickLED(SDL_Joystick *joystick, Uint * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SendJoystickEffect(SDL_Joystick *joystick, const void *data, int size); @@ -1154,7 +1154,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SendJoystickEffect(SDL_Joystick *joystick, * * \param joystick the joystick device to close. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenJoystick */ @@ -1168,7 +1168,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_CloseJoystick(SDL_Joystick *joystick); * `SDL_JOYSTICK_CONNECTION_INVALID` on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_JoystickConnectionState SDLCALL SDL_GetJoystickConnectionState(SDL_Joystick *joystick); @@ -1189,7 +1189,7 @@ extern SDL_DECLSPEC SDL_JoystickConnectionState SDLCALL SDL_GetJoystickConnectio * \returns the current battery state or `SDL_POWERSTATE_ERROR` on failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PowerState SDLCALL SDL_GetJoystickPowerInfo(SDL_Joystick *joystick, int *percent); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_keyboard.h b/Source/ThirdParty/SDL/SDL3/SDL_keyboard.h index f6ab13bb5..5bae001e0 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_keyboard.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_keyboard.h @@ -50,7 +50,7 @@ extern "C" { * * The value 0 is an invalid ID. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_KeyboardID; @@ -61,7 +61,7 @@ typedef Uint32 SDL_KeyboardID; * * \returns true if a keyboard is connected, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetKeyboards */ @@ -81,7 +81,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasKeyboard(void); * call SDL_GetError() for more information. This should be freed * with SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetKeyboardNameForID * \sa SDL_HasKeyboard @@ -97,7 +97,7 @@ extern SDL_DECLSPEC SDL_KeyboardID * SDLCALL SDL_GetKeyboards(int *count); * \returns the name of the selected keyboard or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetKeyboards */ @@ -108,7 +108,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetKeyboardNameForID(SDL_KeyboardID * * \returns the window with keyboard focus. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void); @@ -136,7 +136,7 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void); * \param numkeys if non-NULL, receives the length of the returned array. * \returns a pointer to an array of key states. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_PumpEvents * \sa SDL_ResetKeyboard @@ -148,7 +148,7 @@ extern SDL_DECLSPEC const bool * SDLCALL SDL_GetKeyboardState(int *numkeys); * * This function will generate key up events for all pressed keys. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetKeyboardState */ @@ -160,7 +160,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ResetKeyboard(void); * \returns an OR'd combination of the modifier keys for the keyboard. See * SDL_Keymod for details. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetKeyboardState * \sa SDL_SetModState @@ -180,7 +180,7 @@ extern SDL_DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void); * * \param modstate the desired SDL_Keymod for the keyboard. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetModState */ @@ -201,7 +201,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate); * \param key_event true if the keycode will be used in key events. * \returns the SDL_Keycode that corresponds to the given SDL_Scancode. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetKeyName * \sa SDL_GetScancodeFromKey @@ -220,7 +220,7 @@ extern SDL_DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scan * scancode generates this key, may be NULL. * \returns the SDL_Scancode that corresponds to the given SDL_Keycode. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetKeyFromScancode * \sa SDL_GetScancodeName @@ -237,7 +237,7 @@ extern SDL_DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key, * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetScancodeName */ @@ -259,7 +259,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetScancodeName(SDL_Scancode scancode, cons * \returns a pointer to the name for the scancode. If the scancode doesn't * have a name this function returns an empty string (""). * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetScancodeFromKey * \sa SDL_GetScancodeFromName @@ -274,7 +274,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetScancodeName(SDL_Scancode scanco * \returns the SDL_Scancode, or `SDL_SCANCODE_UNKNOWN` if the name wasn't * recognized; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetKeyFromName * \sa SDL_GetScancodeFromKey @@ -290,7 +290,7 @@ extern SDL_DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *nam * \param key the desired SDL_Keycode to query. * \returns a UTF-8 encoded string of the key name. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetKeyFromName * \sa SDL_GetKeyFromScancode @@ -305,7 +305,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetKeyName(SDL_Keycode key); * \returns key code, or `SDLK_UNKNOWN` if the name wasn't recognized; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetKeyFromScancode * \sa SDL_GetKeyName @@ -322,13 +322,15 @@ extern SDL_DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name); * * Text input events are not received by default. * - * On some platforms using this function shows the screen keyboard. + * On some platforms using this function shows the screen keyboard and/or + * activates an IME, which can prevent some key press events from being passed + * through. * * \param window the window to enable text input. * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetTextInputArea * \sa SDL_StartTextInputWithProperties @@ -344,7 +346,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_StartTextInput(SDL_Window *window); * value is valid on every platform, but where a value isn't supported, a * reasonable fallback will be used. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. * * \sa SDL_StartTextInputWithProperties */ @@ -364,12 +366,11 @@ typedef enum SDL_TextInputType /** * Auto capitalization type. * - * These are the valid values for - * SDL_PROP_TEXTINPUT_AUTOCAPITALIZATION_NUMBER. Not every value is valid on - * every platform, but where a value isn't supported, a reasonable fallback - * will be used. + * These are the valid values for SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER. + * Not every value is valid on every platform, but where a value isn't + * supported, a reasonable fallback will be used. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. * * \sa SDL_StartTextInputWithProperties */ @@ -391,7 +392,9 @@ typedef enum SDL_Capitalization * * Text input events are not received by default. * - * On some platforms using this function shows the screen keyboard. + * On some platforms using this function shows the screen keyboard and/or + * activates an IME, which can prevent some key press events from being passed + * through. * * These are the supported properties: * @@ -420,7 +423,7 @@ typedef enum SDL_Capitalization * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetTextInputArea * \sa SDL_StartTextInput @@ -441,7 +444,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_StartTextInputWithProperties(SDL_Window *wi * \param window the window to check. * \returns true if text input events are enabled else false. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_StartTextInput */ @@ -457,7 +460,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TextInputActive(SDL_Window *window); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_StartTextInput */ @@ -470,7 +473,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_StopTextInput(SDL_Window *window); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_StartTextInput * \sa SDL_StopTextInput @@ -491,7 +494,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ClearComposition(SDL_Window *window); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetTextInputArea * \sa SDL_StartTextInput @@ -511,7 +514,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetTextInputArea(SDL_Window *window, const * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetTextInputArea */ @@ -523,7 +526,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetTextInputArea(SDL_Window *window, SDL_Re * \returns true if the platform has some screen keyboard support or false if * not. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_StartTextInput * \sa SDL_ScreenKeyboardShown @@ -536,7 +539,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasScreenKeyboardSupport(void); * \param window the window for which screen keyboard should be queried. * \returns true if screen keyboard is shown or false if not. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasScreenKeyboardSupport */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_keycode.h b/Source/ThirdParty/SDL/SDL3/SDL_keycode.h index 28e40a352..77968bd09 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_keycode.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_keycode.h @@ -42,266 +42,266 @@ * A special exception is the number keys at the top of the keyboard which map * to SDLK_0...SDLK_9 on AZERTY layouts. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_Keycode; #define SDLK_SCANCODE_MASK (1u<<30) #define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK) -#define SDLK_UNKNOWN 0x00000000u /* 0 */ -#define SDLK_RETURN 0x0000000du /* '\r' */ -#define SDLK_ESCAPE 0x0000001bu /* '\x1B' */ -#define SDLK_BACKSPACE 0x00000008u /* '\b' */ -#define SDLK_TAB 0x00000009u /* '\t' */ -#define SDLK_SPACE 0x00000020u /* ' ' */ -#define SDLK_EXCLAIM 0x00000021u /* '!' */ -#define SDLK_DBLAPOSTROPHE 0x00000022u /* '"' */ -#define SDLK_HASH 0x00000023u /* '#' */ -#define SDLK_DOLLAR 0x00000024u /* '$' */ -#define SDLK_PERCENT 0x00000025u /* '%' */ -#define SDLK_AMPERSAND 0x00000026u /* '&' */ -#define SDLK_APOSTROPHE 0x00000027u /* '\'' */ -#define SDLK_LEFTPAREN 0x00000028u /* '(' */ -#define SDLK_RIGHTPAREN 0x00000029u /* ')' */ -#define SDLK_ASTERISK 0x0000002au /* '*' */ -#define SDLK_PLUS 0x0000002bu /* '+' */ -#define SDLK_COMMA 0x0000002cu /* ',' */ -#define SDLK_MINUS 0x0000002du /* '-' */ -#define SDLK_PERIOD 0x0000002eu /* '.' */ -#define SDLK_SLASH 0x0000002fu /* '/' */ -#define SDLK_0 0x00000030u /* '0' */ -#define SDLK_1 0x00000031u /* '1' */ -#define SDLK_2 0x00000032u /* '2' */ -#define SDLK_3 0x00000033u /* '3' */ -#define SDLK_4 0x00000034u /* '4' */ -#define SDLK_5 0x00000035u /* '5' */ -#define SDLK_6 0x00000036u /* '6' */ -#define SDLK_7 0x00000037u /* '7' */ -#define SDLK_8 0x00000038u /* '8' */ -#define SDLK_9 0x00000039u /* '9' */ -#define SDLK_COLON 0x0000003au /* ':' */ -#define SDLK_SEMICOLON 0x0000003bu /* ';' */ -#define SDLK_LESS 0x0000003cu /* '<' */ -#define SDLK_EQUALS 0x0000003du /* '=' */ -#define SDLK_GREATER 0x0000003eu /* '>' */ -#define SDLK_QUESTION 0x0000003fu /* '?' */ -#define SDLK_AT 0x00000040u /* '@' */ -#define SDLK_LEFTBRACKET 0x0000005bu /* '[' */ -#define SDLK_BACKSLASH 0x0000005cu /* '\\' */ -#define SDLK_RIGHTBRACKET 0x0000005du /* ']' */ -#define SDLK_CARET 0x0000005eu /* '^' */ -#define SDLK_UNDERSCORE 0x0000005fu /* '_' */ -#define SDLK_GRAVE 0x00000060u /* '`' */ -#define SDLK_A 0x00000061u /* 'a' */ -#define SDLK_B 0x00000062u /* 'b' */ -#define SDLK_C 0x00000063u /* 'c' */ -#define SDLK_D 0x00000064u /* 'd' */ -#define SDLK_E 0x00000065u /* 'e' */ -#define SDLK_F 0x00000066u /* 'f' */ -#define SDLK_G 0x00000067u /* 'g' */ -#define SDLK_H 0x00000068u /* 'h' */ -#define SDLK_I 0x00000069u /* 'i' */ -#define SDLK_J 0x0000006au /* 'j' */ -#define SDLK_K 0x0000006bu /* 'k' */ -#define SDLK_L 0x0000006cu /* 'l' */ -#define SDLK_M 0x0000006du /* 'm' */ -#define SDLK_N 0x0000006eu /* 'n' */ -#define SDLK_O 0x0000006fu /* 'o' */ -#define SDLK_P 0x00000070u /* 'p' */ -#define SDLK_Q 0x00000071u /* 'q' */ -#define SDLK_R 0x00000072u /* 'r' */ -#define SDLK_S 0x00000073u /* 's' */ -#define SDLK_T 0x00000074u /* 't' */ -#define SDLK_U 0x00000075u /* 'u' */ -#define SDLK_V 0x00000076u /* 'v' */ -#define SDLK_W 0x00000077u /* 'w' */ -#define SDLK_X 0x00000078u /* 'x' */ -#define SDLK_Y 0x00000079u /* 'y' */ -#define SDLK_Z 0x0000007au /* 'z' */ -#define SDLK_LEFTBRACE 0x0000007bu /* '{' */ -#define SDLK_PIPE 0x0000007cu /* '|' */ -#define SDLK_RIGHTBRACE 0x0000007du /* '}' */ -#define SDLK_TILDE 0x0000007eu /* '~' */ -#define SDLK_DELETE 0x0000007fu /* '\x7F' */ -#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) */ -#define SDLK_F3 0x4000003cu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3) */ -#define SDLK_F4 0x4000003du /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4) */ -#define SDLK_F5 0x4000003eu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5) */ -#define SDLK_F6 0x4000003fu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6) */ -#define SDLK_F7 0x40000040u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7) */ -#define SDLK_F8 0x40000041u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8) */ -#define SDLK_F9 0x40000042u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9) */ -#define SDLK_F10 0x40000043u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10) */ -#define SDLK_F11 0x40000044u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11) */ -#define SDLK_F12 0x40000045u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12) */ -#define SDLK_PRINTSCREEN 0x40000046u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN) */ -#define SDLK_SCROLLLOCK 0x40000047u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK) */ -#define SDLK_PAUSE 0x40000048u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE) */ -#define SDLK_INSERT 0x40000049u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT) */ -#define SDLK_HOME 0x4000004au /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME) */ -#define SDLK_PAGEUP 0x4000004bu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP) */ -#define SDLK_END 0x4000004du /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END) */ -#define SDLK_PAGEDOWN 0x4000004eu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN) */ -#define SDLK_RIGHT 0x4000004fu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT) */ -#define SDLK_LEFT 0x40000050u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT) */ -#define SDLK_DOWN 0x40000051u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN) */ -#define SDLK_UP 0x40000052u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP) */ -#define SDLK_NUMLOCKCLEAR 0x40000053u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR) */ -#define SDLK_KP_DIVIDE 0x40000054u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE) */ -#define SDLK_KP_MULTIPLY 0x40000055u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY) */ -#define SDLK_KP_MINUS 0x40000056u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS) */ -#define SDLK_KP_PLUS 0x40000057u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS) */ -#define SDLK_KP_ENTER 0x40000058u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER) */ -#define SDLK_KP_1 0x40000059u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1) */ -#define SDLK_KP_2 0x4000005au /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2) */ -#define SDLK_KP_3 0x4000005bu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3) */ -#define SDLK_KP_4 0x4000005cu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4) */ -#define SDLK_KP_5 0x4000005du /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5) */ -#define SDLK_KP_6 0x4000005eu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6) */ -#define SDLK_KP_7 0x4000005fu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7) */ -#define SDLK_KP_8 0x40000060u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8) */ -#define SDLK_KP_9 0x40000061u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9) */ -#define SDLK_KP_0 0x40000062u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0) */ -#define SDLK_KP_PERIOD 0x40000063u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD) */ -#define SDLK_APPLICATION 0x40000065u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION) */ -#define SDLK_POWER 0x40000066u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER) */ -#define SDLK_KP_EQUALS 0x40000067u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS) */ -#define SDLK_F13 0x40000068u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13) */ -#define SDLK_F14 0x40000069u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14) */ -#define SDLK_F15 0x4000006au /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15) */ -#define SDLK_F16 0x4000006bu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16) */ -#define SDLK_F17 0x4000006cu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17) */ -#define SDLK_F18 0x4000006du /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18) */ -#define SDLK_F19 0x4000006eu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19) */ -#define SDLK_F20 0x4000006fu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20) */ -#define SDLK_F21 0x40000070u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21) */ -#define SDLK_F22 0x40000071u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22) */ -#define SDLK_F23 0x40000072u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23) */ -#define SDLK_F24 0x40000073u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24) */ -#define SDLK_EXECUTE 0x40000074u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE) */ -#define SDLK_HELP 0x40000075u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP) */ -#define SDLK_MENU 0x40000076u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU) */ -#define SDLK_SELECT 0x40000077u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT) */ -#define SDLK_STOP 0x40000078u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP) */ -#define SDLK_AGAIN 0x40000079u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN) */ -#define SDLK_UNDO 0x4000007au /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO) */ -#define SDLK_CUT 0x4000007bu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT) */ -#define SDLK_COPY 0x4000007cu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY) */ -#define SDLK_PASTE 0x4000007du /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE) */ -#define SDLK_FIND 0x4000007eu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND) */ -#define SDLK_MUTE 0x4000007fu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE) */ -#define SDLK_VOLUMEUP 0x40000080u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP) */ -#define SDLK_VOLUMEDOWN 0x40000081u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN) */ -#define SDLK_KP_COMMA 0x40000085u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA) */ -#define SDLK_KP_EQUALSAS400 0x40000086u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400) */ -#define SDLK_ALTERASE 0x40000099u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE) */ -#define SDLK_SYSREQ 0x4000009au /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ) */ -#define SDLK_CANCEL 0x4000009bu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL) */ -#define SDLK_CLEAR 0x4000009cu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR) */ -#define SDLK_PRIOR 0x4000009du /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR) */ -#define SDLK_RETURN2 0x4000009eu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2) */ -#define SDLK_SEPARATOR 0x4000009fu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR) */ -#define SDLK_OUT 0x400000a0u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT) */ -#define SDLK_OPER 0x400000a1u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER) */ -#define SDLK_CLEARAGAIN 0x400000a2u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN) */ -#define SDLK_CRSEL 0x400000a3u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL) */ -#define SDLK_EXSEL 0x400000a4u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL) */ -#define SDLK_KP_00 0x400000b0u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00) */ -#define SDLK_KP_000 0x400000b1u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000) */ -#define SDLK_THOUSANDSSEPARATOR 0x400000b2u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR) */ -#define SDLK_DECIMALSEPARATOR 0x400000b3u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR) */ -#define SDLK_CURRENCYUNIT 0x400000b4u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT) */ -#define SDLK_CURRENCYSUBUNIT 0x400000b5u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT) */ -#define SDLK_KP_LEFTPAREN 0x400000b6u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN) */ -#define SDLK_KP_RIGHTPAREN 0x400000b7u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN) */ -#define SDLK_KP_LEFTBRACE 0x400000b8u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE) */ -#define SDLK_KP_RIGHTBRACE 0x400000b9u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE) */ -#define SDLK_KP_TAB 0x400000bau /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB) */ -#define SDLK_KP_BACKSPACE 0x400000bbu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE) */ -#define SDLK_KP_A 0x400000bcu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A) */ -#define SDLK_KP_B 0x400000bdu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B) */ -#define SDLK_KP_C 0x400000beu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C) */ -#define SDLK_KP_D 0x400000bfu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D) */ -#define SDLK_KP_E 0x400000c0u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E) */ -#define SDLK_KP_F 0x400000c1u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F) */ -#define SDLK_KP_XOR 0x400000c2u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR) */ -#define SDLK_KP_POWER 0x400000c3u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER) */ -#define SDLK_KP_PERCENT 0x400000c4u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT) */ -#define SDLK_KP_LESS 0x400000c5u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS) */ -#define SDLK_KP_GREATER 0x400000c6u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER) */ -#define SDLK_KP_AMPERSAND 0x400000c7u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND) */ -#define SDLK_KP_DBLAMPERSAND 0x400000c8u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND) */ -#define SDLK_KP_VERTICALBAR 0x400000c9u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR) */ -#define SDLK_KP_DBLVERTICALBAR 0x400000cau /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR) */ -#define SDLK_KP_COLON 0x400000cbu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON) */ -#define SDLK_KP_HASH 0x400000ccu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH) */ -#define SDLK_KP_SPACE 0x400000cdu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE) */ -#define SDLK_KP_AT 0x400000ceu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT) */ -#define SDLK_KP_EXCLAM 0x400000cfu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM) */ -#define SDLK_KP_MEMSTORE 0x400000d0u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE) */ -#define SDLK_KP_MEMRECALL 0x400000d1u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL) */ -#define SDLK_KP_MEMCLEAR 0x400000d2u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR) */ -#define SDLK_KP_MEMADD 0x400000d3u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD) */ -#define SDLK_KP_MEMSUBTRACT 0x400000d4u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT) */ -#define SDLK_KP_MEMMULTIPLY 0x400000d5u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY) */ -#define SDLK_KP_MEMDIVIDE 0x400000d6u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE) */ -#define SDLK_KP_PLUSMINUS 0x400000d7u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS) */ -#define SDLK_KP_CLEAR 0x400000d8u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR) */ -#define SDLK_KP_CLEARENTRY 0x400000d9u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY) */ -#define SDLK_KP_BINARY 0x400000dau /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY) */ -#define SDLK_KP_OCTAL 0x400000dbu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL) */ -#define SDLK_KP_DECIMAL 0x400000dcu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL) */ -#define SDLK_KP_HEXADECIMAL 0x400000ddu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL) */ -#define SDLK_LCTRL 0x400000e0u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL) */ -#define SDLK_LSHIFT 0x400000e1u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT) */ -#define SDLK_LALT 0x400000e2u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT) */ -#define SDLK_LGUI 0x400000e3u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI) */ -#define SDLK_RCTRL 0x400000e4u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL) */ -#define SDLK_RSHIFT 0x400000e5u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT) */ -#define SDLK_RALT 0x400000e6u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT) */ -#define SDLK_RGUI 0x400000e7u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI) */ -#define SDLK_MODE 0x40000101u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE) */ -#define SDLK_SLEEP 0x40000102u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP) */ -#define SDLK_WAKE 0x40000103u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WAKE) */ -#define SDLK_CHANNEL_INCREMENT 0x40000104u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CHANNEL_INCREMENT) */ -#define SDLK_CHANNEL_DECREMENT 0x40000105u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CHANNEL_DECREMENT) */ -#define SDLK_MEDIA_PLAY 0x40000106u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PLAY) */ -#define SDLK_MEDIA_PAUSE 0x40000107u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PAUSE) */ -#define SDLK_MEDIA_RECORD 0x40000108u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_RECORD) */ -#define SDLK_MEDIA_FAST_FORWARD 0x40000109u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_FAST_FORWARD) */ -#define SDLK_MEDIA_REWIND 0x4000010au /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_REWIND) */ -#define SDLK_MEDIA_NEXT_TRACK 0x4000010bu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_NEXT_TRACK) */ -#define SDLK_MEDIA_PREVIOUS_TRACK 0x4000010cu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PREVIOUS_TRACK) */ -#define SDLK_MEDIA_STOP 0x4000010du /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_STOP) */ -#define SDLK_MEDIA_EJECT 0x4000010eu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_EJECT) */ -#define SDLK_MEDIA_PLAY_PAUSE 0x4000010fu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PLAY_PAUSE) */ -#define SDLK_MEDIA_SELECT 0x40000110u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_SELECT) */ -#define SDLK_AC_NEW 0x40000111u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_NEW) */ -#define SDLK_AC_OPEN 0x40000112u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_OPEN) */ -#define SDLK_AC_CLOSE 0x40000113u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_CLOSE) */ -#define SDLK_AC_EXIT 0x40000114u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_EXIT) */ -#define SDLK_AC_SAVE 0x40000115u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SAVE) */ -#define SDLK_AC_PRINT 0x40000116u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_PRINT) */ -#define SDLK_AC_PROPERTIES 0x40000117u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_PROPERTIES) */ -#define SDLK_AC_SEARCH 0x40000118u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH) */ -#define SDLK_AC_HOME 0x40000119u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME) */ -#define SDLK_AC_BACK 0x4000011au /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK) */ -#define SDLK_AC_FORWARD 0x4000011bu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD) */ -#define SDLK_AC_STOP 0x4000011cu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP) */ -#define SDLK_AC_REFRESH 0x4000011du /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH) */ -#define SDLK_AC_BOOKMARKS 0x4000011eu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS) */ -#define SDLK_SOFTLEFT 0x4000011fu /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTLEFT) */ -#define SDLK_SOFTRIGHT 0x40000120u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTRIGHT) */ -#define SDLK_CALL 0x40000121u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALL) */ -#define SDLK_ENDCALL 0x40000122u /* SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ENDCALL) */ +#define SDLK_UNKNOWN 0x00000000u /**< 0 */ +#define SDLK_RETURN 0x0000000du /**< '\r' */ +#define SDLK_ESCAPE 0x0000001bu /**< '\x1B' */ +#define SDLK_BACKSPACE 0x00000008u /**< '\b' */ +#define SDLK_TAB 0x00000009u /**< '\t' */ +#define SDLK_SPACE 0x00000020u /**< ' ' */ +#define SDLK_EXCLAIM 0x00000021u /**< '!' */ +#define SDLK_DBLAPOSTROPHE 0x00000022u /**< '"' */ +#define SDLK_HASH 0x00000023u /**< '#' */ +#define SDLK_DOLLAR 0x00000024u /**< '$' */ +#define SDLK_PERCENT 0x00000025u /**< '%' */ +#define SDLK_AMPERSAND 0x00000026u /**< '&' */ +#define SDLK_APOSTROPHE 0x00000027u /**< '\'' */ +#define SDLK_LEFTPAREN 0x00000028u /**< '(' */ +#define SDLK_RIGHTPAREN 0x00000029u /**< ')' */ +#define SDLK_ASTERISK 0x0000002au /**< '*' */ +#define SDLK_PLUS 0x0000002bu /**< '+' */ +#define SDLK_COMMA 0x0000002cu /**< ',' */ +#define SDLK_MINUS 0x0000002du /**< '-' */ +#define SDLK_PERIOD 0x0000002eu /**< '.' */ +#define SDLK_SLASH 0x0000002fu /**< '/' */ +#define SDLK_0 0x00000030u /**< '0' */ +#define SDLK_1 0x00000031u /**< '1' */ +#define SDLK_2 0x00000032u /**< '2' */ +#define SDLK_3 0x00000033u /**< '3' */ +#define SDLK_4 0x00000034u /**< '4' */ +#define SDLK_5 0x00000035u /**< '5' */ +#define SDLK_6 0x00000036u /**< '6' */ +#define SDLK_7 0x00000037u /**< '7' */ +#define SDLK_8 0x00000038u /**< '8' */ +#define SDLK_9 0x00000039u /**< '9' */ +#define SDLK_COLON 0x0000003au /**< ':' */ +#define SDLK_SEMICOLON 0x0000003bu /**< ';' */ +#define SDLK_LESS 0x0000003cu /**< '<' */ +#define SDLK_EQUALS 0x0000003du /**< '=' */ +#define SDLK_GREATER 0x0000003eu /**< '>' */ +#define SDLK_QUESTION 0x0000003fu /**< '?' */ +#define SDLK_AT 0x00000040u /**< '@' */ +#define SDLK_LEFTBRACKET 0x0000005bu /**< '[' */ +#define SDLK_BACKSLASH 0x0000005cu /**< '\\' */ +#define SDLK_RIGHTBRACKET 0x0000005du /**< ']' */ +#define SDLK_CARET 0x0000005eu /**< '^' */ +#define SDLK_UNDERSCORE 0x0000005fu /**< '_' */ +#define SDLK_GRAVE 0x00000060u /**< '`' */ +#define SDLK_A 0x00000061u /**< 'a' */ +#define SDLK_B 0x00000062u /**< 'b' */ +#define SDLK_C 0x00000063u /**< 'c' */ +#define SDLK_D 0x00000064u /**< 'd' */ +#define SDLK_E 0x00000065u /**< 'e' */ +#define SDLK_F 0x00000066u /**< 'f' */ +#define SDLK_G 0x00000067u /**< 'g' */ +#define SDLK_H 0x00000068u /**< 'h' */ +#define SDLK_I 0x00000069u /**< 'i' */ +#define SDLK_J 0x0000006au /**< 'j' */ +#define SDLK_K 0x0000006bu /**< 'k' */ +#define SDLK_L 0x0000006cu /**< 'l' */ +#define SDLK_M 0x0000006du /**< 'm' */ +#define SDLK_N 0x0000006eu /**< 'n' */ +#define SDLK_O 0x0000006fu /**< 'o' */ +#define SDLK_P 0x00000070u /**< 'p' */ +#define SDLK_Q 0x00000071u /**< 'q' */ +#define SDLK_R 0x00000072u /**< 'r' */ +#define SDLK_S 0x00000073u /**< 's' */ +#define SDLK_T 0x00000074u /**< 't' */ +#define SDLK_U 0x00000075u /**< 'u' */ +#define SDLK_V 0x00000076u /**< 'v' */ +#define SDLK_W 0x00000077u /**< 'w' */ +#define SDLK_X 0x00000078u /**< 'x' */ +#define SDLK_Y 0x00000079u /**< 'y' */ +#define SDLK_Z 0x0000007au /**< 'z' */ +#define SDLK_LEFTBRACE 0x0000007bu /**< '{' */ +#define SDLK_PIPE 0x0000007cu /**< '|' */ +#define SDLK_RIGHTBRACE 0x0000007du /**< '}' */ +#define SDLK_TILDE 0x0000007eu /**< '~' */ +#define SDLK_DELETE 0x0000007fu /**< '\x7F' */ +#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) */ +#define SDLK_F3 0x4000003cu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3) */ +#define SDLK_F4 0x4000003du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4) */ +#define SDLK_F5 0x4000003eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5) */ +#define SDLK_F6 0x4000003fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6) */ +#define SDLK_F7 0x40000040u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7) */ +#define SDLK_F8 0x40000041u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8) */ +#define SDLK_F9 0x40000042u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9) */ +#define SDLK_F10 0x40000043u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10) */ +#define SDLK_F11 0x40000044u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11) */ +#define SDLK_F12 0x40000045u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12) */ +#define SDLK_PRINTSCREEN 0x40000046u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN) */ +#define SDLK_SCROLLLOCK 0x40000047u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK) */ +#define SDLK_PAUSE 0x40000048u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE) */ +#define SDLK_INSERT 0x40000049u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT) */ +#define SDLK_HOME 0x4000004au /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME) */ +#define SDLK_PAGEUP 0x4000004bu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP) */ +#define SDLK_END 0x4000004du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END) */ +#define SDLK_PAGEDOWN 0x4000004eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN) */ +#define SDLK_RIGHT 0x4000004fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT) */ +#define SDLK_LEFT 0x40000050u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT) */ +#define SDLK_DOWN 0x40000051u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN) */ +#define SDLK_UP 0x40000052u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP) */ +#define SDLK_NUMLOCKCLEAR 0x40000053u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR) */ +#define SDLK_KP_DIVIDE 0x40000054u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE) */ +#define SDLK_KP_MULTIPLY 0x40000055u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY) */ +#define SDLK_KP_MINUS 0x40000056u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS) */ +#define SDLK_KP_PLUS 0x40000057u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS) */ +#define SDLK_KP_ENTER 0x40000058u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER) */ +#define SDLK_KP_1 0x40000059u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1) */ +#define SDLK_KP_2 0x4000005au /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2) */ +#define SDLK_KP_3 0x4000005bu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3) */ +#define SDLK_KP_4 0x4000005cu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4) */ +#define SDLK_KP_5 0x4000005du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5) */ +#define SDLK_KP_6 0x4000005eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6) */ +#define SDLK_KP_7 0x4000005fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7) */ +#define SDLK_KP_8 0x40000060u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8) */ +#define SDLK_KP_9 0x40000061u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9) */ +#define SDLK_KP_0 0x40000062u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0) */ +#define SDLK_KP_PERIOD 0x40000063u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD) */ +#define SDLK_APPLICATION 0x40000065u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION) */ +#define SDLK_POWER 0x40000066u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER) */ +#define SDLK_KP_EQUALS 0x40000067u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS) */ +#define SDLK_F13 0x40000068u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13) */ +#define SDLK_F14 0x40000069u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14) */ +#define SDLK_F15 0x4000006au /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15) */ +#define SDLK_F16 0x4000006bu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16) */ +#define SDLK_F17 0x4000006cu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17) */ +#define SDLK_F18 0x4000006du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18) */ +#define SDLK_F19 0x4000006eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19) */ +#define SDLK_F20 0x4000006fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20) */ +#define SDLK_F21 0x40000070u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21) */ +#define SDLK_F22 0x40000071u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22) */ +#define SDLK_F23 0x40000072u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23) */ +#define SDLK_F24 0x40000073u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24) */ +#define SDLK_EXECUTE 0x40000074u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE) */ +#define SDLK_HELP 0x40000075u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP) */ +#define SDLK_MENU 0x40000076u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU) */ +#define SDLK_SELECT 0x40000077u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT) */ +#define SDLK_STOP 0x40000078u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP) */ +#define SDLK_AGAIN 0x40000079u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN) */ +#define SDLK_UNDO 0x4000007au /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO) */ +#define SDLK_CUT 0x4000007bu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT) */ +#define SDLK_COPY 0x4000007cu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY) */ +#define SDLK_PASTE 0x4000007du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE) */ +#define SDLK_FIND 0x4000007eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND) */ +#define SDLK_MUTE 0x4000007fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE) */ +#define SDLK_VOLUMEUP 0x40000080u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP) */ +#define SDLK_VOLUMEDOWN 0x40000081u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN) */ +#define SDLK_KP_COMMA 0x40000085u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA) */ +#define SDLK_KP_EQUALSAS400 0x40000086u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400) */ +#define SDLK_ALTERASE 0x40000099u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE) */ +#define SDLK_SYSREQ 0x4000009au /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ) */ +#define SDLK_CANCEL 0x4000009bu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL) */ +#define SDLK_CLEAR 0x4000009cu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR) */ +#define SDLK_PRIOR 0x4000009du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR) */ +#define SDLK_RETURN2 0x4000009eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2) */ +#define SDLK_SEPARATOR 0x4000009fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR) */ +#define SDLK_OUT 0x400000a0u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT) */ +#define SDLK_OPER 0x400000a1u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER) */ +#define SDLK_CLEARAGAIN 0x400000a2u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN) */ +#define SDLK_CRSEL 0x400000a3u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL) */ +#define SDLK_EXSEL 0x400000a4u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL) */ +#define SDLK_KP_00 0x400000b0u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00) */ +#define SDLK_KP_000 0x400000b1u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000) */ +#define SDLK_THOUSANDSSEPARATOR 0x400000b2u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR) */ +#define SDLK_DECIMALSEPARATOR 0x400000b3u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR) */ +#define SDLK_CURRENCYUNIT 0x400000b4u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT) */ +#define SDLK_CURRENCYSUBUNIT 0x400000b5u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT) */ +#define SDLK_KP_LEFTPAREN 0x400000b6u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN) */ +#define SDLK_KP_RIGHTPAREN 0x400000b7u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN) */ +#define SDLK_KP_LEFTBRACE 0x400000b8u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE) */ +#define SDLK_KP_RIGHTBRACE 0x400000b9u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE) */ +#define SDLK_KP_TAB 0x400000bau /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB) */ +#define SDLK_KP_BACKSPACE 0x400000bbu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE) */ +#define SDLK_KP_A 0x400000bcu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A) */ +#define SDLK_KP_B 0x400000bdu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B) */ +#define SDLK_KP_C 0x400000beu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C) */ +#define SDLK_KP_D 0x400000bfu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D) */ +#define SDLK_KP_E 0x400000c0u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E) */ +#define SDLK_KP_F 0x400000c1u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F) */ +#define SDLK_KP_XOR 0x400000c2u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR) */ +#define SDLK_KP_POWER 0x400000c3u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER) */ +#define SDLK_KP_PERCENT 0x400000c4u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT) */ +#define SDLK_KP_LESS 0x400000c5u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS) */ +#define SDLK_KP_GREATER 0x400000c6u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER) */ +#define SDLK_KP_AMPERSAND 0x400000c7u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND) */ +#define SDLK_KP_DBLAMPERSAND 0x400000c8u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND) */ +#define SDLK_KP_VERTICALBAR 0x400000c9u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR) */ +#define SDLK_KP_DBLVERTICALBAR 0x400000cau /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR) */ +#define SDLK_KP_COLON 0x400000cbu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON) */ +#define SDLK_KP_HASH 0x400000ccu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH) */ +#define SDLK_KP_SPACE 0x400000cdu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE) */ +#define SDLK_KP_AT 0x400000ceu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT) */ +#define SDLK_KP_EXCLAM 0x400000cfu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM) */ +#define SDLK_KP_MEMSTORE 0x400000d0u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE) */ +#define SDLK_KP_MEMRECALL 0x400000d1u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL) */ +#define SDLK_KP_MEMCLEAR 0x400000d2u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR) */ +#define SDLK_KP_MEMADD 0x400000d3u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD) */ +#define SDLK_KP_MEMSUBTRACT 0x400000d4u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT) */ +#define SDLK_KP_MEMMULTIPLY 0x400000d5u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY) */ +#define SDLK_KP_MEMDIVIDE 0x400000d6u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE) */ +#define SDLK_KP_PLUSMINUS 0x400000d7u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS) */ +#define SDLK_KP_CLEAR 0x400000d8u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR) */ +#define SDLK_KP_CLEARENTRY 0x400000d9u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY) */ +#define SDLK_KP_BINARY 0x400000dau /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY) */ +#define SDLK_KP_OCTAL 0x400000dbu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL) */ +#define SDLK_KP_DECIMAL 0x400000dcu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL) */ +#define SDLK_KP_HEXADECIMAL 0x400000ddu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL) */ +#define SDLK_LCTRL 0x400000e0u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL) */ +#define SDLK_LSHIFT 0x400000e1u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT) */ +#define SDLK_LALT 0x400000e2u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT) */ +#define SDLK_LGUI 0x400000e3u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI) */ +#define SDLK_RCTRL 0x400000e4u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL) */ +#define SDLK_RSHIFT 0x400000e5u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT) */ +#define SDLK_RALT 0x400000e6u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT) */ +#define SDLK_RGUI 0x400000e7u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI) */ +#define SDLK_MODE 0x40000101u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE) */ +#define SDLK_SLEEP 0x40000102u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP) */ +#define SDLK_WAKE 0x40000103u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WAKE) */ +#define SDLK_CHANNEL_INCREMENT 0x40000104u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CHANNEL_INCREMENT) */ +#define SDLK_CHANNEL_DECREMENT 0x40000105u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CHANNEL_DECREMENT) */ +#define SDLK_MEDIA_PLAY 0x40000106u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PLAY) */ +#define SDLK_MEDIA_PAUSE 0x40000107u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PAUSE) */ +#define SDLK_MEDIA_RECORD 0x40000108u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_RECORD) */ +#define SDLK_MEDIA_FAST_FORWARD 0x40000109u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_FAST_FORWARD) */ +#define SDLK_MEDIA_REWIND 0x4000010au /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_REWIND) */ +#define SDLK_MEDIA_NEXT_TRACK 0x4000010bu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_NEXT_TRACK) */ +#define SDLK_MEDIA_PREVIOUS_TRACK 0x4000010cu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PREVIOUS_TRACK) */ +#define SDLK_MEDIA_STOP 0x4000010du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_STOP) */ +#define SDLK_MEDIA_EJECT 0x4000010eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_EJECT) */ +#define SDLK_MEDIA_PLAY_PAUSE 0x4000010fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PLAY_PAUSE) */ +#define SDLK_MEDIA_SELECT 0x40000110u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_SELECT) */ +#define SDLK_AC_NEW 0x40000111u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_NEW) */ +#define SDLK_AC_OPEN 0x40000112u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_OPEN) */ +#define SDLK_AC_CLOSE 0x40000113u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_CLOSE) */ +#define SDLK_AC_EXIT 0x40000114u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_EXIT) */ +#define SDLK_AC_SAVE 0x40000115u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SAVE) */ +#define SDLK_AC_PRINT 0x40000116u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_PRINT) */ +#define SDLK_AC_PROPERTIES 0x40000117u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_PROPERTIES) */ +#define SDLK_AC_SEARCH 0x40000118u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH) */ +#define SDLK_AC_HOME 0x40000119u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME) */ +#define SDLK_AC_BACK 0x4000011au /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK) */ +#define SDLK_AC_FORWARD 0x4000011bu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD) */ +#define SDLK_AC_STOP 0x4000011cu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP) */ +#define SDLK_AC_REFRESH 0x4000011du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH) */ +#define SDLK_AC_BOOKMARKS 0x4000011eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS) */ +#define SDLK_SOFTLEFT 0x4000011fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTLEFT) */ +#define SDLK_SOFTRIGHT 0x40000120u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTRIGHT) */ +#define SDLK_CALL 0x40000121u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALL) */ +#define SDLK_ENDCALL 0x40000122u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ENDCALL) */ /** * Valid key modifiers (possibly OR'd together). * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint16 SDL_Keymod; diff --git a/Source/ThirdParty/SDL/SDL3/SDL_loadso.h b/Source/ThirdParty/SDL/SDL3/SDL_loadso.h index 2d49c75fe..53c496711 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_loadso.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_loadso.h @@ -63,7 +63,7 @@ extern "C" { /** * An opaque datatype that represents a loaded shared object. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_LoadObject * \sa SDL_LoadFunction @@ -80,7 +80,7 @@ typedef struct SDL_SharedObject SDL_SharedObject; * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LoadFunction * \sa SDL_UnloadObject @@ -109,7 +109,7 @@ extern SDL_DECLSPEC SDL_SharedObject * SDLCALL SDL_LoadObject(const char *sofile * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LoadObject */ @@ -125,7 +125,7 @@ extern SDL_DECLSPEC SDL_FunctionPointer SDLCALL SDL_LoadFunction(SDL_SharedObjec * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LoadObject */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_locale.h b/Source/ThirdParty/SDL/SDL3/SDL_locale.h index 85d77500c..3042bd858 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_locale.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_locale.h @@ -47,7 +47,7 @@ extern "C" { * would be "en"), and the country, if not NULL, will be an ISO-3166 country * code (so Canada would be "CA"). * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPreferredLocales */ @@ -96,7 +96,7 @@ typedef struct SDL_Locale * allocation that should be freed with SDL_free() when it is no * longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Locale ** SDLCALL SDL_GetPreferredLocales(int *count); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_log.h b/Source/ThirdParty/SDL/SDL3/SDL_log.h index 8feb9e0af..b1955cbff 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_log.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_log.h @@ -76,7 +76,7 @@ extern "C" { * level, the assert category is enabled at the WARN level, test is enabled at * the VERBOSE level and all other categories are enabled at the ERROR level. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_LogCategory { @@ -116,7 +116,7 @@ typedef enum SDL_LogCategory /** * The predefined log priorities * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_LogPriority { @@ -139,7 +139,7 @@ typedef enum SDL_LogPriority * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ResetLogPriorities * \sa SDL_SetLogPriority @@ -154,7 +154,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetLogPriorities(SDL_LogPriority priority); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetLogPriority * \sa SDL_ResetLogPriorities @@ -170,7 +170,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetLogPriority(int category, SDL_LogPriorit * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetLogPriority */ @@ -183,7 +183,7 @@ extern SDL_DECLSPEC SDL_LogPriority SDLCALL SDL_GetLogPriority(int category); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetLogPriorities * \sa SDL_SetLogPriority @@ -205,7 +205,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ResetLogPriorities(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetLogPriorities * \sa SDL_SetLogPriority @@ -221,7 +221,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetLogPriorityPrefix(SDL_LogPriority priori * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LogCritical * \sa SDL_LogDebug @@ -245,7 +245,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fm * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Log * \sa SDL_LogCritical @@ -270,7 +270,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_LogTrace(int category, SDL_PRINTF_FORMAT_ST * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Log * \sa SDL_LogCritical @@ -293,7 +293,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_ * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Log * \sa SDL_LogCritical @@ -317,7 +317,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_LogDebug(int category, SDL_PRINTF_FORMAT_ST * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Log * \sa SDL_LogCritical @@ -341,7 +341,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STR * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Log * \sa SDL_LogCritical @@ -365,7 +365,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STR * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Log * \sa SDL_LogCritical @@ -389,7 +389,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_LogError(int category, SDL_PRINTF_FORMAT_ST * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Log * \sa SDL_LogDebug @@ -414,7 +414,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Log * \sa SDL_LogCritical @@ -440,7 +440,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_LogMessage(int category, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Log * \sa SDL_LogCritical @@ -469,10 +469,24 @@ extern SDL_DECLSPEC void SDLCALL SDL_LogMessageV(int category, * \param priority the priority of the message. * \param message the message being output. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message); +/** + * Get the default log output function. + * + * \returns the default log output callback. + * + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.6. + * + * \sa SDL_SetLogOutputFunction + * \sa SDL_GetLogOutputFunction + */ +extern SDL_DECLSPEC SDL_LogOutputFunction SDLCALL SDL_GetDefaultLogOutputFunction(void); + /** * Get the current log output function. * @@ -483,8 +497,9 @@ typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_ * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * + * \sa SDL_GetDefaultLogOutputFunction * \sa SDL_SetLogOutputFunction */ extern SDL_DECLSPEC void SDLCALL SDL_GetLogOutputFunction(SDL_LogOutputFunction *callback, void **userdata); @@ -497,8 +512,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_GetLogOutputFunction(SDL_LogOutputFunction * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * + * \sa SDL_GetDefaultLogOutputFunction * \sa SDL_GetLogOutputFunction */ extern SDL_DECLSPEC void SDLCALL SDL_SetLogOutputFunction(SDL_LogOutputFunction callback, void *userdata); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_main.h b/Source/ThirdParty/SDL/SDL3/SDL_main.h index e173bd5c6..9b97abda6 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_main.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_main.h @@ -22,13 +22,22 @@ /** * # CategoryMain * - * Redefine main() on some platforms so that it is called by SDL. + * Redefine main() if necessary so that it is called by SDL. * - * For details on how SDL_main works, and how to use it, please refer to: + * In order to make this consistent on all platforms, the application's main() + * should look like this: + * + * ```c + * int main(int argc, char *argv[]) + * { + * } + * ``` + * + * SDL will take care of platform specific details on how it gets called. + * + * For more information, see: * * https://wiki.libsdl.org/SDL3/README/main-functions - * - * (or docs/README-main-functions.md in the SDL source tree) */ #ifndef SDL_main_h_ @@ -40,7 +49,11 @@ #include #ifndef SDL_MAIN_HANDLED - #ifdef SDL_PLATFORM_WIN32 + #if defined(SDL_PLATFORM_PRIVATE_MAIN) + /* Private platforms may have their own ideas about entry points. */ + #include "SDL_main_private.h" + + #elif defined(SDL_PLATFORM_WIN32) /* On Windows SDL provides WinMain(), which parses the command line and passes the arguments to your main function. @@ -77,8 +90,14 @@ */ #define SDL_MAIN_NEEDED - /* We need to export SDL_main so it can be launched from Java */ - #define SDLMAIN_DECLSPEC SDL_DECLSPEC + /* As this is launched from Java, the real entry point (main() function) + is outside of the the binary built from this code. + This define makes sure that, unlike on other platforms, SDL_main.h + and SDL_main_impl.h export an `SDL_main()` function (to be called + from Java), but don't implement a native `int main(int argc, char* argv[])` + or similar. + */ + #define SDL_MAIN_EXPORTED #elif defined(SDL_PLATFORM_EMSCRIPTEN) /* On Emscripten, SDL provides a main function that converts URL @@ -125,25 +144,14 @@ #endif #endif /* SDL_MAIN_HANDLED */ -#ifndef SDLMAIN_DECLSPEC +#ifdef SDL_MAIN_EXPORTED +/* We need to export SDL_main so it can be launched from external code, + like SDLActivity.java on Android */ +#define SDLMAIN_DECLSPEC SDL_DECLSPEC +#else +/* usually this is empty */ #define SDLMAIN_DECLSPEC -#endif - -/** - * \file SDL_main.h - * - * The application's main() function must be called with C linkage, - * and should be declared like this: - * - * ```c - * #ifdef __cplusplus - * extern "C" - * #endif - * int main(int argc, char *argv[]) - * { - * } - * ``` - */ +#endif /* SDL_MAIN_EXPORTED */ #ifdef SDL_WIKI_DOCUMENTATION_SECTION @@ -160,7 +168,7 @@ * docs/README-main-functions.md in the source tree) for a more detailed * explanation. * - * \since This macro is used by the headers since SDL 3.0.0. + * \since This macro is used by the headers since SDL 3.1.3. * * \sa SDL_AppInit * \sa SDL_AppEvent @@ -234,6 +242,8 @@ extern "C" { * SDL_APP_SUCCESS, SDL calls SDL_AppQuit and terminates with an exit code * that reports success to the platform. * + * This function is called by SDL on the main thread. + * * \param appstate a place where the app can optionally store a pointer for * future use. * \param argc the standard ANSI C main's argc; number of elements in `argv`. @@ -242,9 +252,7 @@ extern "C" { * \returns SDL_APP_FAILURE to terminate with an error, SDL_APP_SUCCESS to * terminate with success, SDL_APP_CONTINUE to continue. * - * \threadsafety This function is not thread safe. - * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AppIterate * \sa SDL_AppEvent @@ -287,13 +295,16 @@ extern SDLMAIN_DECLSPEC SDL_AppResult SDLCALL SDL_AppInit(void **appstate, int a * SDL_AppQuit and terminates with an exit code that reports success to the * platform. * + * This function is called by SDL on the main thread. + * * \param appstate an optional pointer, provided by the app in SDL_AppInit. * \returns SDL_APP_FAILURE to terminate with an error, SDL_APP_SUCCESS to * terminate with success, SDL_APP_CONTINUE to continue. * - * \threadsafety This function is not thread safe. + * \threadsafety This function may get called concurrently with SDL_AppEvent() + * for events not pushed on the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AppInit * \sa SDL_AppEvent @@ -306,15 +317,15 @@ extern SDLMAIN_DECLSPEC SDL_AppResult SDLCALL SDL_AppIterate(void *appstate); * Apps implement this function when using SDL_MAIN_USE_CALLBACKS. If using a * standard "main" function, you should not supply this. * - * This function is called as needed by SDL after SDL_AppInit returns 0; It is - * called once for each new event. + * This function is called as needed by SDL after SDL_AppInit returns + * SDL_APP_CONTINUE. It is called once for each new event. * * There is (currently) no guarantee about what thread this will be called * from; whatever thread pushes an event onto SDL's queue will trigger this * function. SDL is responsible for pumping the event queue between each call * to SDL_AppIterate, so in normal operation one should only get events in a * serial fashion, but be careful if you have a thread that explicitly calls - * SDL_PushEvent. + * SDL_PushEvent. SDL itself will push events to the queue on the main thread. * * Events sent to this function are not owned by the app; if you need to save * the data, you should copy it. @@ -338,9 +349,11 @@ extern SDLMAIN_DECLSPEC SDL_AppResult SDLCALL SDL_AppIterate(void *appstate); * \returns SDL_APP_FAILURE to terminate with an error, SDL_APP_SUCCESS to * terminate with success, SDL_APP_CONTINUE to continue. * - * \threadsafety This function is not thread safe. + * \threadsafety This function may get called concurrently with + * SDL_AppIterate() or SDL_AppQuit() for events not pushed from + * the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AppInit * \sa SDL_AppIterate @@ -371,12 +384,15 @@ extern SDLMAIN_DECLSPEC SDL_AppResult SDLCALL SDL_AppEvent(void *appstate, SDL_E * function call is the last time this pointer will be provided, so any * resources to it should be cleaned up here. * + * This function is called by SDL on the main thread. + * * \param appstate an optional pointer, provided by the app in SDL_AppInit. * \param result the result code that terminated the app (success or failure). * - * \threadsafety This function is not thread safe. + * \threadsafety SDL_AppEvent() may get called concurrently with this function + * if other threads that push events are still active. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AppInit */ @@ -394,7 +410,7 @@ extern SDLMAIN_DECLSPEC void SDLCALL SDL_AppQuit(void *appstate, SDL_AppResult r * program completion, and small non-zero values are considered * errors. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef int (SDLCALL *SDL_main_func)(int argc, char *argv[]); @@ -427,7 +443,7 @@ typedef int (SDLCALL *SDL_main_func)(int argc, char *argv[]); * * \threadsafety This is the program entry point. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDLMAIN_DECLSPEC int SDLCALL SDL_main(int argc, char *argv[]); @@ -440,7 +456,7 @@ extern SDLMAIN_DECLSPEC int SDLCALL SDL_main(int argc, char *argv[]); * will not be changed it is necessary to define SDL_MAIN_HANDLED before * including SDL.h. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Init */ @@ -472,7 +488,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetMainReady(void); * \threadsafety Generally this is called once, near startup, from the * process's initial thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_RunApp(int argc, char *argv[], SDL_main_func mainFunction, void *reserved); @@ -499,7 +515,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_RunApp(int argc, char *argv[], SDL_main_func * \threadsafety It is not safe to call this anywhere except as the only * function call in SDL_main. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_EnterAppMainCallbacks(int argc, char *argv[], SDL_AppInit_func appinit, SDL_AppIterate_func appiter, SDL_AppEvent_func appevent, SDL_AppQuit_func appquit); @@ -528,7 +544,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_EnterAppMainCallbacks(int argc, char *argv[] * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst); @@ -545,7 +561,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RegisterApp(const char *name, Uint32 style, * deregistered when the registration counter in SDL_RegisterApp decrements to * zero through calls to this function. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_UnregisterApp(void); @@ -556,7 +572,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnregisterApp(void); /** * Callback from the application to let the suspend continue. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void); @@ -570,29 +586,10 @@ extern SDL_DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void); #if !defined(SDL_MAIN_HANDLED) && !defined(SDL_MAIN_NOIMPL) /* include header-only SDL_main implementations */ - #if defined(SDL_MAIN_USE_CALLBACKS) \ - || defined(SDL_PLATFORM_WINDOWS) || defined(SDL_PLATFORM_IOS) || defined(SDL_PLATFORM_TVOS) \ - || defined(SDL_PLATFORM_3DS) || defined(SDL_PLATFORM_NGAGE) || defined(SDL_PLATFORM_PS2) || defined(SDL_PLATFORM_PSP) \ - || defined(SDL_PLATFORM_EMSCRIPTEN) - + #if defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE) /* platforms which main (-equivalent) can be implemented in plain C */ #include - - #elif 0 /* C++ platforms (currently none, this used to be here for WinRT, but is left for future platforms that might arrive. */ - #ifdef __cplusplus - #include - #else - /* Note: to get rid of the following warning, you can #define SDL_MAIN_NOIMPL before including SDL_main.h - * in your C sourcefile that contains the standard main. Do *not* use SDL_MAIN_HANDLED for that, then SDL_main won't find your main()! - */ - #ifdef _MSC_VER - #pragma message("Note: Your platform needs the SDL_main implementation in a C++ source file. You can keep your main() in plain C (then continue including SDL_main.h there!) and create a fresh .cpp file that only contains #include ") - #elif defined(__GNUC__) /* gcc, clang, mingw and compatible are matched by this and have #warning */ - #warning "Note: Your platform needs the SDL_main implementation in a C++ source file. You can keep your main() in plain C and create a fresh .cpp file that only contains #include " - #endif /* __GNUC__ */ - #endif /* __cplusplus */ - - #endif /* C++ platforms */ + #endif #endif #endif /* SDL_main_h_ */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_main_impl.h b/Source/ThirdParty/SDL/SDL3/SDL_main_impl.h index feca572bc..e5560e388 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_main_impl.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_main_impl.h @@ -29,7 +29,7 @@ #endif /* if someone wants to include SDL_main.h but doesn't want the main handing magic, - (maybe to call SDL_RegisterApp()) they can #define SDL_MAIN_HANDLED first + (maybe to call SDL_RegisterApp()) they can #define SDL_MAIN_HANDLED first. SDL_MAIN_NOIMPL is for SDL-internal usage (only affects implementation, not definition of SDL_MAIN_AVAILABLE etc in SDL_main.h) and if the user wants to have the SDL_main implementation (from this header) in another source file @@ -64,10 +64,15 @@ #endif /* SDL_MAIN_USE_CALLBACKS */ - /* set up the usual SDL_main stuff if we're not using callbacks or if we are but need the normal entry point. */ - #if !defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_CALLBACK_STANDARD) + /* set up the usual SDL_main stuff if we're not using callbacks or if we are but need the normal entry point, + unless the real entry point needs to be somewhere else entirely, like Android where it's in Java code */ + #if (!defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_CALLBACK_STANDARD)) && !defined(SDL_MAIN_EXPORTED) - #if defined(SDL_PLATFORM_WINDOWS) + #if defined(SDL_PLATFORM_PRIVATE_MAIN) + /* Private platforms may have their own ideas about entry points. */ + #include "SDL_main_impl_private.h" + + #elif defined(SDL_PLATFORM_WINDOWS) /* these defines/typedefs are needed for the WinMain() definition */ #ifndef WINAPI @@ -82,7 +87,7 @@ #if defined(_MSC_VER) && !defined(SDL_PLATFORM_GDK) /* This is where execution begins [console apps] */ - #if defined( UNICODE ) && UNICODE + #if defined(UNICODE) && UNICODE int wmain(int argc, wchar_t *wargv[], wchar_t *wenvp) { (void)argc; @@ -107,7 +112,7 @@ extern "C" { #endif - #if defined( UNICODE ) && UNICODE + #if defined(UNICODE) && UNICODE int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrev, PWSTR szCmdLine, int sw) #else /* ANSI */ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw) diff --git a/Source/ThirdParty/SDL/SDL3/SDL_messagebox.h b/Source/ThirdParty/SDL/SDL3/SDL_messagebox.h index ff22baf94..776da2ac9 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_messagebox.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_messagebox.h @@ -39,11 +39,11 @@ extern "C" { #endif /** - * SDL_MessageBox flags. + * Message box flags. * * If supported will display warning icon, etc. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_MessageBoxFlags; @@ -56,7 +56,7 @@ typedef Uint32 SDL_MessageBoxFlags; /** * SDL_MessageBoxButtonData flags. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_MessageBoxButtonFlags; @@ -66,7 +66,7 @@ typedef Uint32 SDL_MessageBoxButtonFlags; /** * Individual button data. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_MessageBoxButtonData { @@ -78,7 +78,7 @@ typedef struct SDL_MessageBoxButtonData /** * RGB value used in a message box color scheme * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_MessageBoxColor { @@ -102,7 +102,7 @@ typedef enum SDL_MessageBoxColorType /** * A set of colors to use for message box dialogs * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_MessageBoxColorScheme { @@ -112,7 +112,7 @@ typedef struct SDL_MessageBoxColorScheme /** * MessageBox structure containing title, text, window, etc. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_MessageBoxData { @@ -157,7 +157,7 @@ typedef struct SDL_MessageBoxData * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ShowSimpleMessageBox */ @@ -193,13 +193,13 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *me * to stderr if you can. * * \param flags an SDL_MessageBoxFlags value. - * \param title uTF-8 title text. - * \param message uTF-8 message text. + * \param title UTF-8 title text. + * \param message UTF-8 message text. * \param window the parent window, or NULL for no parent. * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ShowMessageBox */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_metal.h b/Source/ThirdParty/SDL/SDL3/SDL_metal.h index 7c9aece7a..ff7f2a0eb 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_metal.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_metal.h @@ -39,7 +39,7 @@ extern "C" { /** * A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS). * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef void *SDL_MetalView; @@ -61,7 +61,7 @@ typedef void *SDL_MetalView; * \param window the window. * \returns handle NSView or UIView. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Metal_DestroyView * \sa SDL_Metal_GetLayer @@ -76,7 +76,7 @@ extern SDL_DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window *windo * * \param view the SDL_MetalView object. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Metal_CreateView */ @@ -88,7 +88,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view); * \param view the SDL_MetalView object. * \returns a pointer. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void * SDLCALL SDL_Metal_GetLayer(SDL_MetalView view); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_misc.h b/Source/ThirdParty/SDL/SDL3/SDL_misc.h index 2d5aa153e..45d26f4d1 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_misc.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_misc.h @@ -65,7 +65,7 @@ extern "C" { * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_OpenURL(const char *url); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_mouse.h b/Source/ThirdParty/SDL/SDL3/SDL_mouse.h index 44060091f..9068b3fab 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_mouse.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_mouse.h @@ -47,7 +47,7 @@ extern "C" { * * The value 0 is an invalid ID. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_MouseID; @@ -56,14 +56,14 @@ typedef Uint32 SDL_MouseID; * * This is opaque data. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_Cursor SDL_Cursor; /** * Cursor types for SDL_CreateSystemCursor(). * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_SystemCursor { @@ -93,7 +93,7 @@ typedef enum SDL_SystemCursor /** * Scroll direction types for the Scroll event * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_MouseWheelDirection { @@ -110,7 +110,7 @@ typedef enum SDL_MouseWheelDirection * - Button 4: Side mouse button 1 * - Button 5: Side mouse button 2 * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_GetMouseState * \sa SDL_GetGlobalMouseState @@ -139,7 +139,7 @@ typedef Uint32 SDL_MouseButtonFlags; * * \returns true if a mouse is connected, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetMice */ @@ -159,7 +159,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasMouse(void); * call SDL_GetError() for more information. This should be freed * with SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetMouseNameForID * \sa SDL_HasMouse @@ -175,7 +175,7 @@ extern SDL_DECLSPEC SDL_MouseID * SDLCALL SDL_GetMice(int *count); * \returns the name of the selected mouse, or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetMice */ @@ -186,26 +186,35 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetMouseNameForID(SDL_MouseID insta * * \returns the window with mouse focus. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void); /** - * Retrieve the current state of the mouse. + * Query SDL's cache for the synchronous mouse button state and the + * window-relative SDL-cursor position. * - * The current button state is returned as a button bitmask, which can be - * tested using the SDL_BUTTON_MASK(X) macro (where `X` is generally 1 for the - * left, 2 for middle, 3 for the right button), and `x` and `y` are set to the - * mouse cursor position relative to the focus window. You can pass NULL for - * either `x` or `y`. + * This function returns the cached synchronous state as SDL understands it + * from the last pump of the event queue. * - * \param x the x coordinate of the mouse cursor position relative to the - * focus window. - * \param y the y coordinate of the mouse cursor position relative to the - * focus window. - * \returns a 32-bit button bitmask of the current button state. + * To query the platform for immediate asynchronous state, use + * SDL_GetGlobalMouseState. * - * \since This function is available since SDL 3.0.0. + * Passing non-NULL pointers to `x` or `y` will write the destination with + * respective x or y coordinates relative to the focused window. + * + * In Relative Mode, the SDL-cursor's position usually contradicts the + * platform-cursor's position as manually calculated from + * SDL_GetGlobalMouseState() and SDL_GetWindowPosition. + * + * \param x a pointer to receive the SDL-cursor's x-position from the focused + * window's top left corner, can be NULL if unused. + * \param y a pointer to receive the SDL-cursor's y-position from the focused + * window's top left corner, can be NULL if unused. + * \returns a 32-bit bitmask of the button state that can be bitwise-compared + * against the SDL_BUTTON_MASK(X) macro. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGlobalMouseState * \sa SDL_GetRelativeMouseState @@ -213,51 +222,70 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void); extern SDL_DECLSPEC SDL_MouseButtonFlags SDLCALL SDL_GetMouseState(float *x, float *y); /** - * Get the current state of the mouse in relation to the desktop. + * Query the platform for the asynchronous mouse button state and the + * desktop-relative platform-cursor position. * - * This works similarly to SDL_GetMouseState(), but the coordinates will be - * reported relative to the top-left of the desktop. This can be useful if you - * need to track the mouse outside of a specific window and SDL_CaptureMouse() - * doesn't fit your needs. For example, it could be useful if you need to - * track the mouse while dragging a window, where coordinates relative to a - * window might not be in sync at all times. + * This function immediately queries the platform for the most recent + * asynchronous state, more costly than retrieving SDL's cached state in + * SDL_GetMouseState(). * - * Note: SDL_GetMouseState() returns the mouse position as SDL understands it - * from the last pump of the event queue. This function, however, queries the - * OS for the current mouse position, and as such, might be a slightly less - * efficient function. Unless you know what you're doing and have a good - * reason to use this function, you probably want SDL_GetMouseState() instead. + * Passing non-NULL pointers to `x` or `y` will write the destination with + * respective x or y coordinates relative to the desktop. * - * \param x filled in with the current X coord relative to the desktop; can be - * NULL. - * \param y filled in with the current Y coord relative to the desktop; can be - * NULL. - * \returns the current button state as a bitmask which can be tested using - * the SDL_BUTTON_MASK(X) macros. + * In Relative Mode, the platform-cursor's position usually contradicts the + * SDL-cursor's position as manually calculated from SDL_GetMouseState() and + * SDL_GetWindowPosition. * - * \since This function is available since SDL 3.0.0. + * This function can be useful if you need to track the mouse outside of a + * specific window and SDL_CaptureMouse() doesn't fit your needs. For example, + * it could be useful if you need to track the mouse while dragging a window, + * where coordinates relative to a window might not be in sync at all times. + * + * \param x a pointer to receive the platform-cursor's x-position from the + * desktop's top left corner, can be NULL if unused. + * \param y a pointer to receive the platform-cursor's y-position from the + * desktop's top left corner, can be NULL if unused. + * \returns a 32-bit bitmask of the button state that can be bitwise-compared + * against the SDL_BUTTON_MASK(X) macro. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_CaptureMouse * \sa SDL_GetMouseState + * \sa SDL_GetGlobalMouseState */ extern SDL_DECLSPEC SDL_MouseButtonFlags SDLCALL SDL_GetGlobalMouseState(float *x, float *y); /** - * Retrieve the relative state of the mouse. + * Query SDL's cache for the synchronous mouse button state and accumulated + * mouse delta since last call. * - * The current button state is returned as a button bitmask, which can be - * tested using the `SDL_BUTTON_MASK(X)` macros (where `X` is generally 1 for - * the left, 2 for middle, 3 for the right button), and `x` and `y` are set to - * the mouse deltas since the last call to SDL_GetRelativeMouseState() or - * since event initialization. You can pass NULL for either `x` or `y`. + * This function returns the cached synchronous state as SDL understands it + * from the last pump of the event queue. * - * \param x a pointer filled with the last recorded x coordinate of the mouse. - * \param y a pointer filled with the last recorded y coordinate of the mouse. - * \returns a 32-bit button bitmask of the relative button state. + * To query the platform for immediate asynchronous state, use + * SDL_GetGlobalMouseState. * - * \since This function is available since SDL 3.0.0. + * Passing non-NULL pointers to `x` or `y` will write the destination with + * respective x or y deltas accumulated since the last call to this function + * (or since event initialization). + * + * This function is useful for reducing overhead by processing relative mouse + * inputs in one go per-frame instead of individually per-event, at the + * expense of losing the order between events within the frame (e.g. quickly + * pressing and releasing a button within the same frame). + * + * \param x a pointer to receive the x mouse delta accumulated since last + * call, can be NULL if unused. + * \param y a pointer to receive the y mouse delta accumulated since last + * call, can be NULL if unused. + * \returns a 32-bit bitmask of the button state that can be bitwise-compared + * against the SDL_BUTTON_MASK(X) macro. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetMouseState + * \sa SDL_GetGlobalMouseState */ extern SDL_DECLSPEC SDL_MouseButtonFlags SDLCALL SDL_GetRelativeMouseState(float *x, float *y); @@ -276,7 +304,7 @@ extern SDL_DECLSPEC SDL_MouseButtonFlags SDLCALL SDL_GetRelativeMouseState(float * \param x the x coordinate within the window. * \param y the y coordinate within the window. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_WarpMouseGlobal */ @@ -299,7 +327,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window, * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_WarpMouseInWindow */ @@ -320,7 +348,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WarpMouseGlobal(float x, float y); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowRelativeMouseMode */ @@ -332,7 +360,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowRelativeMouseMode(SDL_Window *wind * \param window the window to query. * \returns true if relative mode is enabled for a window or false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetWindowRelativeMouseMode */ @@ -378,7 +406,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowRelativeMouseMode(SDL_Window *wind * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetGlobalMouseState */ @@ -419,7 +447,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CaptureMouse(bool enabled); * \returns a new cursor with the specified parameters on success or NULL on * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateColorCursor * \sa SDL_CreateSystemCursor @@ -450,7 +478,7 @@ extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_CreateCursor(const Uint8 * data, * \returns the new cursor on success or NULL on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateCursor * \sa SDL_CreateSystemCursor @@ -468,7 +496,7 @@ extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_CreateColorCursor(SDL_Surface *surf * \returns a cursor on success or NULL on failure; call SDL_GetError() for * more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DestroyCursor */ @@ -486,7 +514,7 @@ extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetCursor */ @@ -500,7 +528,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetCursor(SDL_Cursor *cursor); * * \returns the active cursor or NULL if there is no mouse. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetCursor */ @@ -515,7 +543,7 @@ extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_GetCursor(void); * \returns the default cursor on success or NULL on failuree; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_GetDefaultCursor(void); @@ -527,7 +555,7 @@ extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_GetDefaultCursor(void); * * \param cursor the cursor to free. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateColorCursor * \sa SDL_CreateCursor @@ -541,7 +569,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyCursor(SDL_Cursor *cursor); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CursorVisible * \sa SDL_HideCursor @@ -554,7 +582,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ShowCursor(void); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CursorVisible * \sa SDL_ShowCursor @@ -567,7 +595,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HideCursor(void); * \returns `true` if the cursor is being shown, or `false` if the cursor is * hidden. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_HideCursor * \sa SDL_ShowCursor diff --git a/Source/ThirdParty/SDL/SDL3/SDL_mutex.h b/Source/ThirdParty/SDL/SDL3/SDL_mutex.h index 03cb80cfb..b3fddeebd 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_mutex.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_mutex.h @@ -132,7 +132,7 @@ extern "C" { * * https://en.wikipedia.org/wiki/Mutex * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_Mutex SDL_Mutex; @@ -149,7 +149,7 @@ typedef struct SDL_Mutex SDL_Mutex; * \returns the initialized and unlocked mutex or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DestroyMutex * \sa SDL_LockMutex @@ -175,7 +175,7 @@ extern SDL_DECLSPEC SDL_Mutex * SDLCALL SDL_CreateMutex(void); * * \param mutex the mutex to lock. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_TryLockMutex * \sa SDL_UnlockMutex @@ -196,7 +196,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_LockMutex(SDL_Mutex *mutex) SDL_ACQUIRE(mut * \param mutex the mutex to try to lock. * \returns true on success, false if the mutex would block. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockMutex * \sa SDL_UnlockMutex @@ -215,7 +215,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TryLockMutex(SDL_Mutex *mutex) SDL_TRY_ACQU * * \param mutex the mutex to unlock. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockMutex * \sa SDL_TryLockMutex @@ -233,7 +233,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockMutex(SDL_Mutex *mutex) SDL_RELEASE(m * * \param mutex the mutex to destroy. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateMutex */ @@ -263,7 +263,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_Mutex *mutex); * about how threads are scheduled and when they can be recursively locked. * These are documented in the other rwlock functions. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_RWLock SDL_RWLock; @@ -298,7 +298,7 @@ typedef struct SDL_RWLock SDL_RWLock; * \returns the initialized and unlocked read/write lock or NULL on failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DestroyRWLock * \sa SDL_LockRWLockForReading @@ -338,7 +338,7 @@ extern SDL_DECLSPEC SDL_RWLock * SDLCALL SDL_CreateRWLock(void); * * \param rwlock the read/write lock to lock. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockRWLockForWriting * \sa SDL_TryLockRWLockForReading @@ -369,7 +369,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_LockRWLockForReading(SDL_RWLock *rwlock) SD * * \param rwlock the read/write lock to lock. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockRWLockForReading * \sa SDL_TryLockRWLockForWriting @@ -394,7 +394,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_LockRWLockForWriting(SDL_RWLock *rwlock) SD * \param rwlock the rwlock to try to lock. * \returns true on success, false if the lock would block. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockRWLockForReading * \sa SDL_TryLockRWLockForWriting @@ -424,7 +424,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TryLockRWLockForReading(SDL_RWLock *rwlock) * \param rwlock the rwlock to try to lock. * \returns true on success, false if the lock would block. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockRWLockForWriting * \sa SDL_TryLockRWLockForReading @@ -448,7 +448,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TryLockRWLockForWriting(SDL_RWLock *rwlock) * * \param rwlock the rwlock to unlock. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockRWLockForReading * \sa SDL_LockRWLockForWriting @@ -468,7 +468,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockRWLock(SDL_RWLock *rwlock) SDL_RELEAS * * \param rwlock the rwlock to destroy. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateRWLock */ @@ -494,7 +494,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyRWLock(SDL_RWLock *rwlock); * * https://en.wikipedia.org/wiki/Semaphore_(programming) * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_Semaphore SDL_Semaphore; @@ -511,7 +511,7 @@ typedef struct SDL_Semaphore SDL_Semaphore; * \returns a new semaphore or NULL on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DestroySemaphore * \sa SDL_SignalSemaphore @@ -530,7 +530,7 @@ extern SDL_DECLSPEC SDL_Semaphore * SDLCALL SDL_CreateSemaphore(Uint32 initial_v * * \param sem the semaphore to destroy. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateSemaphore */ @@ -548,7 +548,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_Semaphore *sem); * * \param sem the semaphore wait on. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SignalSemaphore * \sa SDL_TryWaitSemaphore @@ -567,7 +567,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_WaitSemaphore(SDL_Semaphore *sem); * \param sem the semaphore to wait on. * \returns true if the wait succeeds, false if the wait would block. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SignalSemaphore * \sa SDL_WaitSemaphore @@ -587,7 +587,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TryWaitSemaphore(SDL_Semaphore *sem); * indefinitely. * \returns true if the wait succeeds or false if the wait times out. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SignalSemaphore * \sa SDL_TryWaitSemaphore @@ -600,7 +600,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitSemaphoreTimeout(SDL_Semaphore *sem, Si * * \param sem the semaphore to increment. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_TryWaitSemaphore * \sa SDL_WaitSemaphore @@ -614,7 +614,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SignalSemaphore(SDL_Semaphore *sem); * \param sem the semaphore to query. * \returns the current value of the semaphore. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetSemaphoreValue(SDL_Semaphore *sem); @@ -637,7 +637,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetSemaphoreValue(SDL_Semaphore *sem); * * https://en.wikipedia.org/wiki/Condition_variable * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_Condition SDL_Condition; @@ -647,7 +647,7 @@ typedef struct SDL_Condition SDL_Condition; * \returns a new condition variable or NULL on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BroadcastCondition * \sa SDL_SignalCondition @@ -662,7 +662,7 @@ extern SDL_DECLSPEC SDL_Condition * SDLCALL SDL_CreateCondition(void); * * \param cond the condition variable to destroy. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateCondition */ @@ -675,7 +675,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyCondition(SDL_Condition *cond); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BroadcastCondition * \sa SDL_WaitCondition @@ -690,7 +690,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SignalCondition(SDL_Condition *cond); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SignalCondition * \sa SDL_WaitCondition @@ -718,7 +718,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BroadcastCondition(SDL_Condition *cond); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BroadcastCondition * \sa SDL_SignalCondition @@ -748,7 +748,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_WaitCondition(SDL_Condition *cond, SDL_Mute * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BroadcastCondition * \sa SDL_SignalCondition @@ -767,7 +767,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitConditionTimeout(SDL_Condition *cond, /** * The current status of an SDL_InitState structure. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_InitStatus { @@ -831,7 +831,7 @@ typedef enum SDL_InitStatus * should use other mechanisms to protect those, if that's a concern for your * code. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_InitState { @@ -856,7 +856,7 @@ typedef struct SDL_InitState * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetInitialized * \sa SDL_ShouldQuit @@ -877,7 +877,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ShouldInit(SDL_InitState *state); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetInitialized * \sa SDL_ShouldInit @@ -896,7 +896,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ShouldQuit(SDL_InitState *state); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ShouldInit * \sa SDL_ShouldQuit diff --git a/Source/ThirdParty/SDL/SDL3/SDL_oldnames.h b/Source/ThirdParty/SDL/SDL3/SDL_oldnames.h index bd79d594f..d9bb59ec9 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_oldnames.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_oldnames.h @@ -170,14 +170,13 @@ #define SDL_WINDOWEVENT_RESTORED SDL_EVENT_WINDOW_RESTORED #define SDL_WINDOWEVENT_SHOWN SDL_EVENT_WINDOW_SHOWN #define SDL_WINDOWEVENT_SIZE_CHANGED SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED -#define SDL_WINDOWEVENT_TAKE_FOCUS SDL_EVENT_WINDOW_TAKE_FOCUS #define SDL_eventaction SDL_EventAction /* ##SDL_gamecontroller.h */ #define SDL_CONTROLLER_AXIS_INVALID SDL_GAMEPAD_AXIS_INVALID #define SDL_CONTROLLER_AXIS_LEFTX SDL_GAMEPAD_AXIS_LEFTX #define SDL_CONTROLLER_AXIS_LEFTY SDL_GAMEPAD_AXIS_LEFTY -#define SDL_CONTROLLER_AXIS_MAX SDL_GAMEPAD_AXIS_MAX +#define SDL_CONTROLLER_AXIS_MAX SDL_GAMEPAD_AXIS_COUNT #define SDL_CONTROLLER_AXIS_RIGHTX SDL_GAMEPAD_AXIS_RIGHTX #define SDL_CONTROLLER_AXIS_RIGHTY SDL_GAMEPAD_AXIS_RIGHTY #define SDL_CONTROLLER_AXIS_TRIGGERLEFT SDL_GAMEPAD_AXIS_LEFT_TRIGGER @@ -197,7 +196,7 @@ #define SDL_CONTROLLER_BUTTON_INVALID SDL_GAMEPAD_BUTTON_INVALID #define SDL_CONTROLLER_BUTTON_LEFTSHOULDER SDL_GAMEPAD_BUTTON_LEFT_SHOULDER #define SDL_CONTROLLER_BUTTON_LEFTSTICK SDL_GAMEPAD_BUTTON_LEFT_STICK -#define SDL_CONTROLLER_BUTTON_MAX SDL_GAMEPAD_BUTTON_MAX +#define SDL_CONTROLLER_BUTTON_MAX SDL_GAMEPAD_BUTTON_COUNT #define SDL_CONTROLLER_BUTTON_MISC1 SDL_GAMEPAD_BUTTON_MISC1 #define SDL_CONTROLLER_BUTTON_PADDLE1 SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1 #define SDL_CONTROLLER_BUTTON_PADDLE2 SDL_GAMEPAD_BUTTON_LEFT_PADDLE1 @@ -660,6 +659,10 @@ /* ##SDL_video.h */ #define SDL_GL_DeleteContext SDL_GL_DestroyContext +#define SDL_GLattr SDL_GLAttr +#define SDL_GLcontextFlag SDL_GLContextFlag +#define SDL_GLcontextReleaseFlag SDL_GLContextReleaseFlag +#define SDL_GLprofile SDL_GLProfile #define SDL_GetClosestDisplayMode SDL_GetClosestFullscreenDisplayMode #define SDL_GetDisplayOrientation SDL_GetCurrentDisplayOrientation #define SDL_GetPointDisplayIndex SDL_GetDisplayForPoint @@ -808,14 +811,13 @@ #define SDL_WINDOWEVENT_RESTORED SDL_WINDOWEVENT_RESTORED_renamed_SDL_EVENT_WINDOW_RESTORED #define SDL_WINDOWEVENT_SHOWN SDL_WINDOWEVENT_SHOWN_renamed_SDL_EVENT_WINDOW_SHOWN #define SDL_WINDOWEVENT_SIZE_CHANGED SDL_WINDOWEVENT_SIZE_CHANGED_renamed_SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED -#define SDL_WINDOWEVENT_TAKE_FOCUS SDL_WINDOWEVENT_TAKE_FOCUS_renamed_SDL_EVENT_WINDOW_TAKE_FOCUS #define SDL_eventaction SDL_eventaction_renamed_SDL_EventAction /* ##SDL_gamecontroller.h */ #define SDL_CONTROLLER_AXIS_INVALID SDL_CONTROLLER_AXIS_INVALID_renamed_SDL_GAMEPAD_AXIS_INVALID #define SDL_CONTROLLER_AXIS_LEFTX SDL_CONTROLLER_AXIS_LEFTX_renamed_SDL_GAMEPAD_AXIS_LEFTX #define SDL_CONTROLLER_AXIS_LEFTY SDL_CONTROLLER_AXIS_LEFTY_renamed_SDL_GAMEPAD_AXIS_LEFTY -#define SDL_CONTROLLER_AXIS_MAX SDL_CONTROLLER_AXIS_MAX_renamed_SDL_GAMEPAD_AXIS_MAX +#define SDL_CONTROLLER_AXIS_MAX SDL_CONTROLLER_AXIS_MAX_renamed_SDL_GAMEPAD_AXIS_COUNT #define SDL_CONTROLLER_AXIS_RIGHTX SDL_CONTROLLER_AXIS_RIGHTX_renamed_SDL_GAMEPAD_AXIS_RIGHTX #define SDL_CONTROLLER_AXIS_RIGHTY SDL_CONTROLLER_AXIS_RIGHTY_renamed_SDL_GAMEPAD_AXIS_RIGHTY #define SDL_CONTROLLER_AXIS_TRIGGERLEFT SDL_CONTROLLER_AXIS_TRIGGERLEFT_renamed_SDL_GAMEPAD_AXIS_LEFT_TRIGGER @@ -835,7 +837,7 @@ #define SDL_CONTROLLER_BUTTON_INVALID SDL_CONTROLLER_BUTTON_INVALID_renamed_SDL_GAMEPAD_BUTTON_INVALID #define SDL_CONTROLLER_BUTTON_LEFTSHOULDER SDL_CONTROLLER_BUTTON_LEFTSHOULDER_renamed_SDL_GAMEPAD_BUTTON_LEFT_SHOULDER #define SDL_CONTROLLER_BUTTON_LEFTSTICK SDL_CONTROLLER_BUTTON_LEFTSTICK_renamed_SDL_GAMEPAD_BUTTON_LEFT_STICK -#define SDL_CONTROLLER_BUTTON_MAX SDL_CONTROLLER_BUTTON_MAX_renamed_SDL_GAMEPAD_BUTTON_MAX +#define SDL_CONTROLLER_BUTTON_MAX SDL_CONTROLLER_BUTTON_MAX_renamed_SDL_GAMEPAD_BUTTON_COUNT #define SDL_CONTROLLER_BUTTON_MISC1 SDL_CONTROLLER_BUTTON_MISC1_renamed_SDL_GAMEPAD_BUTTON_MISC1 #define SDL_CONTROLLER_BUTTON_PADDLE1 SDL_CONTROLLER_BUTTON_PADDLE1_renamed_SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1 #define SDL_CONTROLLER_BUTTON_PADDLE2 SDL_CONTROLLER_BUTTON_PADDLE2_renamed_SDL_GAMEPAD_BUTTON_LEFT_PADDLE1 @@ -1299,6 +1301,10 @@ /* ##SDL_video.h */ #define SDL_GL_DeleteContext SDL_GL_DeleteContext_renamed_SDL_GL_DestroyContext +#define SDL_GLattr SDL_GLattr_renamed_SDL_GLAttr +#define SDL_GLcontextFlag SDL_GLcontextFlag_renamed_SDL_GLContextFlag +#define SDL_GLcontextReleaseFlag SDL_GLcontextReleaseFlag_renamed_SDL_GLContextReleaseFlag +#define SDL_GLprofile SDL_GLprofile_renamed_SDL_GLProfile #define SDL_GetClosestDisplayMode SDL_GetClosestDisplayMode_renamed_SDL_GetClosestFullscreenDisplayMode #define SDL_GetDisplayOrientation SDL_GetDisplayOrientation_renamed_SDL_GetCurrentDisplayOrientation #define SDL_GetPointDisplayIndex SDL_GetPointDisplayIndex_renamed_SDL_GetDisplayForPoint diff --git a/Source/ThirdParty/SDL/SDL3/SDL_opengl.h b/Source/ThirdParty/SDL/SDL3/SDL_opengl.h index 6bdcbe008..1292f4256 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_opengl.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_opengl.h @@ -783,6 +783,7 @@ typedef double GLclampd; /* double precision float in [0,1] */ * Miscellaneous */ +#ifndef SDL_OPENGL_1_NO_PROTOTYPES GLAPI void GLAPIENTRY glClearIndex( GLfloat c ); GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); @@ -1480,6 +1481,706 @@ GLAPI void GLAPIENTRY glPushName( GLuint name ); GLAPI void GLAPIENTRY glPopName( void ); +#endif +#ifdef SDL_OPENGL_1_FUNCTION_TYPEDEFS + +typedef void (APIENTRYP PFNGLCLEARINDEXPROC) ( GLfloat c ); + +typedef void (APIENTRYP PFNGLCLEARCOLORPROC) ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); + +typedef void (APIENTRYP PFNGLCLEARPROC) ( GLbitfield mask ); + +typedef void (APIENTRYP PFNGLINDEXMASKPROC) ( GLuint mask ); + +typedef void (APIENTRYP PFNGLCOLORMASKPROC) ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ); + +typedef void (APIENTRYP PFNGLALPHAFUNCPROC) ( GLenum func, GLclampf ref ); + +typedef void (APIENTRYP PFNGLBLENDFUNCPROC) ( GLenum sfactor, GLenum dfactor ); + +typedef void (APIENTRYP PFNGLLOGICOPPROC) ( GLenum opcode ); + +typedef void (APIENTRYP PFNGLCULLFACEPROC) ( GLenum mode ); + +typedef void (APIENTRYP PFNGLFRONTFACEPROC) ( GLenum mode ); + +typedef void (APIENTRYP PFNGLPOINTSIZEPROC) ( GLfloat size ); + +typedef void (APIENTRYP PFNGLLINEWIDTHPROC) ( GLfloat width ); + +typedef void (APIENTRYP PFNGLLINESTIPPLEPROC) ( GLint factor, GLushort pattern ); + +typedef void (APIENTRYP PFNGLPOLYGONMODEPROC) ( GLenum face, GLenum mode ); + +typedef void (APIENTRYP PFNGLPOLYGONOFFSETPROC) ( GLfloat factor, GLfloat units ); + +typedef void (APIENTRYP PFNGLPOLYGONSTIPPLEPROC) ( const GLubyte *mask ); + +typedef void (APIENTRYP PFNGLGETPOLYGONSTIPPLEPROC) ( GLubyte *mask ); + +typedef void (APIENTRYP PFNGLEDGEFLAGPROC) ( GLboolean flag ); + +typedef void (APIENTRYP PFNGLEDGEFLAGVPROC) ( const GLboolean *flag ); + +typedef void (APIENTRYP PFNGLSCISSORPROC) ( GLint x, GLint y, GLsizei width, GLsizei height); + +typedef void (APIENTRYP PFNGLCLIPPLANEPROC) ( GLenum plane, const GLdouble *equation ); + +typedef void (APIENTRYP PFNGLGETCLIPPLANEPROC) ( GLenum plane, GLdouble *equation ); + +typedef void (APIENTRYP PFNGLDRAWBUFFERPROC) ( GLenum mode ); + +typedef void (APIENTRYP PFNGLREADBUFFERPROC) ( GLenum mode ); + +typedef void (APIENTRYP PFNGLENABLEPROC) ( GLenum cap ); + +typedef void (APIENTRYP PFNGLDISABLEPROC) ( GLenum cap ); + +typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC) ( GLenum cap ); + + +typedef void (APIENTRYP PFNGLENABLECLIENTSTATEPROC) ( GLenum cap ); /* 1.1 */ + +typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEPROC) ( GLenum cap ); /* 1.1 */ + + +typedef void (APIENTRYP PFNGLGETBOOLEANVPROC) ( GLenum pname, GLboolean *params ); + +typedef void (APIENTRYP PFNGLGETDOUBLEVPROC) ( GLenum pname, GLdouble *params ); + +typedef void (APIENTRYP PFNGLGETFLOATVPROC) ( GLenum pname, GLfloat *params ); + +typedef void (APIENTRYP PFNGLGETINTEGERVPROC) ( GLenum pname, GLint *params ); + + +typedef void (APIENTRYP PFNGLPUSHATTRIBPROC) ( GLbitfield mask ); + +typedef void (APIENTRYP PFNGLPOPATTRIBPROC) ( void ); + + +typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBPROC) ( GLbitfield mask ); /* 1.1 */ + +typedef void (APIENTRYP PFNGLPOPCLIENTATTRIBPROC) ( void ); /* 1.1 */ + + +typedef GLint (APIENTRYP PFNGLRENDERMODEPROC) ( GLenum mode ); + +typedef GLenum (APIENTRYP PFNGLGETERRORPROC) ( void ); + +typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGPROC) ( GLenum name ); + +typedef void (APIENTRYP PFNGLFINISHPROC) ( void ); + +typedef void (APIENTRYP PFNGLFLUSHPROC) ( void ); + +typedef void (APIENTRYP PFNGLHINTPROC) ( GLenum target, GLenum mode ); + + +/* + * Depth Buffer + */ + +typedef void (APIENTRYP PFNGLCLEARDEPTHPROC) ( GLclampd depth ); + +typedef void (APIENTRYP PFNGLDEPTHFUNCPROC) ( GLenum func ); + +typedef void (APIENTRYP PFNGLDEPTHMASKPROC) ( GLboolean flag ); + +typedef void (APIENTRYP PFNGLDEPTHRANGEPROC) ( GLclampd near_val, GLclampd far_val ); + + +/* + * Accumulation Buffer + */ + +typedef void (APIENTRYP PFNGLCLEARACCUMPROC) ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); + +typedef void (APIENTRYP PFNGLACCUMPROC) ( GLenum op, GLfloat value ); + + +/* + * Transformation + */ + +typedef void (APIENTRYP PFNGLMATRIXMODEPROC) ( GLenum mode ); + +typedef void (APIENTRYP PFNGLORTHOPROC) ( GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, + GLdouble near_val, GLdouble far_val ); + +typedef void (APIENTRYP PFNGLFRUSTUMPROC) ( GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, + GLdouble near_val, GLdouble far_val ); + +typedef void (APIENTRYP PFNGLVIEWPORTPROC) ( GLint x, GLint y, + GLsizei width, GLsizei height ); + +typedef void (APIENTRYP PFNGLPUSHMATRIXPROC) ( void ); + +typedef void (APIENTRYP PFNGLPOPMATRIXPROC) ( void ); + +typedef void (APIENTRYP PFNGLLOADIDENTITYPROC) ( void ); + +typedef void (APIENTRYP PFNGLLOADMATRIXDPROC) ( const GLdouble *m ); +typedef void (APIENTRYP PFNGLLOADMATRIXFPROC) ( const GLfloat *m ); + +typedef void (APIENTRYP PFNGLMULTMATRIXDPROC) ( const GLdouble *m ); +typedef void (APIENTRYP PFNGLMULTMATRIXFPROC) ( const GLfloat *m ); + +typedef void (APIENTRYP PFNGLROTATEDPROC) ( GLdouble angle, + GLdouble x, GLdouble y, GLdouble z ); +typedef void (APIENTRYP PFNGLROTATEFPROC) ( GLfloat angle, + GLfloat x, GLfloat y, GLfloat z ); + +typedef void (APIENTRYP PFNGLSCALEDPROC) ( GLdouble x, GLdouble y, GLdouble z ); +typedef void (APIENTRYP PFNGLSCALEFPROC) ( GLfloat x, GLfloat y, GLfloat z ); + +typedef void (APIENTRYP PFNGLTRANSLATEDPROC) ( GLdouble x, GLdouble y, GLdouble z ); +typedef void (APIENTRYP PFNGLTRANSLATEFPROC) ( GLfloat x, GLfloat y, GLfloat z ); + + +/* + * Display Lists + */ + +typedef GLboolean (APIENTRYP PFNGLISLISTPROC) ( GLuint list ); + +typedef void (APIENTRYP PFNGLDELETELISTSPROC) ( GLuint list, GLsizei range ); + +typedef GLuint (APIENTRYP PFNGLGENLISTSPROC) ( GLsizei range ); + +typedef void (APIENTRYP PFNGLNEWLISTPROC) ( GLuint list, GLenum mode ); + +typedef void (APIENTRYP PFNGLENDLISTPROC) ( void ); + +typedef void (APIENTRYP PFNGLCALLLISTPROC) ( GLuint list ); + +typedef void (APIENTRYP PFNGLCALLLISTSPROC) ( GLsizei n, GLenum type, + const GLvoid *lists ); + +typedef void (APIENTRYP PFNGLLISTBASEPROC) ( GLuint base ); + + +/* + * Drawing Functions + */ + +typedef void (APIENTRYP PFNGLBEGINPROC) ( GLenum mode ); + +typedef void (APIENTRYP PFNGLENDPROC) ( void ); + + +typedef void (APIENTRYP PFNGLVERTEX2DPROC) ( GLdouble x, GLdouble y ); +typedef void (APIENTRYP PFNGLVERTEX2FPROC) ( GLfloat x, GLfloat y ); +typedef void (APIENTRYP PFNGLVERTEX2IPROC) ( GLint x, GLint y ); +typedef void (APIENTRYP PFNGLVERTEX2SPROC) ( GLshort x, GLshort y ); + +typedef void (APIENTRYP PFNGLVERTEX3DPROC) ( GLdouble x, GLdouble y, GLdouble z ); +typedef void (APIENTRYP PFNGLVERTEX3FPROC) ( GLfloat x, GLfloat y, GLfloat z ); +typedef void (APIENTRYP PFNGLVERTEX3IPROC) ( GLint x, GLint y, GLint z ); +typedef void (APIENTRYP PFNGLVERTEX3SPROC) ( GLshort x, GLshort y, GLshort z ); + +typedef void (APIENTRYP PFNGLVERTEX4DPROC) ( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +typedef void (APIENTRYP PFNGLVERTEX4FPROC) ( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +typedef void (APIENTRYP PFNGLVERTEX4IPROC) ( GLint x, GLint y, GLint z, GLint w ); +typedef void (APIENTRYP PFNGLVERTEX4SPROC) ( GLshort x, GLshort y, GLshort z, GLshort w ); + +typedef void (APIENTRYP PFNGLVERTEX2DVPROC) ( const GLdouble *v ); +typedef void (APIENTRYP PFNGLVERTEX2FVPROC) ( const GLfloat *v ); +typedef void (APIENTRYP PFNGLVERTEX2IVPROC) ( const GLint *v ); +typedef void (APIENTRYP PFNGLVERTEX2SVPROC) ( const GLshort *v ); + +typedef void (APIENTRYP PFNGLVERTEX3DVPROC) ( const GLdouble *v ); +typedef void (APIENTRYP PFNGLVERTEX3FVPROC) ( const GLfloat *v ); +typedef void (APIENTRYP PFNGLVERTEX3IVPROC) ( const GLint *v ); +typedef void (APIENTRYP PFNGLVERTEX3SVPROC) ( const GLshort *v ); + +typedef void (APIENTRYP PFNGLVERTEX4DVPROC) ( const GLdouble *v ); +typedef void (APIENTRYP PFNGLVERTEX4FVPROC) ( const GLfloat *v ); +typedef void (APIENTRYP PFNGLVERTEX4IVPROC) ( const GLint *v ); +typedef void (APIENTRYP PFNGLVERTEX4SVPROC) ( const GLshort *v ); + + +typedef void (APIENTRYP PFNGLNORMAL3BPROC) ( GLbyte nx, GLbyte ny, GLbyte nz ); +typedef void (APIENTRYP PFNGLNORMAL3DPROC) ( GLdouble nx, GLdouble ny, GLdouble nz ); +typedef void (APIENTRYP PFNGLNORMAL3FPROC) ( GLfloat nx, GLfloat ny, GLfloat nz ); +typedef void (APIENTRYP PFNGLNORMAL3IPROC) ( GLint nx, GLint ny, GLint nz ); +typedef void (APIENTRYP PFNGLNORMAL3SPROC) ( GLshort nx, GLshort ny, GLshort nz ); + +typedef void (APIENTRYP PFNGLNORMAL3BVPROC) ( const GLbyte *v ); +typedef void (APIENTRYP PFNGLNORMAL3DVPROC) ( const GLdouble *v ); +typedef void (APIENTRYP PFNGLNORMAL3FVPROC) ( const GLfloat *v ); +typedef void (APIENTRYP PFNGLNORMAL3IVPROC) ( const GLint *v ); +typedef void (APIENTRYP PFNGLNORMAL3SVPROC) ( const GLshort *v ); + + +typedef void (APIENTRYP PFNGLINDEXDPROC) ( GLdouble c ); +typedef void (APIENTRYP PFNGLINDEXFPROC) ( GLfloat c ); +typedef void (APIENTRYP PFNGLINDEXIPROC) ( GLint c ); +typedef void (APIENTRYP PFNGLINDEXSPROC) ( GLshort c ); +typedef void (APIENTRYP PFNGLINDEXUBPROC) ( GLubyte c ); /* 1.1 */ + +typedef void (APIENTRYP PFNGLINDEXDVPROC) ( const GLdouble *c ); +typedef void (APIENTRYP PFNGLINDEXFVPROC) ( const GLfloat *c ); +typedef void (APIENTRYP PFNGLINDEXIVPROC) ( const GLint *c ); +typedef void (APIENTRYP PFNGLINDEXSVPROC) ( const GLshort *c ); +typedef void (APIENTRYP PFNGLINDEXUBVPROC) ( const GLubyte *c ); /* 1.1 */ + +typedef void (APIENTRYP PFNGLCOLOR3BPROC) ( GLbyte red, GLbyte green, GLbyte blue ); +typedef void (APIENTRYP PFNGLCOLOR3DPROC) ( GLdouble red, GLdouble green, GLdouble blue ); +typedef void (APIENTRYP PFNGLCOLOR3FPROC) ( GLfloat red, GLfloat green, GLfloat blue ); +typedef void (APIENTRYP PFNGLCOLOR3IPROC) ( GLint red, GLint green, GLint blue ); +typedef void (APIENTRYP PFNGLCOLOR3SPROC) ( GLshort red, GLshort green, GLshort blue ); +typedef void (APIENTRYP PFNGLCOLOR3UBPROC) ( GLubyte red, GLubyte green, GLubyte blue ); +typedef void (APIENTRYP PFNGLCOLOR3UIPROC) ( GLuint red, GLuint green, GLuint blue ); +typedef void (APIENTRYP PFNGLCOLOR3USPROC) ( GLushort red, GLushort green, GLushort blue ); + +typedef void (APIENTRYP PFNGLCOLOR4BPROC) ( GLbyte red, GLbyte green, + GLbyte blue, GLbyte alpha ); +typedef void (APIENTRYP PFNGLCOLOR4DPROC) ( GLdouble red, GLdouble green, + GLdouble blue, GLdouble alpha ); +typedef void (APIENTRYP PFNGLCOLOR4FPROC) ( GLfloat red, GLfloat green, + GLfloat blue, GLfloat alpha ); +typedef void (APIENTRYP PFNGLCOLOR4IPROC) ( GLint red, GLint green, + GLint blue, GLint alpha ); +typedef void (APIENTRYP PFNGLCOLOR4SPROC) ( GLshort red, GLshort green, + GLshort blue, GLshort alpha ); +typedef void (APIENTRYP PFNGLCOLOR4UBPROC) ( GLubyte red, GLubyte green, + GLubyte blue, GLubyte alpha ); +typedef void (APIENTRYP PFNGLCOLOR4UIPROC) ( GLuint red, GLuint green, + GLuint blue, GLuint alpha ); +typedef void (APIENTRYP PFNGLCOLOR4USPROC) ( GLushort red, GLushort green, + GLushort blue, GLushort alpha ); + + +typedef void (APIENTRYP PFNGLCOLOR3BVPROC) ( const GLbyte *v ); +typedef void (APIENTRYP PFNGLCOLOR3DVPROC) ( const GLdouble *v ); +typedef void (APIENTRYP PFNGLCOLOR3FVPROC) ( const GLfloat *v ); +typedef void (APIENTRYP PFNGLCOLOR3IVPROC) ( const GLint *v ); +typedef void (APIENTRYP PFNGLCOLOR3SVPROC) ( const GLshort *v ); +typedef void (APIENTRYP PFNGLCOLOR3UBVPROC) ( const GLubyte *v ); +typedef void (APIENTRYP PFNGLCOLOR3UIVPROC) ( const GLuint *v ); +typedef void (APIENTRYP PFNGLCOLOR3USVPROC) ( const GLushort *v ); + +typedef void (APIENTRYP PFNGLCOLOR4BVPROC) ( const GLbyte *v ); +typedef void (APIENTRYP PFNGLCOLOR4DVPROC) ( const GLdouble *v ); +typedef void (APIENTRYP PFNGLCOLOR4FVPROC) ( const GLfloat *v ); +typedef void (APIENTRYP PFNGLCOLOR4IVPROC) ( const GLint *v ); +typedef void (APIENTRYP PFNGLCOLOR4SVPROC) ( const GLshort *v ); +typedef void (APIENTRYP PFNGLCOLOR4UBVPROC) ( const GLubyte *v ); +typedef void (APIENTRYP PFNGLCOLOR4UIVPROC) ( const GLuint *v ); +typedef void (APIENTRYP PFNGLCOLOR4USVPROC) ( const GLushort *v ); + + +typedef void (APIENTRYP PFNGLTEXCOORD1DPROC) ( GLdouble s ); +typedef void (APIENTRYP PFNGLTEXCOORD1FPROC) ( GLfloat s ); +typedef void (APIENTRYP PFNGLTEXCOORD1IPROC) ( GLint s ); +typedef void (APIENTRYP PFNGLTEXCOORD1SPROC) ( GLshort s ); + +typedef void (APIENTRYP PFNGLTEXCOORD2DPROC) ( GLdouble s, GLdouble t ); +typedef void (APIENTRYP PFNGLTEXCOORD2FPROC) ( GLfloat s, GLfloat t ); +typedef void (APIENTRYP PFNGLTEXCOORD2IPROC) ( GLint s, GLint t ); +typedef void (APIENTRYP PFNGLTEXCOORD2SPROC) ( GLshort s, GLshort t ); + +typedef void (APIENTRYP PFNGLTEXCOORD3DPROC) ( GLdouble s, GLdouble t, GLdouble r ); +typedef void (APIENTRYP PFNGLTEXCOORD3FPROC) ( GLfloat s, GLfloat t, GLfloat r ); +typedef void (APIENTRYP PFNGLTEXCOORD3IPROC) ( GLint s, GLint t, GLint r ); +typedef void (APIENTRYP PFNGLTEXCOORD3SPROC) ( GLshort s, GLshort t, GLshort r ); + +typedef void (APIENTRYP PFNGLTEXCOORD4DPROC) ( GLdouble s, GLdouble t, GLdouble r, GLdouble q ); +typedef void (APIENTRYP PFNGLTEXCOORD4FPROC) ( GLfloat s, GLfloat t, GLfloat r, GLfloat q ); +typedef void (APIENTRYP PFNGLTEXCOORD4IPROC) ( GLint s, GLint t, GLint r, GLint q ); +typedef void (APIENTRYP PFNGLTEXCOORD4SPROC) ( GLshort s, GLshort t, GLshort r, GLshort q ); + +typedef void (APIENTRYP PFNGLTEXCOORD1DVPROC) ( const GLdouble *v ); +typedef void (APIENTRYP PFNGLTEXCOORD1FVPROC) ( const GLfloat *v ); +typedef void (APIENTRYP PFNGLTEXCOORD1IVPROC) ( const GLint *v ); +typedef void (APIENTRYP PFNGLTEXCOORD1SVPROC) ( const GLshort *v ); + +typedef void (APIENTRYP PFNGLTEXCOORD2DVPROC) ( const GLdouble *v ); +typedef void (APIENTRYP PFNGLTEXCOORD2FVPROC) ( const GLfloat *v ); +typedef void (APIENTRYP PFNGLTEXCOORD2IVPROC) ( const GLint *v ); +typedef void (APIENTRYP PFNGLTEXCOORD2SVPROC) ( const GLshort *v ); + +typedef void (APIENTRYP PFNGLTEXCOORD3DVPROC) ( const GLdouble *v ); +typedef void (APIENTRYP PFNGLTEXCOORD3FVPROC) ( const GLfloat *v ); +typedef void (APIENTRYP PFNGLTEXCOORD3IVPROC) ( const GLint *v ); +typedef void (APIENTRYP PFNGLTEXCOORD3SVPROC) ( const GLshort *v ); + +typedef void (APIENTRYP PFNGLTEXCOORD4DVPROC) ( const GLdouble *v ); +typedef void (APIENTRYP PFNGLTEXCOORD4FVPROC) ( const GLfloat *v ); +typedef void (APIENTRYP PFNGLTEXCOORD4IVPROC) ( const GLint *v ); +typedef void (APIENTRYP PFNGLTEXCOORD4SVPROC) ( const GLshort *v ); + + +typedef void (APIENTRYP PFNGLRASTERPOS2DPROC) ( GLdouble x, GLdouble y ); +typedef void (APIENTRYP PFNGLRASTERPOS2FPROC) ( GLfloat x, GLfloat y ); +typedef void (APIENTRYP PFNGLRASTERPOS2IPROC) ( GLint x, GLint y ); +typedef void (APIENTRYP PFNGLRASTERPOS2SPROC) ( GLshort x, GLshort y ); + +typedef void (APIENTRYP PFNGLRASTERPOS3DPROC) ( GLdouble x, GLdouble y, GLdouble z ); +typedef void (APIENTRYP PFNGLRASTERPOS3FPROC) ( GLfloat x, GLfloat y, GLfloat z ); +typedef void (APIENTRYP PFNGLRASTERPOS3IPROC) ( GLint x, GLint y, GLint z ); +typedef void (APIENTRYP PFNGLRASTERPOS3SPROC) ( GLshort x, GLshort y, GLshort z ); + +typedef void (APIENTRYP PFNGLRASTERPOS4DPROC) ( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +typedef void (APIENTRYP PFNGLRASTERPOS4FPROC) ( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +typedef void (APIENTRYP PFNGLRASTERPOS4IPROC) ( GLint x, GLint y, GLint z, GLint w ); +typedef void (APIENTRYP PFNGLRASTERPOS4SPROC) ( GLshort x, GLshort y, GLshort z, GLshort w ); + +typedef void (APIENTRYP PFNGLRASTERPOS2DVPROC) ( const GLdouble *v ); +typedef void (APIENTRYP PFNGLRASTERPOS2FVPROC) ( const GLfloat *v ); +typedef void (APIENTRYP PFNGLRASTERPOS2IVPROC) ( const GLint *v ); +typedef void (APIENTRYP PFNGLRASTERPOS2SVPROC) ( const GLshort *v ); + +typedef void (APIENTRYP PFNGLRASTERPOS3DVPROC) ( const GLdouble *v ); +typedef void (APIENTRYP PFNGLRASTERPOS3FVPROC) ( const GLfloat *v ); +typedef void (APIENTRYP PFNGLRASTERPOS3IVPROC) ( const GLint *v ); +typedef void (APIENTRYP PFNGLRASTERPOS3SVPROC) ( const GLshort *v ); + +typedef void (APIENTRYP PFNGLRASTERPOS4DVPROC) ( const GLdouble *v ); +typedef void (APIENTRYP PFNGLRASTERPOS4FVPROC) ( const GLfloat *v ); +typedef void (APIENTRYP PFNGLRASTERPOS4IVPROC) ( const GLint *v ); +typedef void (APIENTRYP PFNGLRASTERPOS4SVPROC) ( const GLshort *v ); + + +typedef void (APIENTRYP PFNGLRECTDPROC) ( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 ); +typedef void (APIENTRYP PFNGLRECTFPROC) ( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ); +typedef void (APIENTRYP PFNGLRECTIPROC) ( GLint x1, GLint y1, GLint x2, GLint y2 ); +typedef void (APIENTRYP PFNGLRECTSPROC) ( GLshort x1, GLshort y1, GLshort x2, GLshort y2 ); + + +typedef void (APIENTRYP PFNGLRECTDVPROC) ( const GLdouble *v1, const GLdouble *v2 ); +typedef void (APIENTRYP PFNGLRECTFVPROC) ( const GLfloat *v1, const GLfloat *v2 ); +typedef void (APIENTRYP PFNGLRECTIVPROC) ( const GLint *v1, const GLint *v2 ); +typedef void (APIENTRYP PFNGLRECTSVPROC) ( const GLshort *v1, const GLshort *v2 ); + + +/* + * Vertex Arrays (1.1) + */ + +typedef void (APIENTRYP PFNGLVERTEXPOINTERPROC) ( GLint size, GLenum type, + GLsizei stride, const GLvoid *ptr ); + +typedef void (APIENTRYP PFNGLNORMALPOINTERPROC) ( GLenum type, GLsizei stride, + const GLvoid *ptr ); + +typedef void (APIENTRYP PFNGLCOLORPOINTERPROC) ( GLint size, GLenum type, + GLsizei stride, const GLvoid *ptr ); + +typedef void (APIENTRYP PFNGLINDEXPOINTERPROC) ( GLenum type, GLsizei stride, + const GLvoid *ptr ); + +typedef void (APIENTRYP PFNGLTEXCOORDPOINTERPROC) ( GLint size, GLenum type, + GLsizei stride, const GLvoid *ptr ); + +typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERPROC) ( GLsizei stride, const GLvoid *ptr ); + +typedef void (APIENTRYP PFNGLGETPOINTERVPROC) ( GLenum pname, GLvoid **params ); + +typedef void (APIENTRYP PFNGLARRAYELEMENTPROC) ( GLint i ); + +typedef void (APIENTRYP PFNGLDRAWARRAYSPROC) ( GLenum mode, GLint first, GLsizei count ); + +typedef void (APIENTRYP PFNGLDRAWELEMENTSPROC) ( GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices ); + +typedef void (APIENTRYP PFNGLINTERLEAVEDARRAYSPROC) ( GLenum format, GLsizei stride, + const GLvoid *pointer ); + +/* + * Lighting + */ + +typedef void (APIENTRYP PFNGLSHADEMODELPROC) ( GLenum mode ); + +typedef void (APIENTRYP PFNGLLIGHTFPROC) ( GLenum light, GLenum pname, GLfloat param ); +typedef void (APIENTRYP PFNGLLIGHTIPROC) ( GLenum light, GLenum pname, GLint param ); +typedef void (APIENTRYP PFNGLLIGHTFVPROC) ( GLenum light, GLenum pname, + const GLfloat *params ); +typedef void (APIENTRYP PFNGLLIGHTIVPROC) ( GLenum light, GLenum pname, + const GLint *params ); + +typedef void (APIENTRYP PFNGLGETLIGHTFVPROC) ( GLenum light, GLenum pname, + GLfloat *params ); +typedef void (APIENTRYP PFNGLGETLIGHTIVPROC) ( GLenum light, GLenum pname, + GLint *params ); + +typedef void (APIENTRYP PFNGLLIGHTMODELFPROC) ( GLenum pname, GLfloat param ); +typedef void (APIENTRYP PFNGLLIGHTMODELIPROC) ( GLenum pname, GLint param ); +typedef void (APIENTRYP PFNGLLIGHTMODELFVPROC) ( GLenum pname, const GLfloat *params ); +typedef void (APIENTRYP PFNGLLIGHTMODELIVPROC) ( GLenum pname, const GLint *params ); + +typedef void (APIENTRYP PFNGLMATERIALFPROC) ( GLenum face, GLenum pname, GLfloat param ); +typedef void (APIENTRYP PFNGLMATERIALIPROC) ( GLenum face, GLenum pname, GLint param ); +typedef void (APIENTRYP PFNGLMATERIALFVPROC) ( GLenum face, GLenum pname, const GLfloat *params ); +typedef void (APIENTRYP PFNGLMATERIALIVPROC) ( GLenum face, GLenum pname, const GLint *params ); + +typedef void (APIENTRYP PFNGLGETMATERIALFVPROC) ( GLenum face, GLenum pname, GLfloat *params ); +typedef void (APIENTRYP PFNGLGETMATERIALIVPROC) ( GLenum face, GLenum pname, GLint *params ); + +typedef void (APIENTRYP PFNGLCOLORMATERIALPROC) ( GLenum face, GLenum mode ); + + +/* + * Raster functions + */ + +typedef void (APIENTRYP PFNGLPIXELZOOMPROC) ( GLfloat xfactor, GLfloat yfactor ); + +typedef void (APIENTRYP PFNGLPIXELSTOREFPROC) ( GLenum pname, GLfloat param ); +typedef void (APIENTRYP PFNGLPIXELSTOREIPROC) ( GLenum pname, GLint param ); + +typedef void (APIENTRYP PFNGLPIXELTRANSFERFPROC) ( GLenum pname, GLfloat param ); +typedef void (APIENTRYP PFNGLPIXELTRANSFERIPROC) ( GLenum pname, GLint param ); + +typedef void (APIENTRYP PFNGLPIXELMAPFVPROC) ( GLenum map, GLsizei mapsize, + const GLfloat *values ); +typedef void (APIENTRYP PFNGLPIXELMAPUIVPROC) ( GLenum map, GLsizei mapsize, + const GLuint *values ); +typedef void (APIENTRYP PFNGLPIXELMAPUSVPROC) ( GLenum map, GLsizei mapsize, + const GLushort *values ); + +typedef void (APIENTRYP PFNGLGETPIXELMAPFVPROC) ( GLenum map, GLfloat *values ); +typedef void (APIENTRYP PFNGLGETPIXELMAPUIVPROC) ( GLenum map, GLuint *values ); +typedef void (APIENTRYP PFNGLGETPIXELMAPUSVPROC) ( GLenum map, GLushort *values ); + +typedef void (APIENTRYP PFNGLBITMAPPROC) ( GLsizei width, GLsizei height, + GLfloat xorig, GLfloat yorig, + GLfloat xmove, GLfloat ymove, + const GLubyte *bitmap ); + +typedef void (APIENTRYP PFNGLREADPIXELSPROC) ( GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + GLvoid *pixels ); + +typedef void (APIENTRYP PFNGLDRAWPIXELSPROC) ( GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels ); + +typedef void (APIENTRYP PFNGLCOPYPIXELSPROC) ( GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum type ); + +/* + * Stenciling + */ + +typedef void (APIENTRYP PFNGLSTENCILFUNCPROC) ( GLenum func, GLint ref, GLuint mask ); + +typedef void (APIENTRYP PFNGLSTENCILMASKPROC) ( GLuint mask ); + +typedef void (APIENTRYP PFNGLSTENCILOPPROC) ( GLenum fail, GLenum zfail, GLenum zpass ); + +typedef void (APIENTRYP PFNGLCLEARSTENCILPROC) ( GLint s ); + + + +/* + * Texture mapping + */ + +typedef void (APIENTRYP PFNGLTEXGENDPROC) ( GLenum coord, GLenum pname, GLdouble param ); +typedef void (APIENTRYP PFNGLTEXGENFPROC) ( GLenum coord, GLenum pname, GLfloat param ); +typedef void (APIENTRYP PFNGLTEXGENIPROC) ( GLenum coord, GLenum pname, GLint param ); + +typedef void (APIENTRYP PFNGLTEXGENDVPROC) ( GLenum coord, GLenum pname, const GLdouble *params ); +typedef void (APIENTRYP PFNGLTEXGENFVPROC) ( GLenum coord, GLenum pname, const GLfloat *params ); +typedef void (APIENTRYP PFNGLTEXGENIVPROC) ( GLenum coord, GLenum pname, const GLint *params ); + +typedef void (APIENTRYP PFNGLGETTEXGENDVPROC) ( GLenum coord, GLenum pname, GLdouble *params ); +typedef void (APIENTRYP PFNGLGETTEXGENFVPROC) ( GLenum coord, GLenum pname, GLfloat *params ); +typedef void (APIENTRYP PFNGLGETTEXGENIVPROC) ( GLenum coord, GLenum pname, GLint *params ); + + +typedef void (APIENTRYP PFNGLTEXENVFPROC) ( GLenum target, GLenum pname, GLfloat param ); +typedef void (APIENTRYP PFNGLTEXENVIPROC) ( GLenum target, GLenum pname, GLint param ); + +typedef void (APIENTRYP PFNGLTEXENVFVPROC) ( GLenum target, GLenum pname, const GLfloat *params ); +typedef void (APIENTRYP PFNGLTEXENVIVPROC) ( GLenum target, GLenum pname, const GLint *params ); + +typedef void (APIENTRYP PFNGLGETTEXENVFVPROC) ( GLenum target, GLenum pname, GLfloat *params ); +typedef void (APIENTRYP PFNGLGETTEXENVIVPROC) ( GLenum target, GLenum pname, GLint *params ); + + +typedef void (APIENTRYP PFNGLTEXPARAMETERFPROC) ( GLenum target, GLenum pname, GLfloat param ); +typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC) ( GLenum target, GLenum pname, GLint param ); + +typedef void (APIENTRYP PFNGLTEXPARAMETERFVPROC) ( GLenum target, GLenum pname, + const GLfloat *params ); +typedef void (APIENTRYP PFNGLTEXPARAMETERIVPROC) ( GLenum target, GLenum pname, + const GLint *params ); + +typedef void (APIENTRYP PFNGLGETTEXPARAMETERFVPROC) ( GLenum target, + GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIVPROC) ( GLenum target, + GLenum pname, GLint *params ); + +typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC) ( GLenum target, GLint level, + GLenum pname, GLfloat *params ); +typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC) ( GLenum target, GLint level, + GLenum pname, GLint *params ); + + +typedef void (APIENTRYP PFNGLTEXIMAGE1DPROC) ( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ); + +typedef void (APIENTRYP PFNGLTEXIMAGE2DPROC) ( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, + const GLvoid *pixels ); + +typedef void (APIENTRYP PFNGLGETTEXIMAGEPROC) ( GLenum target, GLint level, + GLenum format, GLenum type, + GLvoid *pixels ); + + +/* 1.1 functions */ + +typedef void (APIENTRYP PFNGLGENTEXTURESPROC) ( GLsizei n, GLuint *textures ); + +typedef void (APIENTRYP PFNGLDELETETEXTURESPROC) ( GLsizei n, const GLuint *textures); + +typedef void (APIENTRYP PFNGLBINDTEXTUREPROC) ( GLenum target, GLuint texture ); + +typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESPROC) ( GLsizei n, + const GLuint *textures, + const GLclampf *priorities ); + +typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTPROC) ( GLsizei n, + const GLuint *textures, + GLboolean *residences ); + +typedef GLboolean (APIENTRYP PFNGLISTEXTUREPROC) ( GLuint texture ); + + +typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DPROC) ( GLenum target, GLint level, + GLint xoffset, + GLsizei width, GLenum format, + GLenum type, const GLvoid *pixels ); + + +typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DPROC) ( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels ); + + +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DPROC) ( GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, + GLsizei width, GLint border ); + + +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) ( GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, + GLsizei width, GLsizei height, + GLint border ); + + +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DPROC) ( GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, + GLsizei width ); + + +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) ( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint x, GLint y, + GLsizei width, GLsizei height ); + + +/* + * Evaluators + */ + +typedef void (APIENTRYP PFNGLMAP1DPROC) ( GLenum target, GLdouble u1, GLdouble u2, + GLint stride, + GLint order, const GLdouble *points ); +typedef void (APIENTRYP PFNGLMAP1FPROC) ( GLenum target, GLfloat u1, GLfloat u2, + GLint stride, + GLint order, const GLfloat *points ); + +typedef void (APIENTRYP PFNGLMAP2DPROC) ( GLenum target, + GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, + GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, + const GLdouble *points ); +typedef void (APIENTRYP PFNGLMAP2FPROC) ( GLenum target, + GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, + GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, + const GLfloat *points ); + +typedef void (APIENTRYP PFNGLGETMAPDVPROC) ( GLenum target, GLenum query, GLdouble *v ); +typedef void (APIENTRYP PFNGLGETMAPFVPROC) ( GLenum target, GLenum query, GLfloat *v ); +typedef void (APIENTRYP PFNGLGETMAPIVPROC) ( GLenum target, GLenum query, GLint *v ); + +typedef void (APIENTRYP PFNGLEVALCOORD1DPROC) ( GLdouble u ); +typedef void (APIENTRYP PFNGLEVALCOORD1FPROC) ( GLfloat u ); + +typedef void (APIENTRYP PFNGLEVALCOORD1DVPROC) ( const GLdouble *u ); +typedef void (APIENTRYP PFNGLEVALCOORD1FVPROC) ( const GLfloat *u ); + +typedef void (APIENTRYP PFNGLEVALCOORD2DPROC) ( GLdouble u, GLdouble v ); +typedef void (APIENTRYP PFNGLEVALCOORD2FPROC) ( GLfloat u, GLfloat v ); + +typedef void (APIENTRYP PFNGLEVALCOORD2DVPROC) ( const GLdouble *u ); +typedef void (APIENTRYP PFNGLEVALCOORD2FVPROC) ( const GLfloat *u ); + +typedef void (APIENTRYP PFNGLMAPGRID1DPROC) ( GLint un, GLdouble u1, GLdouble u2 ); +typedef void (APIENTRYP PFNGLMAPGRID1FPROC) ( GLint un, GLfloat u1, GLfloat u2 ); + +typedef void (APIENTRYP PFNGLMAPGRID2DPROC) ( GLint un, GLdouble u1, GLdouble u2, + GLint vn, GLdouble v1, GLdouble v2 ); +typedef void (APIENTRYP PFNGLMAPGRID2FPROC) ( GLint un, GLfloat u1, GLfloat u2, + GLint vn, GLfloat v1, GLfloat v2 ); + +typedef void (APIENTRYP PFNGLEVALPOINT1PROC) ( GLint i ); + +typedef void (APIENTRYP PFNGLEVALPOINT2PROC) ( GLint i, GLint j ); + +typedef void (APIENTRYP PFNGLEVALMESH1PROC) ( GLenum mode, GLint i1, GLint i2 ); + +typedef void (APIENTRYP PFNGLEVALMESH2PROC) ( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); + + +/* + * Fog + */ + +typedef void (APIENTRYP PFNGLFOGFPROC) ( GLenum pname, GLfloat param ); + +typedef void (APIENTRYP PFNGLFOGIPROC) ( GLenum pname, GLint param ); + +typedef void (APIENTRYP PFNGLFOGFVPROC) ( GLenum pname, const GLfloat *params ); + +typedef void (APIENTRYP PFNGLFOGIVPROC) ( GLenum pname, const GLint *params ); + + +/* + * Selection and Feedback + */ + +typedef void (APIENTRYP PFNGLFEEDBACKBUFFERPROC) ( GLsizei size, GLenum type, GLfloat *buffer ); + +typedef void (APIENTRYP PFNGLPASSTHROUGHPROC) ( GLfloat token ); + +typedef void (APIENTRYP PFNGLSELECTBUFFERPROC) ( GLsizei size, GLuint *buffer ); + +typedef void (APIENTRYP PFNGLINITNAMESPROC) ( void ); + +typedef void (APIENTRYP PFNGLLOADNAMEPROC) ( GLuint name ); + +typedef void (APIENTRYP PFNGLPUSHNAMEPROC) ( GLuint name ); + +typedef void (APIENTRYP PFNGLPOPNAMEPROC) ( void ); +#endif /* @@ -1528,6 +2229,8 @@ GLAPI void GLAPIENTRY glPopName( void ); #define GL_MAX_3D_TEXTURE_SIZE 0x8073 #define GL_TEXTURE_BINDING_3D 0x806A +#ifndef SDL_OPENGL_1_NO_PROTOTYPES + GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); @@ -1551,6 +2254,34 @@ GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level, GLint y, GLsizei width, GLsizei height ); +#endif +#ifdef SDL_OPENGL_1_FUNCTION_TYPEDEFS + +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) ( GLenum mode, GLuint start, + GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); + +typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) ( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLsizei height, + GLsizei depth, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ); + +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) ( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLenum format, + GLenum type, const GLvoid *pixels); + +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) ( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLint x, + GLint y, GLsizei width, + GLsizei height ); + +#endif + typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); @@ -1638,6 +2369,8 @@ typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, #define GL_BLEND_COLOR 0x8005 +#ifndef SDL_OPENGL_1_NO_PROTOTYPES + GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table ); @@ -1746,6 +2479,119 @@ GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target, GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ); +#endif +#ifdef SDL_OPENGL_1_FUNCTION_TYPEDEFS + +typedef void (APIENTRYP PFNGLCOLORTABLEPROC) ( GLenum target, GLenum internalformat, + GLsizei width, GLenum format, + GLenum type, const GLvoid *table ); + +typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) ( GLenum target, + GLsizei start, GLsizei count, + GLenum format, GLenum type, + const GLvoid *data ); + +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, + const GLint *params); + +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, + const GLfloat *params); + +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) ( GLenum target, GLsizei start, + GLint x, GLint y, GLsizei width ); + +typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) ( GLenum target, GLenum internalformat, + GLint x, GLint y, GLsizei width ); + +typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) ( GLenum target, GLenum format, + GLenum type, GLvoid *table ); + +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) ( GLenum target, GLenum pname, + GLfloat *params ); + +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) ( GLenum target, GLenum pname, + GLint *params ); + +typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) ( GLenum mode ); + +typedef void (APIENTRYP PFNGLBLENDCOLORPROC) ( GLclampf red, GLclampf green, + GLclampf blue, GLclampf alpha ); + +typedef void (APIENTRYP PFNGLHISTOGRAMPROC) ( GLenum target, GLsizei width, + GLenum internalformat, GLboolean sink ); + +typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) ( GLenum target ); + +typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) ( GLenum target, GLboolean reset, + GLenum format, GLenum type, + GLvoid *values ); + +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) ( GLenum target, GLenum pname, + GLfloat *params ); + +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) ( GLenum target, GLenum pname, + GLint *params ); + +typedef void (APIENTRYP PFNGLMINMAXPROC) ( GLenum target, GLenum internalformat, + GLboolean sink ); + +typedef void (APIENTRYP PFNGLRESETMINMAXPROC) ( GLenum target ); + +typedef void (APIENTRYP PFNGLGETMINMAXPROC) ( GLenum target, GLboolean reset, + GLenum format, GLenum types, + GLvoid *values ); + +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) ( GLenum target, GLenum pname, + GLfloat *params ); + +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) ( GLenum target, GLenum pname, + GLint *params ); + +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) ( GLenum target, + GLenum internalformat, GLsizei width, GLenum format, GLenum type, + const GLvoid *image ); + +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) ( GLenum target, + GLenum internalformat, GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *image ); + +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) ( GLenum target, GLenum pname, + GLfloat params ); + +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) ( GLenum target, GLenum pname, + const GLfloat *params ); + +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) ( GLenum target, GLenum pname, + GLint params ); + +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) ( GLenum target, GLenum pname, + const GLint *params ); + +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) ( GLenum target, + GLenum internalformat, GLint x, GLint y, GLsizei width ); + +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) ( GLenum target, + GLenum internalformat, GLint x, GLint y, GLsizei width, + GLsizei height); + +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) ( GLenum target, GLenum format, + GLenum type, GLvoid *image ); + +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) ( GLenum target, GLenum pname, + GLfloat *params ); + +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) ( GLenum target, GLenum pname, + GLint *params ); + +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) ( GLenum target, + GLenum internalformat, GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *row, const GLvoid *column ); + +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) ( GLenum target, GLenum format, + GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ); + +#endif + @@ -1858,6 +2704,8 @@ GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format, /* texture_border_clamp */ #define GL_CLAMP_TO_BORDER 0x812D +#ifndef SDL_OPENGL_1_NO_PROTOTYPES + GLAPI void GLAPIENTRY glActiveTexture( GLenum texture ); GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture ); @@ -1951,6 +2799,104 @@ GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] ); GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert ); +#endif +#ifdef SDL_OPENGL_1_FUNCTION_TYPEDEFS + +typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) ( GLenum texture ); + +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) ( GLenum texture ); + +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data ); + +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ); + +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ); + +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) ( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data ); + +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ); + +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ); + +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) ( GLenum target, GLint lod, GLvoid *img ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) ( GLenum target, GLdouble s ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) ( GLenum target, const GLdouble *v ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) ( GLenum target, GLfloat s ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) ( GLenum target, const GLfloat *v ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) ( GLenum target, GLint s ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) ( GLenum target, const GLint *v ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) ( GLenum target, GLshort s ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) ( GLenum target, const GLshort *v ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) ( GLenum target, GLdouble s, GLdouble t ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) ( GLenum target, const GLdouble *v ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) ( GLenum target, GLfloat s, GLfloat t ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) ( GLenum target, const GLfloat *v ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) ( GLenum target, GLint s, GLint t ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) ( GLenum target, const GLint *v ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) ( GLenum target, GLshort s, GLshort t ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) ( GLenum target, const GLshort *v ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) ( GLenum target, GLdouble s, GLdouble t, GLdouble r ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) ( GLenum target, const GLdouble *v ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) ( GLenum target, GLfloat s, GLfloat t, GLfloat r ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) ( GLenum target, const GLfloat *v ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) ( GLenum target, GLint s, GLint t, GLint r ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) ( GLenum target, const GLint *v ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) ( GLenum target, GLshort s, GLshort t, GLshort r ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) ( GLenum target, const GLshort *v ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) ( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) ( GLenum target, const GLdouble *v ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) ( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) ( GLenum target, const GLfloat *v ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) ( GLenum target, GLint s, GLint t, GLint r, GLint q ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) ( GLenum target, const GLint *v ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) ( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ); + +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) ( GLenum target, const GLshort *v ); + + +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) ( const GLdouble m[16] ); + +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) ( const GLfloat m[16] ); + +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) ( const GLdouble m[16] ); + +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) ( const GLfloat m[16] ); + +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) ( GLclampf value, GLboolean invert ); + +#endif + typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); @@ -2006,6 +2952,8 @@ typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint le #define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 +#ifndef SDL_OPENGL_1_NO_PROTOTYPES + GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture); GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture); GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s); @@ -2041,6 +2989,46 @@ GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v); GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v); +#endif +#ifdef SDL_OPENGL_1_FUNCTION_TYPEDEFS + +typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); + +#endif + typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_pen.h b/Source/ThirdParty/SDL/SDL3/SDL_pen.h index 77c7bed9a..6f0eef50f 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_pen.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_pen.h @@ -55,7 +55,7 @@ extern "C" { * consistent as long as SDL can recognize a tool to be the same pen; but if a * pen physically leaves the area and returns, it might get a new ID. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_PenID; @@ -63,7 +63,7 @@ typedef Uint32 SDL_PenID; /** * Pen input flags, as reported by various pen events' `pen_state` field. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_PenInputFlags; @@ -88,7 +88,7 @@ typedef Uint32 SDL_PenInputFlags; * * `SDL_sinf(xtilt * SDL_PI_F / 180.0)`. * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 */ typedef enum SDL_PenAxis { diff --git a/Source/ThirdParty/SDL/SDL3/SDL_pixels.h b/Source/ThirdParty/SDL/SDL3/SDL_pixels.h index 820e29957..eb6ff5018 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_pixels.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_pixels.h @@ -41,7 +41,7 @@ extern "C" { /** * A fully opaque 8-bit alpha value. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_ALPHA_TRANSPARENT */ @@ -50,7 +50,7 @@ extern "C" { /** * A fully opaque floating point alpha value. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_ALPHA_TRANSPARENT_FLOAT */ @@ -59,7 +59,7 @@ extern "C" { /** * A fully transparent 8-bit alpha value. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_ALPHA_OPAQUE */ @@ -68,7 +68,7 @@ extern "C" { /** * A fully transparent floating point alpha value. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_ALPHA_OPAQUE_FLOAT */ @@ -77,7 +77,7 @@ extern "C" { /** * Pixel type. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_PixelType { @@ -100,7 +100,7 @@ typedef enum SDL_PixelType /** * Bitmap pixel order, high bit -> low bit. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_BitmapOrder { @@ -112,7 +112,7 @@ typedef enum SDL_BitmapOrder /** * Packed component order, high bit -> low bit. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_PackedOrder { @@ -130,7 +130,7 @@ typedef enum SDL_PackedOrder /** * Array component order, low byte -> high byte. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_ArrayOrder { @@ -146,7 +146,7 @@ typedef enum SDL_ArrayOrder /** * Packed component layout. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_PackedLayout { @@ -201,13 +201,6 @@ typedef enum SDL_PackedLayout (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF16) || \ (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF32))) -#define SDL_ISPIXELFORMAT_ALPHA(format) \ - ((SDL_ISPIXELFORMAT_PACKED(format) && \ - ((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || \ - (SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || \ - (SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || \ - (SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA)))) - #define SDL_ISPIXELFORMAT_10BIT(format) \ (!SDL_ISPIXELFORMAT_FOURCC(format) && \ ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED32) && \ @@ -218,6 +211,18 @@ typedef enum SDL_PackedLayout ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF16) || \ (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF32))) +#define SDL_ISPIXELFORMAT_ALPHA(format) \ + ((SDL_ISPIXELFORMAT_PACKED(format) && \ + ((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || \ + (SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || \ + (SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || \ + (SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA))) || \ + (SDL_ISPIXELFORMAT_ARRAY(format) && \ + ((SDL_PIXELORDER(format) == SDL_ARRAYORDER_ARGB) || \ + (SDL_PIXELORDER(format) == SDL_ARRAYORDER_RGBA) || \ + (SDL_PIXELORDER(format) == SDL_ARRAYORDER_ABGR) || \ + (SDL_PIXELORDER(format) == SDL_ARRAYORDER_BGRA)))) + /* The flag is set to 1 because 0x1? is not in the printable ASCII range */ #define SDL_ISPIXELFORMAT_FOURCC(format) \ ((format) && (SDL_PIXELFLAG(format) != 1)) @@ -259,7 +264,7 @@ typedef enum SDL_PackedLayout * an alias for ABGR8888 on little-endian CPUs like x86, or an alias for * RGBA8888 on big-endian CPUs. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_PixelFormat { @@ -441,7 +446,7 @@ typedef enum SDL_PixelFormat /** * Colorspace color type. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_ColorType { @@ -454,7 +459,7 @@ typedef enum SDL_ColorType * Colorspace color range, as described by * https://www.itu.int/rec/R-REC-BT.2100-2-201807-I/en * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_ColorRange { @@ -467,7 +472,7 @@ typedef enum SDL_ColorRange * Colorspace color primaries, as described by * https://www.itu.int/rec/T-REC-H.273-201612-S/en * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_ColorPrimaries { @@ -492,7 +497,7 @@ typedef enum SDL_ColorPrimaries * * These are as described by https://www.itu.int/rec/T-REC-H.273-201612-S/en * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_TransferCharacteristics { @@ -522,7 +527,7 @@ typedef enum SDL_TransferCharacteristics * * These are as described by https://www.itu.int/rec/T-REC-H.273-201612-S/en * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_MatrixCoefficients { @@ -546,7 +551,7 @@ typedef enum SDL_MatrixCoefficients /** * Colorspace chroma sample location. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_ChromaLocation { @@ -582,7 +587,7 @@ typedef enum SDL_ChromaLocation * function, etc.), this is not an exhaustive list, but rather a * representative sample of the kinds of colorspaces supported in SDL. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. * * \sa SDL_ColorPrimaries * \sa SDL_ColorRange @@ -689,7 +694,7 @@ typedef enum SDL_Colorspace * (SDL_PIXELFORMAT_ABGR8888 on little-endian systems and * SDL_PIXELFORMAT_RGBA8888 on big-endian systems). * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_Color { @@ -703,7 +708,7 @@ typedef struct SDL_Color * The bits of this structure can be directly reinterpreted as a float-packed * color which uses the SDL_PIXELFORMAT_RGBA128_FLOAT format * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_FColor { @@ -716,7 +721,7 @@ typedef struct SDL_FColor /** * A set of indexed colors representing a palette. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_SetPaletteColors */ @@ -731,7 +736,7 @@ typedef struct SDL_Palette /** * Details about the format of a pixel. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_PixelFormatDetails { @@ -762,7 +767,7 @@ typedef struct SDL_PixelFormatDetails * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetPixelFormatName(SDL_PixelFormat format); @@ -780,7 +785,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetPixelFormatName(SDL_PixelFormat * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPixelFormatForMasks */ @@ -802,7 +807,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetMasksForPixelFormat(SDL_PixelFormat form * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetMasksForPixelFormat */ @@ -821,7 +826,7 @@ extern SDL_DECLSPEC SDL_PixelFormat SDLCALL SDL_GetPixelFormatForMasks(int bpp, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC const SDL_PixelFormatDetails * SDLCALL SDL_GetPixelFormatDetails(SDL_PixelFormat format); @@ -837,7 +842,7 @@ extern SDL_DECLSPEC const SDL_PixelFormatDetails * SDLCALL SDL_GetPixelFormatDet * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DestroyPalette * \sa SDL_SetPaletteColors @@ -858,7 +863,7 @@ extern SDL_DECLSPEC SDL_Palette * SDLCALL SDL_CreatePalette(int ncolors); * \threadsafety It is safe to call this function from any thread, as long as * the palette is not modified or destroyed in another thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetPaletteColors(SDL_Palette *palette, const SDL_Color *colors, int firstcolor, int ncolors); @@ -870,7 +875,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetPaletteColors(SDL_Palette *palette, cons * \threadsafety It is safe to call this function from any thread, as long as * the palette is not modified or destroyed in another thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreatePalette */ @@ -905,7 +910,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyPalette(SDL_Palette *palette); * \threadsafety It is safe to call this function from any thread, as long as * the palette is not modified. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPixelFormatDetails * \sa SDL_GetRGB @@ -944,7 +949,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormatDetails *form * \threadsafety It is safe to call this function from any thread, as long as * the palette is not modified. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPixelFormatDetails * \sa SDL_GetRGBA @@ -972,7 +977,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormatDetails *for * \threadsafety It is safe to call this function from any thread, as long as * the palette is not modified. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPixelFormatDetails * \sa SDL_GetRGBA @@ -1004,7 +1009,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel, const SDL_PixelFormatD * \threadsafety It is safe to call this function from any thread, as long as * the palette is not modified. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPixelFormatDetails * \sa SDL_GetRGB diff --git a/Source/ThirdParty/SDL/SDL3/SDL_platform.h b/Source/ThirdParty/SDL/SDL3/SDL_platform.h index bfdfa3a41..9f4689d6f 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_platform.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_platform.h @@ -51,7 +51,7 @@ extern "C" { * \returns the name of the platform. If the correct platform name is not * available, returns a string beginning with the text "Unknown". * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetPlatform(void); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h b/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h index 4f878e3b2..89ce02d45 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h @@ -33,7 +33,7 @@ /** * A preprocessor macro that is only defined if compiling for AIX. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_AIX 1 #endif @@ -43,7 +43,7 @@ /** * A preprocessor macro that is only defined if compiling for Haiku OS. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_HAIKU 1 #endif @@ -53,7 +53,7 @@ /** * A preprocessor macro that is only defined if compiling for BSDi * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_BSDI 1 #endif @@ -63,7 +63,7 @@ /** * A preprocessor macro that is only defined if compiling for FreeBSD. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_FREEBSD 1 #endif @@ -73,7 +73,7 @@ /** * A preprocessor macro that is only defined if compiling for HP-UX. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_HPUX 1 #endif @@ -83,7 +83,7 @@ /** * A preprocessor macro that is only defined if compiling for IRIX. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_IRIX 1 #endif @@ -96,7 +96,7 @@ * Note that Android, although ostensibly a Linux-based system, will not * define this. It defines SDL_PLATFORM_ANDROID instead. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_LINUX 1 #endif @@ -106,7 +106,7 @@ /** * A preprocessor macro that is only defined if compiling for Android. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_ANDROID 1 #undef SDL_PLATFORM_LINUX @@ -117,7 +117,7 @@ /** * A preprocessor macro that is only defined if compiling for Nokia N-Gage. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_NGAGE 1 #endif @@ -131,7 +131,7 @@ * Other platforms, like Linux, might define this in addition to their primary * define. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_UNIX 1 #endif @@ -143,7 +143,7 @@ * * iOS, macOS, etc will additionally define a more specific platform macro. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_PLATFORM_MACOS * \sa SDL_PLATFORM_IOS @@ -190,7 +190,7 @@ /** * A preprocessor macro that is only defined if compiling for tvOS. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_PLATFORM_APPLE */ @@ -202,7 +202,7 @@ /** * A preprocessor macro that is only defined if compiling for VisionOS. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_PLATFORM_APPLE */ @@ -214,7 +214,7 @@ /** * A preprocessor macro that is only defined if compiling for iOS. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_PLATFORM_APPLE */ @@ -225,7 +225,7 @@ /** * A preprocessor macro that is only defined if compiling for macOS. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_PLATFORM_APPLE */ @@ -242,7 +242,7 @@ /** * A preprocessor macro that is only defined if compiling for Emscripten. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_EMSCRIPTEN 1 #endif @@ -252,7 +252,7 @@ /** * A preprocessor macro that is only defined if compiling for NetBSD. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_NETBSD 1 #endif @@ -262,7 +262,7 @@ /** * A preprocessor macro that is only defined if compiling for OpenBSD. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_OPENBSD 1 #endif @@ -272,7 +272,7 @@ /** * A preprocessor macro that is only defined if compiling for OS/2. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_OS2 1 #endif @@ -282,7 +282,7 @@ /** * A preprocessor macro that is only defined if compiling for Tru64 (OSF/1). * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_OSF 1 #endif @@ -292,7 +292,7 @@ /** * A preprocessor macro that is only defined if compiling for QNX Neutrino. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_QNXNTO 1 #endif @@ -302,7 +302,7 @@ /** * A preprocessor macro that is only defined if compiling for RISC OS. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_RISCOS 1 #endif @@ -312,7 +312,7 @@ /** * A preprocessor macro that is only defined if compiling for SunOS/Solaris. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_SOLARIS 1 #endif @@ -322,7 +322,7 @@ /** * A preprocessor macro that is only defined if compiling for Cygwin. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_CYGWIN 1 #endif @@ -335,7 +335,7 @@ * This also covers several other platforms, like Microsoft GDK, Xbox, WinRT, * etc. Each will have their own more-specific platform macros, too. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_PLATFORM_WIN32 * \sa SDL_PLATFORM_XBOXONE @@ -382,7 +382,7 @@ * A preprocessor macro that is only defined if compiling for Microsoft GDK * for Windows. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_WINGDK 1 @@ -391,7 +391,7 @@ /** * A preprocessor macro that is only defined if compiling for Xbox One. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_XBOXONE 1 @@ -400,7 +400,7 @@ /** * A preprocessor macro that is only defined if compiling for Xbox Series. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_XBOXSERIES 1 @@ -413,7 +413,7 @@ * convention, its system layer tends to still be referred to as "the Win32 * API." * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_WIN32 1 @@ -428,7 +428,7 @@ * A preprocessor macro that is only defined if compiling for Microsoft GDK on * any platform. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_GDK 1 #endif @@ -438,7 +438,7 @@ /** * A preprocessor macro that is only defined if compiling for Sony PSP. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_PSP 1 #endif @@ -449,7 +449,7 @@ * A preprocessor macro that is only defined if compiling for Sony PlayStation * 2. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_PS2 1 #endif @@ -459,7 +459,7 @@ /** * A preprocessor macro that is only defined if compiling for Sony Vita. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_VITA 1 #endif @@ -469,7 +469,7 @@ /** * A preprocessor macro that is only defined if compiling for Nintendo 3DS. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_PLATFORM_3DS 1 diff --git a/Source/ThirdParty/SDL/SDL3/SDL_power.h b/Source/ThirdParty/SDL/SDL3/SDL_power.h index 1fdef78ee..5265eaf9b 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_power.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_power.h @@ -42,7 +42,7 @@ extern "C" { * * These are results returned by SDL_GetPowerInfo(). * - * \since This enum is available since SDL 3.0.0 + * \since This enum is available since SDL 3.1.3 */ typedef enum SDL_PowerState { @@ -80,7 +80,7 @@ typedef enum SDL_PowerState * \returns the current battery state or `SDL_POWERSTATE_ERROR` on failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *seconds, int *percent); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_process.h b/Source/ThirdParty/SDL/SDL3/SDL_process.h index 1dfac1917..55be8d421 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_process.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_process.h @@ -85,7 +85,7 @@ typedef struct SDL_Process SDL_Process; * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateProcessWithProperties * \sa SDL_GetProcessProperties @@ -102,8 +102,8 @@ extern SDL_DECLSPEC SDL_Process *SDLCALL SDL_CreateProcess(const char * const *a * Description of where standard I/O should be directed when creating a * process. * - * If a standard I/O stream is set to SDL_PROCESS_STDIO_INHERIT, it will go to - * the same place as the application's I/O stream. This is the default for + * If a standard I/O stream is set to SDL_PROCESS_STDIO_INHERITED, it will go + * to the same place as the application's I/O stream. This is the default for * standard output and standard error. * * If a standard I/O stream is set to SDL_PROCESS_STDIO_NULL, it is connected @@ -132,7 +132,7 @@ extern SDL_DECLSPEC SDL_Process *SDLCALL SDL_CreateProcess(const char * const *a * `SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER` set. This is true for streams * representing files and process I/O. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. * * \sa SDL_CreateProcessWithProperties * \sa SDL_GetProcessProperties @@ -197,7 +197,7 @@ typedef enum SDL_ProcessIO * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateProcess * \sa SDL_GetProcessProperties @@ -245,7 +245,7 @@ extern SDL_DECLSPEC SDL_Process *SDLCALL SDL_CreateProcessWithProperties(SDL_Pro * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateProcess * \sa SDL_CreateProcessWithProperties @@ -281,7 +281,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetProcessProperties(SDL_Proces * * \threadsafety This function is not thread safe. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateProcess * \sa SDL_CreateProcessWithProperties @@ -298,7 +298,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_ReadProcess(SDL_Process *process, size_t * * Writing to this stream can return less data than expected if the process * hasn't read its input. It may be blocked waiting for its output to be read, - * so if you may need to call SDL_GetOutputStream() and read the output in + * if so you may need to call SDL_GetProcessOutput() and read the output in * parallel with writing input. * * \param process The process to get the input stream for. @@ -307,7 +307,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_ReadProcess(SDL_Process *process, size_t * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateProcess * \sa SDL_CreateProcessWithProperties @@ -331,7 +331,7 @@ extern SDL_DECLSPEC SDL_IOStream *SDLCALL SDL_GetProcessInput(SDL_Process *proce * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateProcess * \sa SDL_CreateProcessWithProperties @@ -353,7 +353,7 @@ extern SDL_DECLSPEC SDL_IOStream *SDLCALL SDL_GetProcessOutput(SDL_Process *proc * * \threadsafety This function is not thread safe. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateProcess * \sa SDL_CreateProcessWithProperties @@ -380,7 +380,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_KillProcess(SDL_Process *process, bool forc * * \threadsafety This function is not thread safe. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateProcess * \sa SDL_CreateProcessWithProperties @@ -400,7 +400,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitProcess(SDL_Process *process, bool bloc * * \threadsafety This function is not thread safe. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateProcess * \sa SDL_CreateProcessWithProperties diff --git a/Source/ThirdParty/SDL/SDL3/SDL_properties.h b/Source/ThirdParty/SDL/SDL3/SDL_properties.h index 393d473a1..45852407e 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_properties.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_properties.h @@ -1,5 +1,5 @@ /* - Simple DiretMedia Layer + Simple DirectMedia Layer Copyright (C) 1997-2024 Sam Lantinga This software is provided 'as-is', without any express or implied @@ -61,14 +61,14 @@ extern "C" { /** * SDL properties ID * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_PropertiesID; /** * SDL property type * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_PropertyType { @@ -86,7 +86,7 @@ typedef enum SDL_PropertyType * \returns a valid property ID on success or 0 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGlobalProperties(void); @@ -100,7 +100,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGlobalProperties(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DestroyProperties */ @@ -121,7 +121,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_CreateProperties(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_CopyProperties(SDL_PropertiesID src, SDL_PropertiesID dst); @@ -143,7 +143,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CopyProperties(SDL_PropertiesID src, SDL_Pr * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_UnlockProperties */ @@ -156,7 +156,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_LockProperties(SDL_PropertiesID props); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockProperties */ @@ -180,7 +180,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockProperties(SDL_PropertiesID props); * \threadsafety This callback may fire without any locks held; if this is a * concern, the app should provide its own locking. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_SetPointerPropertyWithCleanup */ @@ -209,7 +209,7 @@ typedef void (SDLCALL *SDL_CleanupPropertyCallback)(void *userdata, void *value) * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPointerProperty * \sa SDL_SetPointerProperty @@ -228,7 +228,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetPointerPropertyWithCleanup(SDL_Propertie * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPointerProperty * \sa SDL_HasProperty @@ -254,7 +254,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetPointerProperty(SDL_PropertiesID props, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetStringProperty */ @@ -271,7 +271,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetStringProperty(SDL_PropertiesID props, c * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetNumberProperty */ @@ -288,7 +288,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetNumberProperty(SDL_PropertiesID props, c * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetFloatProperty */ @@ -305,7 +305,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetFloatProperty(SDL_PropertiesID props, co * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetBooleanProperty */ @@ -320,7 +320,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetBooleanProperty(SDL_PropertiesID props, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPropertyType */ @@ -336,7 +336,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasProperty(SDL_PropertiesID props, const c * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasProperty */ @@ -363,7 +363,7 @@ extern SDL_DECLSPEC SDL_PropertyType SDLCALL SDL_GetPropertyType(SDL_PropertiesI * If you need to avoid this, use SDL_LockProperties() and * SDL_UnlockProperties(). * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetBooleanProperty * \sa SDL_GetFloatProperty @@ -391,7 +391,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_GetPointerProperty(SDL_PropertiesID props * If you need to avoid this, use SDL_LockProperties() and * SDL_UnlockProperties(). * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPropertyType * \sa SDL_HasProperty @@ -413,7 +413,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetStringProperty(SDL_PropertiesID * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPropertyType * \sa SDL_HasProperty @@ -435,7 +435,7 @@ extern SDL_DECLSPEC Sint64 SDLCALL SDL_GetNumberProperty(SDL_PropertiesID props, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPropertyType * \sa SDL_HasProperty @@ -457,7 +457,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetFloatProperty(SDL_PropertiesID props, c * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPropertyType * \sa SDL_HasProperty @@ -475,7 +475,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetBooleanProperty(SDL_PropertiesID props, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ClearProperty(SDL_PropertiesID props, const char *name); @@ -492,7 +492,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ClearProperty(SDL_PropertiesID props, const * \threadsafety SDL_EnumerateProperties holds a lock on `props` during this * callback. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_EnumerateProperties */ @@ -512,7 +512,7 @@ typedef void (SDLCALL *SDL_EnumeratePropertiesCallback)(void *userdata, SDL_Prop * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_EnumerateProperties(SDL_PropertiesID props, SDL_EnumeratePropertiesCallback callback, void *userdata); @@ -528,7 +528,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_EnumerateProperties(SDL_PropertiesID props, * locked or other threads might be setting or getting values * from these properties. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateProperties */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_rect.h b/Source/ThirdParty/SDL/SDL3/SDL_rect.h index d0f0bbcba..e4d3b84de 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_rect.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_rect.h @@ -41,7 +41,7 @@ extern "C" { /** * The structure that defines a point (using integers). * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_GetRectEnclosingPoints * \sa SDL_PointInRect @@ -55,7 +55,7 @@ typedef struct SDL_Point /** * The structure that defines a point (using floating point values). * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_GetRectEnclosingPointsFloat * \sa SDL_PointInRectFloat @@ -70,7 +70,7 @@ typedef struct SDL_FPoint /** * A rectangle, with the origin at the upper left (using integers). * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_RectEmpty * \sa SDL_RectsEqual @@ -91,7 +91,7 @@ typedef struct SDL_Rect * A rectangle, with the origin at the upper left (using floating point * values). * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_RectEmptyFloat * \sa SDL_RectsEqualFloat @@ -121,7 +121,7 @@ typedef struct SDL_FRect * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ SDL_FORCE_INLINE void SDL_RectToFRect(const SDL_Rect *rect, SDL_FRect *frect) { @@ -150,7 +150,7 @@ SDL_FORCE_INLINE void SDL_RectToFRect(const SDL_Rect *rect, SDL_FRect *frect) * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ SDL_FORCE_INLINE bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r) { @@ -174,7 +174,7 @@ SDL_FORCE_INLINE bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r) * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ SDL_FORCE_INLINE bool SDL_RectEmpty(const SDL_Rect *r) { @@ -198,7 +198,7 @@ SDL_FORCE_INLINE bool SDL_RectEmpty(const SDL_Rect *r) * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ SDL_FORCE_INLINE bool SDL_RectsEqual(const SDL_Rect *a, const SDL_Rect *b) { @@ -217,7 +217,7 @@ SDL_FORCE_INLINE bool SDL_RectsEqual(const SDL_Rect *a, const SDL_Rect *b) * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRectIntersection */ @@ -234,7 +234,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasRectIntersection(const SDL_Rect *A, cons * rectangles `A` and `B`. * \returns true if there is an intersection, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasRectIntersection */ @@ -250,7 +250,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectIntersection(const SDL_Rect *A, cons * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectUnion(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result); @@ -269,7 +269,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectUnion(const SDL_Rect *A, const SDL_R * \returns true if any points were enclosed or false if all the points were * outside of the clipping rectangle. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectEnclosingPoints(const SDL_Point *points, int count, const SDL_Rect *clip, SDL_Rect *result); @@ -289,7 +289,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectEnclosingPoints(const SDL_Point *poi * \param Y2 a pointer to the ending Y-coordinate of the line. * \returns true if there is an intersection, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectAndLineIntersection(const SDL_Rect *rect, int *X1, int *Y1, int *X2, int *Y2); @@ -315,7 +315,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectAndLineIntersection(const SDL_Rect * * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ SDL_FORCE_INLINE bool SDL_PointInRectFloat(const SDL_FPoint *p, const SDL_FRect *r) { @@ -339,7 +339,7 @@ SDL_FORCE_INLINE bool SDL_PointInRectFloat(const SDL_FPoint *p, const SDL_FRect * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ SDL_FORCE_INLINE bool SDL_RectEmptyFloat(const SDL_FRect *r) { @@ -367,7 +367,7 @@ SDL_FORCE_INLINE bool SDL_RectEmptyFloat(const SDL_FRect *r) * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RectsEqualFloat */ @@ -402,7 +402,7 @@ SDL_FORCE_INLINE bool SDL_RectsEqualEpsilon(const SDL_FRect *a, const SDL_FRect * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RectsEqualEpsilon */ @@ -420,7 +420,7 @@ SDL_FORCE_INLINE bool SDL_RectsEqualFloat(const SDL_FRect *a, const SDL_FRect *b * \param B an SDL_FRect structure representing the second rectangle. * \returns true if there is an intersection, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRectIntersection */ @@ -437,7 +437,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasRectIntersectionFloat(const SDL_FRect *A * rectangles `A` and `B`. * \returns true if there is an intersection, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_HasRectIntersectionFloat */ @@ -453,7 +453,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectIntersectionFloat(const SDL_FRect *A * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectUnionFloat(const SDL_FRect *A, const SDL_FRect *B, SDL_FRect *result); @@ -473,7 +473,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectUnionFloat(const SDL_FRect *A, const * \returns true if any points were enclosed or false if all the points were * outside of the clipping rectangle. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectEnclosingPointsFloat(const SDL_FPoint *points, int count, const SDL_FRect *clip, SDL_FRect *result); @@ -494,7 +494,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectEnclosingPointsFloat(const SDL_FPoin * \param Y2 a pointer to the ending Y-coordinate of the line. * \returns true if there is an intersection, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectAndLineIntersectionFloat(const SDL_FRect *rect, float *X1, float *Y1, float *X2, float *Y2); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_render.h b/Source/ThirdParty/SDL/SDL3/SDL_render.h index 820fa5a43..f2dd536eb 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_render.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_render.h @@ -69,14 +69,14 @@ extern "C" { /** * The name of the software renderer. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_SOFTWARE_RENDERER "software" /** * Vertex structure. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_Vertex { @@ -88,7 +88,7 @@ typedef struct SDL_Vertex /** * The access pattern allowed for a texture. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_TextureAccess { @@ -100,7 +100,7 @@ typedef enum SDL_TextureAccess /** * How the logical size is mapped to the output. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_RendererLogicalPresentation { @@ -114,7 +114,7 @@ typedef enum SDL_RendererLogicalPresentation /** * A structure representing rendering state * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_Renderer SDL_Renderer; @@ -123,7 +123,7 @@ typedef struct SDL_Renderer SDL_Renderer; /** * An efficient driver-specific representation of pixel data * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_CreateTexture * \sa SDL_CreateTextureFromSurface @@ -157,7 +157,7 @@ typedef struct SDL_Texture SDL_Texture; * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateRenderer * \sa SDL_GetRenderDriver @@ -182,7 +182,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetNumRenderDrivers */ @@ -203,7 +203,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetRenderDriver(int index); * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateRenderer * \sa SDL_CreateWindow @@ -214,24 +214,24 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CreateWindowAndRenderer(const char *title, * Create a 2D rendering context for a window. * * If you want a specific renderer, you can specify its name here. A list of - * available renderers can be obtained by calling SDL_GetRenderDriver multiple - * times, with indices from 0 to SDL_GetNumRenderDrivers()-1. If you don't - * need a specific renderer, specify NULL and SDL will attempt to choose the - * best option for you, based on what is available on the user's system. + * available renderers can be obtained by calling SDL_GetRenderDriver() + * multiple times, with indices from 0 to SDL_GetNumRenderDrivers()-1. If you + * don't need a specific renderer, specify NULL and SDL will attempt to choose + * the best option for you, based on what is available on the user's system. * * By default the rendering size matches the window size in pixels, but you * can call SDL_SetRenderLogicalPresentation() to change the content size and * scaling options. * * \param window the window where rendering is displayed. - * \param name the name of the rendering driver to initialize, or NULL to - * initialize the first one supporting the requested flags. + * \param name the name of the rendering driver to initialize, or NULL to let + * SDL choose one. * \returns a valid rendering context or NULL if there was an error; call * SDL_GetError() for more information. * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateRendererWithProperties * \sa SDL_CreateSoftwareRenderer @@ -253,7 +253,7 @@ extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window *window * displayed, required if this isn't a software renderer using a surface * - `SDL_PROP_RENDERER_CREATE_SURFACE_POINTER`: the surface where rendering * is displayed, if you want a software renderer without a window - * - `SDL_PROP_RENDERER_CREATE_OUTPUT_COLORSPACE_NUMBER`: an SDL_ColorSpace + * - `SDL_PROP_RENDERER_CREATE_OUTPUT_COLORSPACE_NUMBER`: an SDL_Colorspace * value describing the colorspace for output to the display, defaults to * SDL_COLORSPACE_SRGB. The direct3d11, direct3d12, and metal renderers * support SDL_COLORSPACE_SRGB_LINEAR, which is a linear color space and @@ -285,7 +285,7 @@ extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window *window * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateProperties * \sa SDL_CreateRenderer @@ -322,7 +322,7 @@ extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRendererWithProperties(SDL_ * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DestroyRenderer */ @@ -337,7 +337,7 @@ extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surfac * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window *window); @@ -350,7 +350,7 @@ extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window *window); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetRenderWindow(SDL_Renderer *renderer); @@ -363,7 +363,7 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetRenderWindow(SDL_Renderer *rende * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateRenderer * \sa SDL_CreateRendererWithProperties @@ -386,21 +386,21 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetRendererName(SDL_Renderer *rende * - `SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER`: a (const SDL_PixelFormat *) * array of pixel formats, terminated with SDL_PIXELFORMAT_UNKNOWN, * representing the available texture formats for this renderer. - * - `SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER`: an SDL_ColorSpace value + * - `SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER`: an SDL_Colorspace value * describing the colorspace for output to the display, defaults to * SDL_COLORSPACE_SRGB. * - `SDL_PROP_RENDERER_HDR_ENABLED_BOOLEAN`: true if the output colorspace is * SDL_COLORSPACE_SRGB_LINEAR and the renderer is showing on a display with * HDR enabled. This property can change dynamically when - * SDL_EVENT_DISPLAY_HDR_STATE_CHANGED is sent. + * SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent. * - `SDL_PROP_RENDERER_SDR_WHITE_POINT_FLOAT`: the value of SDR white in the * SDL_COLORSPACE_SRGB_LINEAR colorspace. When HDR is enabled, this value is * automatically multiplied into the color scale. This property can change - * dynamically when SDL_EVENT_DISPLAY_HDR_STATE_CHANGED is sent. + * dynamically when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent. * - `SDL_PROP_RENDERER_HDR_HEADROOM_FLOAT`: the additional high dynamic range * that can be displayed, in terms of the SDR white point. When HDR is not * enabled, this will be 1.0. This property can change dynamically when - * SDL_EVENT_DISPLAY_HDR_STATE_CHANGED is sent. + * SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent. * * With the direct3d renderer: * @@ -447,7 +447,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetRendererName(SDL_Renderer *rende * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetRendererProperties(SDL_Renderer *renderer); @@ -489,7 +489,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetRendererProperties(SDL_Rende * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetCurrentRenderOutputSize */ @@ -511,7 +511,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderOutputSize(SDL_Renderer *renderer, * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderOutputSize */ @@ -533,7 +533,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetCurrentRenderOutputSize(SDL_Renderer *re * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateTextureFromSurface * \sa SDL_CreateTextureWithProperties @@ -563,7 +563,7 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer *render * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateTexture * \sa SDL_CreateTextureWithProperties @@ -576,7 +576,7 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Rende * * These are the supported properties: * - * - `SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER`: an SDL_ColorSpace value + * - `SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER`: an SDL_Colorspace value * describing the texture colorspace, defaults to SDL_COLORSPACE_SRGB_LINEAR * for floating point textures, SDL_COLORSPACE_HDR10 for 10-bit textures, * SDL_COLORSPACE_SRGB for other RGB textures and SDL_COLORSPACE_JPEG for @@ -673,7 +673,7 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Rende * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateProperties * \sa SDL_CreateTexture @@ -713,7 +713,7 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureWithProperties(SDL_Re * * The following read-only properties are provided by SDL: * - * - `SDL_PROP_TEXTURE_COLORSPACE_NUMBER`: an SDL_ColorSpace value describing + * - `SDL_PROP_TEXTURE_COLORSPACE_NUMBER`: an SDL_Colorspace value describing * the texture colorspace. * - `SDL_PROP_TEXTURE_FORMAT_NUMBER`: one of the enumerated values in * SDL_PixelFormat. @@ -753,14 +753,8 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureWithProperties(SDL_Re * * With the vulkan renderer: * - * - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_POINTER`: the VkImage associated with - * the texture - * - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_U_POINTER`: the VkImage associated with - * the U plane of a YUV texture - * - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_V_POINTER`: the VkImage associated with - * the V plane of a YUV texture - * - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_UV_POINTER`: the VkImage associated with - * the UV plane of a NV12/NV21 texture + * - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER`: the VkImage associated with the + * texture * * With the opengl renderer: * @@ -792,18 +786,13 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureWithProperties(SDL_Re * - `SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_TARGET_NUMBER`: the GLenum for the * texture target (`GL_TEXTURE_2D`, `GL_TEXTURE_EXTERNAL_OES`, etc) * - * With the vulkan renderer: - * - * - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER`: the VkImage associated with the - * texture - * * \param texture the texture to query. * \returns a valid property ID on success or 0 on failure; call * SDL_GetError() for more information. * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetTextureProperties(SDL_Texture *texture); @@ -843,7 +832,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetTextureProperties(SDL_Textur * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_GetRendererFromTexture(SDL_Texture *texture); @@ -860,7 +849,7 @@ extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_GetRendererFromTexture(SDL_Textur * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureSize(SDL_Texture *texture, float *w, float *h); @@ -885,7 +874,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureSize(SDL_Texture *texture, float * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetTextureColorMod * \sa SDL_SetTextureAlphaMod @@ -915,7 +904,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetTextureColorMod(SDL_Texture *texture, Ui * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetTextureColorModFloat * \sa SDL_SetTextureAlphaModFloat @@ -936,7 +925,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetTextureColorModFloat(SDL_Texture *textur * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetTextureAlphaMod * \sa SDL_GetTextureColorModFloat @@ -956,7 +945,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureColorMod(SDL_Texture *texture, Ui * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetTextureAlphaModFloat * \sa SDL_GetTextureColorMod @@ -982,7 +971,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureColorModFloat(SDL_Texture *textur * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetTextureAlphaMod * \sa SDL_SetTextureAlphaModFloat @@ -1008,7 +997,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetTextureAlphaMod(SDL_Texture *texture, Ui * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetTextureAlphaModFloat * \sa SDL_SetTextureAlphaMod @@ -1026,7 +1015,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetTextureAlphaModFloat(SDL_Texture *textur * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetTextureAlphaModFloat * \sa SDL_GetTextureColorMod @@ -1044,7 +1033,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureAlphaMod(SDL_Texture *texture, Ui * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetTextureAlphaMod * \sa SDL_GetTextureColorModFloat @@ -1065,7 +1054,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureAlphaModFloat(SDL_Texture *textur * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetTextureBlendMode */ @@ -1081,7 +1070,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetTextureBlendMode(SDL_Texture *texture, S * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetTextureBlendMode */ @@ -1101,7 +1090,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureBlendMode(SDL_Texture *texture, S * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetTextureScaleMode */ @@ -1117,7 +1106,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetTextureScaleMode(SDL_Texture *texture, S * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetTextureScaleMode */ @@ -1148,7 +1137,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureScaleMode(SDL_Texture *texture, S * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockTexture * \sa SDL_UnlockTexture @@ -1182,7 +1171,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_UpdateTexture(SDL_Texture *texture, const S * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_UpdateNVTexture * \sa SDL_UpdateTexture @@ -1214,7 +1203,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_UpdateYUVTexture(SDL_Texture *texture, * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_UpdateTexture * \sa SDL_UpdateYUVTexture @@ -1249,7 +1238,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_UpdateNVTexture(SDL_Texture *texture, * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockTextureToSurface * \sa SDL_UnlockTexture @@ -1287,7 +1276,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_LockTexture(SDL_Texture *texture, * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockTexture * \sa SDL_UnlockTexture @@ -1309,7 +1298,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_LockTextureToSurface(SDL_Texture *texture, * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockTexture */ @@ -1331,7 +1320,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture *texture); * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderTarget */ @@ -1348,7 +1337,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer, SDL * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetRenderTarget */ @@ -1387,7 +1376,7 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *rend * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ConvertEventToRenderCoordinates * \sa SDL_GetRenderLogicalPresentation @@ -1410,7 +1399,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderLogicalPresentation(SDL_Renderer * * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetRenderLogicalPresentation */ @@ -1432,7 +1421,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderLogicalPresentation(SDL_Renderer * * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetRenderLogicalPresentation */ @@ -1458,7 +1447,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderLogicalPresentationRect(SDL_Render * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetRenderLogicalPresentation * \sa SDL_SetRenderScale @@ -1487,7 +1476,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderCoordinatesFromWindow(SDL_Renderer *r * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetRenderLogicalPresentation * \sa SDL_SetRenderScale @@ -1517,7 +1506,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderCoordinatesToWindow(SDL_Renderer *ren * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderCoordinatesFromWindow */ @@ -1540,7 +1529,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ConvertEventToRenderCoordinates(SDL_Rendere * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderViewport * \sa SDL_RenderViewportSet @@ -1557,7 +1546,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderViewport(SDL_Renderer *renderer, c * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderViewportSet * \sa SDL_SetRenderViewport @@ -1577,7 +1566,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderViewport(SDL_Renderer *renderer, S * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderViewport * \sa SDL_SetRenderViewport @@ -1602,7 +1591,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderViewportSet(SDL_Renderer *renderer); * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderSafeArea(SDL_Renderer *renderer, SDL_Rect *rect); @@ -1617,7 +1606,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderSafeArea(SDL_Renderer *renderer, S * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderClipRect * \sa SDL_RenderClipEnabled @@ -1635,7 +1624,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderClipRect(SDL_Renderer *renderer, c * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderClipEnabled * \sa SDL_SetRenderClipRect @@ -1651,7 +1640,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderClipRect(SDL_Renderer *renderer, S * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderClipRect * \sa SDL_SetRenderClipRect @@ -1677,7 +1666,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderClipEnabled(SDL_Renderer *renderer); * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderScale */ @@ -1694,7 +1683,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderScale(SDL_Renderer *renderer, floa * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetRenderScale */ @@ -1718,7 +1707,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderScale(SDL_Renderer *renderer, floa * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderDrawColor * \sa SDL_SetRenderDrawColorFloat @@ -1743,7 +1732,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderDrawColor(SDL_Renderer *renderer, * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderDrawColorFloat * \sa SDL_SetRenderDrawColor @@ -1767,7 +1756,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderDrawColorFloat(SDL_Renderer *rende * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderDrawColorFloat * \sa SDL_SetRenderDrawColor @@ -1791,7 +1780,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderDrawColor(SDL_Renderer *renderer, * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetRenderDrawColorFloat * \sa SDL_GetRenderDrawColor @@ -1816,7 +1805,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderDrawColorFloat(SDL_Renderer *rende * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderColorScale */ @@ -1832,7 +1821,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderColorScale(SDL_Renderer *renderer, * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetRenderColorScale */ @@ -1850,7 +1839,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderColorScale(SDL_Renderer *renderer, * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderDrawBlendMode */ @@ -1866,7 +1855,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer *render * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetRenderDrawBlendMode */ @@ -1886,7 +1875,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer *render * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetRenderDrawColor */ @@ -1903,7 +1892,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderClear(SDL_Renderer *renderer); * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderPoints */ @@ -1920,7 +1909,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderPoint(SDL_Renderer *renderer, float x * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderPoint */ @@ -1939,7 +1928,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderPoints(SDL_Renderer *renderer, const * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderLines */ @@ -1957,7 +1946,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderLine(SDL_Renderer *renderer, float x1 * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderLine */ @@ -1974,7 +1963,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderLines(SDL_Renderer *renderer, const S * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderRects */ @@ -1992,7 +1981,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderRect(SDL_Renderer *renderer, const SD * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderRect */ @@ -2010,7 +1999,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderRects(SDL_Renderer *renderer, const S * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderFillRects */ @@ -2028,7 +2017,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderFillRect(SDL_Renderer *renderer, cons * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderFillRect */ @@ -2049,7 +2038,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderFillRects(SDL_Renderer *renderer, con * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderTextureRotated * \sa SDL_RenderTextureTiled @@ -2078,7 +2067,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderTexture(SDL_Renderer *renderer, SDL_T * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderTexture */ @@ -2108,7 +2097,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderTextureRotated(SDL_Renderer *renderer * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderTexture */ @@ -2142,7 +2131,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderTextureTiled(SDL_Renderer *renderer, * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderTexture */ @@ -2166,7 +2155,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderTexture9Grid(SDL_Renderer *renderer, * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderGeometryRaw */ @@ -2198,7 +2187,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer, * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RenderGeometry */ @@ -2227,7 +2216,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer, * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect); @@ -2264,7 +2253,7 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_RenderReadPixels(SDL_Renderer *ren * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateRenderer * \sa SDL_RenderClear @@ -2291,7 +2280,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderPresent(SDL_Renderer *renderer); * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateTexture * \sa SDL_CreateTextureFromSurface @@ -2308,7 +2297,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture *texture); * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateRenderer */ @@ -2343,7 +2332,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer *renderer); * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_FlushRenderer(SDL_Renderer *renderer); @@ -2359,7 +2348,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_FlushRenderer(SDL_Renderer *renderer); * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderMetalCommandEncoder */ @@ -2382,7 +2371,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_GetRenderMetalLayer(SDL_Renderer *rendere * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderMetalLayer */ @@ -2415,7 +2404,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_GetRenderMetalCommandEncoder(SDL_Renderer * \threadsafety It is **NOT** safe to call this function from two threads at * once. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_AddVulkanRenderSemaphores(SDL_Renderer *renderer, Uint32 wait_stage_mask, Sint64 wait_semaphore, Sint64 signal_semaphore); @@ -2426,10 +2415,10 @@ extern SDL_DECLSPEC bool SDLCALL SDL_AddVulkanRenderSemaphores(SDL_Renderer *ren * * The `vsync` parameter can be 1 to synchronize present with every vertical * refresh, 2 to synchronize present with every second vertical refresh, etc., - * SDL_WINDOW_SURFACE_VSYNC_ADAPTIVE for late swap tearing (adaptive vsync), - * or SDL_WINDOW_SURFACE_VSYNC_DISABLED to disable. Not every value is - * supported by every driver, so you should check the return value to see - * whether the requested setting is supported. + * SDL_RENDERER_VSYNC_ADAPTIVE for late swap tearing (adaptive vsync), or + * SDL_RENDERER_VSYNC_DISABLED to disable. Not every value is supported by + * every driver, so you should check the return value to see whether the + * requested setting is supported. * * \param renderer the renderer to toggle. * \param vsync the vertical refresh sync interval. @@ -2438,7 +2427,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_AddVulkanRenderSemaphores(SDL_Renderer *ren * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderVSync */ @@ -2458,12 +2447,63 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderVSync(SDL_Renderer *renderer, int * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetRenderVSync */ extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderVSync(SDL_Renderer *renderer, int *vsync); +/** + * The size, in pixels, of a single SDL_RenderDebugText() character. + * + * The font is monospaced and square, so this applies to all characters. + * + * \since This macro is available since SDL 3.2.0. + * + * \sa SDL_RenderDebugText + */ +#define SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE 8 + +/** + * Draw debug text to an SDL_Renderer. + * + * This function will render a string of text to an SDL_Renderer. Note that + * this is a convenience function for debugging, with severe limitations, and + * not intended to be used for production apps and games. + * + * Among these limitations: + * + * - It accepts UTF-8 strings, but will only renders ASCII characters. + * - It has a single, tiny size (8x8 pixels). One can use logical presentation + * or scaling to adjust it, but it will be blurry. + * - It uses a simple, hardcoded bitmap font. It does not allow different font + * selections and it does not support truetype, for proper scaling. + * - It does no word-wrapping and does not treat newline characters as a line + * break. If the text goes out of the window, it's gone. + * + * For serious text rendering, there are several good options, such as + * SDL_ttf, stb_truetype, or other external libraries. + * + * On first use, this will create an internal texture for rendering glyphs. + * This texture will live until the renderer is destroyed. + * + * The text is drawn in the color specified by SDL_SetRenderDrawColor(). + * + * \param renderer the renderer which should draw a line of text. + * \param x the x coordinate where the top-left corner of the text will draw. + * \param y the y coordinate where the top-left corner of the text will draw. + * \param str the string to render. + * \returns true on success or false on failure; call SDL_GetError() for more + * information. + * + * \threadsafety You may only call this function from the main thread. + * + * \since This function is available since SDL 3.1.6. + * + * \sa SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE + */ +extern SDL_DECLSPEC bool SDLCALL SDL_RenderDebugText(SDL_Renderer *renderer, float x, float y, const char *str); + /* Ends C function definitions when using C++ */ #ifdef __cplusplus } diff --git a/Source/ThirdParty/SDL/SDL3/SDL_scancode.h b/Source/ThirdParty/SDL/SDL3/SDL_scancode.h index 16fb2a828..deda12fe1 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_scancode.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_scancode.h @@ -42,7 +42,7 @@ * The values in this enumeration are based on the USB usage page standard: * https://usb.org/sites/default/files/hut1_5.pdf * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_Scancode { diff --git a/Source/ThirdParty/SDL/SDL3/SDL_sensor.h b/Source/ThirdParty/SDL/SDL3/SDL_sensor.h index 2ad2fc029..138629130 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_sensor.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_sensor.h @@ -52,7 +52,7 @@ typedef struct SDL_Sensor SDL_Sensor; * * The value 0 is an invalid ID. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_SensorID; @@ -64,7 +64,7 @@ typedef Uint32 SDL_SensorID; * rest will have an value of SDL_STANDARD_GRAVITY away from the center of the * earth, which is a positive Y value. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_STANDARD_GRAVITY 9.80665f @@ -118,7 +118,7 @@ typedef Uint32 SDL_SensorID; * * The gyroscope axis data is not changed when the device is rotated. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. * * \sa SDL_GetCurrentDisplayOrientation */ @@ -146,7 +146,7 @@ typedef enum SDL_SensorType * call SDL_GetError() for more information. This should be freed * with SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_SensorID * SDLCALL SDL_GetSensors(int *count); @@ -158,7 +158,7 @@ extern SDL_DECLSPEC SDL_SensorID * SDLCALL SDL_GetSensors(int *count); * \param instance_id the sensor instance ID. * \returns the sensor name, or NULL if `instance_id` is not valid. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetSensorNameForID(SDL_SensorID instance_id); @@ -171,7 +171,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetSensorNameForID(SDL_SensorID ins * \returns the SDL_SensorType, or `SDL_SENSOR_INVALID` if `instance_id` is * not valid. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_SensorType SDLCALL SDL_GetSensorTypeForID(SDL_SensorID instance_id); @@ -184,7 +184,7 @@ extern SDL_DECLSPEC SDL_SensorType SDLCALL SDL_GetSensorTypeForID(SDL_SensorID i * \returns the sensor platform dependent type, or -1 if `instance_id` is not * valid. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_GetSensorNonPortableTypeForID(SDL_SensorID instance_id); @@ -195,7 +195,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetSensorNonPortableTypeForID(SDL_SensorID i * \returns an SDL_Sensor object or NULL on failure; call SDL_GetError() for * more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Sensor * SDLCALL SDL_OpenSensor(SDL_SensorID instance_id); @@ -206,7 +206,7 @@ extern SDL_DECLSPEC SDL_Sensor * SDLCALL SDL_OpenSensor(SDL_SensorID instance_id * \returns an SDL_Sensor object or NULL on failure; call SDL_GetError() for * more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Sensor * SDLCALL SDL_GetSensorFromID(SDL_SensorID instance_id); @@ -217,7 +217,7 @@ extern SDL_DECLSPEC SDL_Sensor * SDLCALL SDL_GetSensorFromID(SDL_SensorID instan * \returns a valid property ID on success or 0 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetSensorProperties(SDL_Sensor *sensor); @@ -228,7 +228,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetSensorProperties(SDL_Sensor * \returns the sensor name or NULL on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetSensorName(SDL_Sensor *sensor); @@ -239,7 +239,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetSensorName(SDL_Sensor *sensor); * \returns the SDL_SensorType type, or `SDL_SENSOR_INVALID` if `sensor` is * NULL. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_SensorType SDLCALL SDL_GetSensorType(SDL_Sensor *sensor); @@ -249,7 +249,7 @@ extern SDL_DECLSPEC SDL_SensorType SDLCALL SDL_GetSensorType(SDL_Sensor *sensor) * \param sensor the SDL_Sensor object to inspect. * \returns the sensor platform dependent type, or -1 if `sensor` is NULL. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_GetSensorNonPortableType(SDL_Sensor *sensor); @@ -260,7 +260,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetSensorNonPortableType(SDL_Sensor *sensor) * \returns the sensor instance ID, or 0 on failure; call SDL_GetError() for * more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_SensorID SDLCALL SDL_GetSensorID(SDL_Sensor *sensor); @@ -275,7 +275,7 @@ extern SDL_DECLSPEC SDL_SensorID SDLCALL SDL_GetSensorID(SDL_Sensor *sensor); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetSensorData(SDL_Sensor *sensor, float *data, int num_values); @@ -284,7 +284,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetSensorData(SDL_Sensor *sensor, float *da * * \param sensor the SDL_Sensor object to close. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_CloseSensor(SDL_Sensor *sensor); @@ -297,7 +297,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_CloseSensor(SDL_Sensor *sensor); * This needs to be called from the thread that initialized the sensor * subsystem. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_UpdateSensors(void); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h b/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h index c484c3712..93118b5f8 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h @@ -131,7 +131,7 @@ void *alloca(size_t); * inside of `sizeof`, so there are no side-effects here, as expressions do * not actually run any code in these cases. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_arraysize(array) (sizeof(array)/sizeof(array[0])) @@ -144,7 +144,7 @@ void *alloca(size_t); * #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")` * ``` * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_STRINGIFY_ARG(arg) #arg @@ -173,7 +173,7 @@ void *alloca(size_t); * * \threadsafety It is safe to call this macro from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_static_cast * \sa SDL_const_cast @@ -195,7 +195,7 @@ void *alloca(size_t); * * \threadsafety It is safe to call this macro from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_reinterpret_cast * \sa SDL_const_cast @@ -217,7 +217,7 @@ void *alloca(size_t); * * \threadsafety It is safe to call this macro from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_reinterpret_cast * \sa SDL_static_cast @@ -248,7 +248,7 @@ void *alloca(size_t); * * \threadsafety It is safe to call this macro from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_FOURCC(A, B, C, D) \ ((SDL_static_cast(Uint32, SDL_static_cast(Uint8, (A))) << 0) | \ @@ -265,7 +265,7 @@ void *alloca(size_t); * 0xFFFFFFFF is overflowing a 32-bit value. Use `SDL_SINT64_C(0xFFFFFFFF1)` * instead of `0xFFFFFFFF1` by itself. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_UINT64_C */ @@ -278,25 +278,39 @@ void *alloca(size_t); * 0xFFFFFFFF is overflowing a 32-bit value. Use `SDL_UINT64_C(0xFFFFFFFF1)` * instead of `0xFFFFFFFF1` by itself. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_SINT64_C */ #define SDL_UINT64_C(c) c ## ULL /* or whatever the current compiler uses. */ -#elif defined(INT64_C) +#else /* !SDL_WIKI_DOCUMENTATION_SECTION */ + +#ifndef SDL_SINT64_C +#if defined(INT64_C) #define SDL_SINT64_C(c) INT64_C(c) -#define SDL_UINT64_C(c) UINT64_C(c) #elif defined(_MSC_VER) #define SDL_SINT64_C(c) c ## i64 -#define SDL_UINT64_C(c) c ## ui64 #elif defined(__LP64__) || defined(_LP64) #define SDL_SINT64_C(c) c ## L -#define SDL_UINT64_C(c) c ## UL #else #define SDL_SINT64_C(c) c ## LL +#endif +#endif /* !SDL_SINT64_C */ + +#ifndef SDL_UINT64_C +#if defined(UINT64_C) +#define SDL_UINT64_C(c) UINT64_C(c) +#elif defined(_MSC_VER) +#define SDL_UINT64_C(c) c ## ui64 +#elif defined(__LP64__) || defined(_LP64) +#define SDL_UINT64_C(c) c ## UL +#else #define SDL_UINT64_C(c) c ## ULL #endif +#endif /* !SDL_UINT64_C */ + +#endif /* !SDL_WIKI_DOCUMENTATION_SECTION */ /** * \name Basic data types @@ -306,7 +320,7 @@ void *alloca(size_t); /** * A signed 8-bit integer type. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ typedef int8_t Sint8; #define SDL_MAX_SINT8 ((Sint8)0x7F) /* 127 */ @@ -315,7 +329,7 @@ typedef int8_t Sint8; /** * An unsigned 8-bit integer type. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ typedef uint8_t Uint8; #define SDL_MAX_UINT8 ((Uint8)0xFF) /* 255 */ @@ -324,7 +338,7 @@ typedef uint8_t Uint8; /** * A signed 16-bit integer type. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ typedef int16_t Sint16; #define SDL_MAX_SINT16 ((Sint16)0x7FFF) /* 32767 */ @@ -333,7 +347,7 @@ typedef int16_t Sint16; /** * An unsigned 16-bit integer type. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ typedef uint16_t Uint16; #define SDL_MAX_UINT16 ((Uint16)0xFFFF) /* 65535 */ @@ -342,7 +356,7 @@ typedef uint16_t Uint16; /** * A signed 32-bit integer type. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ typedef int32_t Sint32; #define SDL_MAX_SINT32 ((Sint32)0x7FFFFFFF) /* 2147483647 */ @@ -351,7 +365,7 @@ typedef int32_t Sint32; /** * An unsigned 32-bit integer type. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ typedef uint32_t Uint32; #define SDL_MAX_UINT32 ((Uint32)0xFFFFFFFFu) /* 4294967295 */ @@ -360,7 +374,7 @@ typedef uint32_t Uint32; /** * A signed 64-bit integer type. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_SINT64_C */ @@ -371,7 +385,7 @@ typedef int64_t Sint64; /** * An unsigned 64-bit integer type. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_UINT64_C */ @@ -387,7 +401,7 @@ typedef uint64_t Uint64; * and SDL_SECONDS_TO_NS(), and between Windows FILETIME values with * SDL_TimeToWindows() and SDL_TimeFromWindows(). * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_MAX_SINT64 * \sa SDL_MIN_SINT64 @@ -413,7 +427,7 @@ typedef Sint64 SDL_Time; * Equals by default to platform-defined `FLT_EPSILON`, or * `1.1920928955078125e-07F` if that's not available. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_FLT_EPSILON 1.1920928955078125e-07F /* 0x0.000002p0 */ #endif @@ -426,9 +440,9 @@ typedef Sint64 SDL_Time; #ifndef SDL_PRIs64 #if defined(SDL_PLATFORM_WINDOWS) #define SDL_PRIs64 "I64d" -#elif defined(PRIs64) -#define SDL_PRIs64 PRIs64 -#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE) +#elif defined(PRId64) +#define SDL_PRIs64 PRId64 +#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE) && !defined(__EMSCRIPTEN__) #define SDL_PRIs64 "ld" #else #define SDL_PRIs64 "lld" @@ -439,7 +453,7 @@ typedef Sint64 SDL_Time; #define SDL_PRIu64 "I64u" #elif defined(PRIu64) #define SDL_PRIu64 PRIu64 -#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE) +#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE) && !defined(__EMSCRIPTEN__) #define SDL_PRIu64 "lu" #else #define SDL_PRIu64 "llu" @@ -554,7 +568,7 @@ SDL_COMPILE_TIME_ASSERT(longlong_size64, sizeof(long long) == 8); /* using I64 f #define SDL_PRINTF_FORMAT_STRING #define SDL_SCANF_FORMAT_STRING #endif -#ifdef __GNUC__ +#if defined(__GNUC__) || defined(__clang__) #define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __printf__, fmtargnumber, fmtargnumber+1 ))) #define SDL_PRINTF_VARARG_FUNCV( fmtargnumber ) __attribute__(( format( __printf__, fmtargnumber, 0 ))) #define SDL_SCANF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __scanf__, fmtargnumber, fmtargnumber+1 ))) @@ -652,7 +666,7 @@ extern "C" { * * \threadsafety It is safe to call this macro from any thread. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * * \sa SDL_IOStreamInterface * \sa SDL_StorageInterface @@ -689,7 +703,7 @@ extern "C" { * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_free * \sa SDL_calloc @@ -711,7 +725,7 @@ extern SDL_DECLSPEC SDL_MALLOC void * SDLCALL SDL_malloc(size_t size); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_free * \sa SDL_malloc @@ -746,7 +760,7 @@ extern SDL_DECLSPEC SDL_MALLOC SDL_ALLOC_SIZE2(1, 2) void * SDLCALL SDL_calloc(s * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_free * \sa SDL_malloc @@ -766,7 +780,7 @@ extern SDL_DECLSPEC SDL_ALLOC_SIZE(2) void * SDLCALL SDL_realloc(void *mem, size * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_malloc * \sa SDL_calloc @@ -784,7 +798,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_free(void *mem); * * \threadsafety It should be safe to call this callback from any thread. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_malloc * \sa SDL_GetOriginalMemoryFunctions @@ -805,7 +819,7 @@ typedef void *(SDLCALL *SDL_malloc_func)(size_t size); * * \threadsafety It should be safe to call this callback from any thread. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_calloc * \sa SDL_GetOriginalMemoryFunctions @@ -826,7 +840,7 @@ typedef void *(SDLCALL *SDL_calloc_func)(size_t nmemb, size_t size); * * \threadsafety It should be safe to call this callback from any thread. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_realloc * \sa SDL_GetOriginalMemoryFunctions @@ -844,7 +858,7 @@ typedef void *(SDLCALL *SDL_realloc_func)(void *mem, size_t size); * * \threadsafety It should be safe to call this callback from any thread. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_free * \sa SDL_GetOriginalMemoryFunctions @@ -868,7 +882,7 @@ typedef void (SDLCALL *SDL_free_func)(void *mem); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_GetOriginalMemoryFunctions(SDL_malloc_func *malloc_func, SDL_calloc_func *calloc_func, @@ -887,7 +901,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_GetOriginalMemoryFunctions(SDL_malloc_func * unlikely event of a background thread calling * SDL_SetMemoryFunctions simultaneously. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetMemoryFunctions * \sa SDL_GetOriginalMemoryFunctions @@ -918,7 +932,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_ * should not replace the memory functions once any allocations * are made! * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetMemoryFunctions * \sa SDL_GetOriginalMemoryFunctions @@ -946,7 +960,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_f * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_aligned_free */ @@ -964,7 +978,7 @@ extern SDL_DECLSPEC SDL_MALLOC void * SDLCALL SDL_aligned_alloc(size_t alignment * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_aligned_alloc */ @@ -977,14 +991,14 @@ extern SDL_DECLSPEC void SDLCALL SDL_aligned_free(void *mem); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_GetNumAllocations(void); /** * A thread-safe set of environment variables * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_GetEnvironment * \sa SDL_CreateEnvironment @@ -1010,7 +1024,7 @@ typedef struct SDL_Environment SDL_Environment; * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetEnvironmentVariable * \sa SDL_GetEnvironmentVariables @@ -1031,7 +1045,7 @@ extern SDL_DECLSPEC SDL_Environment * SDLCALL SDL_GetEnvironment(void); * from any thread, otherwise it is safe if no other threads are * calling setenv() or unsetenv() * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetEnvironmentVariable * \sa SDL_GetEnvironmentVariables @@ -1051,7 +1065,7 @@ extern SDL_DECLSPEC SDL_Environment * SDLCALL SDL_CreateEnvironment(bool populat * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetEnvironment * \sa SDL_CreateEnvironment @@ -1072,7 +1086,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetEnvironmentVariable(SDL_Environm * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetEnvironment * \sa SDL_CreateEnvironment @@ -1096,7 +1110,7 @@ extern SDL_DECLSPEC char ** SDLCALL SDL_GetEnvironmentVariables(SDL_Environment * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetEnvironment * \sa SDL_CreateEnvironment @@ -1116,7 +1130,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetEnvironmentVariable(SDL_Environment *env * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetEnvironment * \sa SDL_CreateEnvironment @@ -1135,7 +1149,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_UnsetEnvironmentVariable(SDL_Environment *e * \threadsafety It is safe to call this function from any thread, as long as * the environment is no longer in use. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateEnvironment */ @@ -1152,7 +1166,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyEnvironment(SDL_Environment *env); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC const char * SDLCALL SDL_getenv(const char *name); @@ -1169,7 +1183,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_getenv(const char *name); * \threadsafety This function is not thread safe, consider using SDL_getenv() * instead. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_getenv */ @@ -1187,7 +1201,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_getenv_unsafe(const char *name); * \threadsafety This function is not thread safe, consider using * SDL_SetEnvironmentVariable() instead. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetEnvironmentVariable */ @@ -1202,7 +1216,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_setenv_unsafe(const char *name, const char * * \threadsafety This function is not thread safe, consider using * SDL_UnsetEnvironmentVariable() instead. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_UnsetEnvironmentVariable */ @@ -1217,7 +1231,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_unsetenv_unsafe(const char *name); * before `a`, 0 if they are equal. If two elements are equal, their * order in the sorted array is undefined. * - * \since This callback is available since SDL 3.0.0. + * \since This callback is available since SDL 3.1.3. * * \sa SDL_bsearch * \sa SDL_qsort @@ -1261,7 +1275,9 @@ typedef int (SDLCALL *SDL_CompareCallback)(const void *a, const void *b); * \param size the size of the elements in the array. * \param compare a function used to compare elements in the array. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_bsearch * \sa SDL_qsort_r @@ -1309,7 +1325,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size * \returns a pointer to the matching element in the array, or NULL if not * found. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_bsearch_r * \sa SDL_qsort @@ -1326,7 +1344,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_bsearch(const void *key, const void *base * before `a`, 0 if they are equal. If two elements are equal, their * order in the sorted array is undefined. * - * \since This callback is available since SDL 3.0.0. + * \since This callback is available since SDL 3.1.3. * * \sa SDL_qsort_r * \sa SDL_bsearch_r @@ -1355,9 +1373,9 @@ typedef int (SDLCALL *SDL_CompareCallback_r)(void *userdata, const void *a, cons * const data *A = (const data *)a; * const data *B = (const data *)b; * - * if (A->n < B->n) { + * if (A->key < B->key) { * return (method == sort_increasing) ? -1 : 1; - * } else if (B->n < A->n) { + * } else if (B->key < A->key) { * return (method == sort_increasing) ? 1 : -1; * } else { * return 0; @@ -1377,7 +1395,9 @@ typedef int (SDLCALL *SDL_CompareCallback_r)(void *userdata, const void *a, cons * \param compare a function used to compare elements in the array. * \param userdata a pointer to pass to the compare function. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_bsearch_r * \sa SDL_qsort @@ -1407,9 +1427,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_qsort_r(void *base, size_t nmemb, size_t si * const data *A = (const data *)a; * const data *B = (const data *)b; * - * if (A->n < B->n) { + * if (A->key < B->key) { * return (method == sort_increasing) ? -1 : 1; - * } else if (B->n < A->n) { + * } else if (B->key < A->key) { * return (method == sort_increasing) ? 1 : -1; * } else { * return 0; @@ -1433,7 +1453,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_qsort_r(void *base, size_t nmemb, size_t si * \returns a pointer to the matching element in the array, or NULL if not * found. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_bsearch * \sa SDL_qsort_r @@ -1458,7 +1480,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_abs(int x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_isalpha(int x); @@ -1473,7 +1495,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_isalpha(int x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_isalnum(int x); @@ -1488,7 +1510,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_isalnum(int x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_isblank(int x); @@ -1503,7 +1525,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_isblank(int x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_iscntrl(int x); @@ -1518,7 +1540,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_iscntrl(int x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_isdigit(int x); @@ -1533,7 +1555,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_isdigit(int x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_isxdigit(int x); @@ -1548,7 +1570,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_isxdigit(int x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_isgraph * \sa SDL_isalnum @@ -1573,7 +1595,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_ispunct(int x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_isspace(int x); @@ -1588,7 +1610,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_isspace(int x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_isupper(int x); @@ -1603,7 +1625,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_isupper(int x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_islower(int x); @@ -1622,7 +1644,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_islower(int x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_isprint(int x); @@ -1641,7 +1663,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_isprint(int x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_isprint */ @@ -1661,7 +1683,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_isgraph(int x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_toupper(int x); @@ -1679,7 +1701,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_toupper(int x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_tolower(int x); @@ -1701,7 +1723,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_murmur3_32(const void *data, size_t len, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_memmove */ @@ -1732,7 +1754,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SD * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_memcpy */ @@ -1787,7 +1809,7 @@ extern SDL_DECLSPEC size_t SDLCALL SDL_wcsnlen(const wchar_t *wstr, size_t maxle * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_wcslcat */ @@ -1816,7 +1838,7 @@ extern SDL_DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *ds * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_wcslcpy */ @@ -1841,7 +1863,7 @@ extern SDL_DECLSPEC wchar_t * SDLCALL SDL_wcsnstr(const wchar_t *haystack, const * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2); @@ -1872,7 +1894,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *s * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen); @@ -1902,7 +1924,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t * * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2); @@ -1944,7 +1966,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_wcscasecmp(const wchar_t *str1, const wchar_ * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen); @@ -1969,13 +1991,54 @@ extern SDL_DECLSPEC int SDLCALL SDL_wcsncasecmp(const wchar_t *str1, const wchar * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_strtol */ extern SDL_DECLSPEC long SDLCALL SDL_wcstol(const wchar_t *str, wchar_t **endp, int base); +/** + * This works exactly like strlen() but doesn't require access to a C runtime. + * + * Counts the bytes in `str`, excluding the null terminator. + * + * If you need the length of a UTF-8 string, consider using SDL_utf8strlen(). + * + * \param str The null-terminated string to read. Must not be NULL. + * \returns The length (in bytes, excluding the null terminator) of `src`. + * + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. + * + * \sa SDL_strnlen + * \sa SDL_utf8strlen + * \sa SDL_utf8strnlen + */ extern SDL_DECLSPEC size_t SDLCALL SDL_strlen(const char *str); + +/** + * This works exactly like strnlen() but doesn't require access to a C + * runtime. + * + * Counts up to a maximum of `maxlen` bytes in `str`, excluding the null + * terminator. + * + * If you need the length of a UTF-8 string, consider using SDL_utf8strnlen(). + * + * \param str The null-terminated string to read. Must not be NULL. + * \param maxlen The maximum amount of bytes to count. + * \returns The length (in bytes, excluding the null terminator) of `src` but + * never more than `maxlen`. + * + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. + * + * \sa SDL_strlen + * \sa SDL_utf8strlen + * \sa SDL_utf8strnlen + */ extern SDL_DECLSPEC size_t SDLCALL SDL_strnlen(const char *str, size_t maxlen); /** @@ -2000,7 +2063,7 @@ extern SDL_DECLSPEC size_t SDLCALL SDL_strnlen(const char *str, size_t maxlen); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_strlcat * \sa SDL_utf8strlcpy @@ -2029,7 +2092,7 @@ extern SDL_DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_strlcpy */ @@ -2057,7 +2120,7 @@ extern SDL_DECLSPEC size_t SDLCALL SDL_utf8strlcpy(SDL_OUT_Z_CAP(dst_bytes) char * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_strlcpy */ @@ -2082,7 +2145,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_strrev(char *str); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_strlwr */ @@ -2103,7 +2166,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_strupr(char *str); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_strupr */ @@ -2136,7 +2199,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_ulltoa(unsigned long long value, char *st * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_atof * \sa SDL_strtol @@ -2159,7 +2222,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_atoi(const char *str); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_atoi * \sa SDL_strtol @@ -2191,7 +2254,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_atof(const char *str); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_atoi * \sa SDL_atof @@ -2225,7 +2288,7 @@ extern SDL_DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int ba * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_atoi * \sa SDL_atof @@ -2258,7 +2321,7 @@ extern SDL_DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **en * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_atoi * \sa SDL_atof @@ -2292,7 +2355,7 @@ extern SDL_DECLSPEC long long SDLCALL SDL_strtoll(const char *str, char **endp, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_atoi * \sa SDL_atof @@ -2322,7 +2385,7 @@ extern SDL_DECLSPEC unsigned long long SDLCALL SDL_strtoull(const char *str, cha * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_atoi * \sa SDL_atof @@ -2349,7 +2412,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2); @@ -2379,7 +2442,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen); @@ -2407,7 +2470,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2); @@ -2447,7 +2510,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen); @@ -2465,20 +2528,21 @@ extern SDL_DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *st * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC char * SDLCALL SDL_strpbrk(const char *str, const char *breakset); /** * The Unicode REPLACEMENT CHARACTER codepoint. * - * SDL_StepUTF8() reports this codepoint when it encounters a UTF-8 string - * with encoding errors. + * SDL_StepUTF8() and SDL_StepBackUTF8() report this codepoint when they + * encounter a UTF-8 string with encoding errors. * * This tends to render as something like a question mark in most places. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. * + * \sa SDL_StepBackUTF8 * \sa SDL_StepUTF8 */ #define SDL_INVALID_UNICODE_CODEPOINT 0xFFFD @@ -2524,10 +2588,41 @@ extern SDL_DECLSPEC char * SDLCALL SDL_strpbrk(const char *str, const char *brea * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC Uint32 SDLCALL SDL_StepUTF8(const char **pstr, size_t *pslen); +/** + * Decode a UTF-8 string in reverse, one Unicode codepoint at a time. + * + * This will go to the start of the previous Unicode codepoint in the string, + * move `*pstr` to that location and return that codepoint. + * + * If `*pstr` is already at the start of the string), it will not advance + * `*pstr` at all. + * + * Generally this function is called in a loop until it returns zero, + * adjusting its parameter each iteration. + * + * If an invalid UTF-8 sequence is encountered, this function returns + * SDL_INVALID_UNICODE_CODEPOINT. + * + * Several things can generate invalid UTF-8 sequences, including overlong + * encodings, the use of UTF-16 surrogate values, and truncated data. Please + * refer to + * [RFC3629](https://www.ietf.org/rfc/rfc3629.txt) + * for details. + * + * \param start a pointer to the beginning of the UTF-8 string. + * \param pstr a pointer to a UTF-8 string pointer to be read and adjusted. + * \returns the previous Unicode codepoint in the string. + * + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.6. + */ +extern SDL_DECLSPEC Uint32 SDLCALL SDL_StepBackUTF8(const char *start, const char **pstr); + /** * Convert a single Unicode codepoint to UTF-8. * @@ -2553,7 +2648,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_StepUTF8(const char **pstr, size_t *pslen * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC char * SDLCALL SDL_UCS4ToUTF8(Uint32 codepoint, char *dst); @@ -2579,7 +2674,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_vasprintf(char **strp, SDL_PRINTF_FORMAT_STR * \threadsafety This should be called on the same thread that calls * SDL_rand*() * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_rand * \sa SDL_rand_bits @@ -2614,7 +2709,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_srand(Uint64 seed); * * \threadsafety All calls should be made from a single thread * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_srand * \sa SDL_randf @@ -2637,7 +2732,7 @@ extern SDL_DECLSPEC Sint32 SDLCALL SDL_rand(Sint32 n); * * \threadsafety All calls should be made from a single thread * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_srand * \sa SDL_rand @@ -2659,7 +2754,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_randf(void); * * \threadsafety All calls should be made from a single thread * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_rand * \sa SDL_randf @@ -2694,7 +2789,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_rand_bits(void); * \threadsafety This function is thread-safe, as long as the state pointer * isn't shared between threads. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_rand * \sa SDL_rand_bits_r @@ -2721,7 +2816,7 @@ extern SDL_DECLSPEC Sint32 SDLCALL SDL_rand_r(Uint64 *state, Sint32 n); * \threadsafety This function is thread-safe, as long as the state pointer * isn't shared between threads. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_rand_bits_r * \sa SDL_rand_r @@ -2747,7 +2842,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_randf_r(Uint64 *state); * \threadsafety This function is thread-safe, as long as the state pointer * isn't shared between threads. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_rand_r * \sa SDL_randf_r @@ -2784,7 +2879,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_rand_bits_r(Uint64 *state); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_acosf * \sa SDL_asin @@ -2814,7 +2909,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_acos(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_acos * \sa SDL_asinf @@ -2844,7 +2939,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_acosf(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_asinf * \sa SDL_acos @@ -2874,7 +2969,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_asin(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_asin * \sa SDL_acosf @@ -2906,7 +3001,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_asinf(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_atanf * \sa SDL_atan2 @@ -2938,7 +3033,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_atan(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_atan * \sa SDL_atan2f @@ -2974,7 +3069,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_atanf(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_atan2f * \sa SDL_atan @@ -3010,7 +3105,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_atan2(double y, double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_atan2f * \sa SDL_atan @@ -3036,7 +3131,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_atan2f(float y, float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ceilf * \sa SDL_floor @@ -3064,7 +3159,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_ceil(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ceil * \sa SDL_floorf @@ -3093,7 +3188,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_ceilf(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_copysignf * \sa SDL_fabs @@ -3119,7 +3214,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_copysign(double x, double y); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_copysignf * \sa SDL_fabsf @@ -3146,7 +3241,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_copysignf(float x, float y); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_cosf * \sa SDL_acos @@ -3174,7 +3269,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_cos(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_cos * \sa SDL_acosf @@ -3207,7 +3302,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_cosf(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_expf * \sa SDL_log @@ -3239,7 +3334,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_exp(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_exp * \sa SDL_logf @@ -3261,7 +3356,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_expf(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_fabsf */ @@ -3282,7 +3377,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_fabs(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_fabs */ @@ -3306,7 +3401,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_fabsf(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_floorf * \sa SDL_ceil @@ -3334,7 +3429,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_floor(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_floor * \sa SDL_ceilf @@ -3362,7 +3457,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_floorf(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_truncf * \sa SDL_fmod @@ -3391,7 +3486,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_trunc(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_trunc * \sa SDL_fmodf @@ -3420,7 +3515,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_truncf(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_fmodf * \sa SDL_modf @@ -3450,7 +3545,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_fmod(double x, double y); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_fmod * \sa SDL_truncf @@ -3470,7 +3565,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_fmodf(float x, float y); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_isinff */ @@ -3484,7 +3579,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_isinf(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_isinf */ @@ -3498,7 +3593,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_isinff(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_isnanf */ @@ -3512,7 +3607,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_isnan(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_isnan */ @@ -3540,7 +3635,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_isnanf(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_logf * \sa SDL_log10 @@ -3570,7 +3665,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_log(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_log * \sa SDL_expf @@ -3599,7 +3694,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_logf(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_log10f * \sa SDL_log @@ -3629,7 +3724,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_log10(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_log10 * \sa SDL_logf @@ -3649,7 +3744,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_log10f(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_modff * \sa SDL_trunc @@ -3669,7 +3764,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_modf(double x, double *y); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_modf * \sa SDL_truncf @@ -3701,7 +3796,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_modff(float x, float *y); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_powf * \sa SDL_exp @@ -3733,7 +3828,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_pow(double x, double y); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_pow * \sa SDL_expf @@ -3760,7 +3855,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_powf(float x, float y); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_roundf * \sa SDL_lround @@ -3789,7 +3884,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_round(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_round * \sa SDL_lroundf @@ -3818,7 +3913,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_roundf(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_lroundf * \sa SDL_round @@ -3847,7 +3942,7 @@ extern SDL_DECLSPEC long SDLCALL SDL_lround(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_lround * \sa SDL_roundf @@ -3875,7 +3970,7 @@ extern SDL_DECLSPEC long SDLCALL SDL_lroundf(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_scalbnf * \sa SDL_pow @@ -3900,7 +3995,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_scalbn(double x, int n); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_scalbn * \sa SDL_powf @@ -3927,7 +4022,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_scalbnf(float x, int n); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_sinf * \sa SDL_asin @@ -3955,7 +4050,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_sin(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_sin * \sa SDL_asinf @@ -3983,7 +4078,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_sinf(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_sqrtf */ @@ -4009,7 +4104,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_sqrt(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_sqrt */ @@ -4035,7 +4130,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_sqrtf(float x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_tanf * \sa SDL_sin @@ -4065,7 +4160,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_tan(double x); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_tan * \sa SDL_sinf @@ -4092,7 +4187,7 @@ typedef struct SDL_iconv_data_t *SDL_iconv_t; * \returns a handle that must be freed with SDL_iconv_close, or * SDL_ICONV_ERROR on failure. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_iconv * \sa SDL_iconv_close @@ -4107,7 +4202,7 @@ extern SDL_DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode, * \param cd The character set conversion handle. * \returns 0 on success, or -1 on failure. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_iconv * \sa SDL_iconv_open @@ -4144,7 +4239,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd); * the location where to store the next output byte. - outbytesleft * will be set to the number of bytes left in the output buffer. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_iconv_open * \sa SDL_iconv_close @@ -4173,7 +4268,7 @@ extern SDL_DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, * \param inbytesleft the size of the input string _in bytes_. * \returns a new string, converted to the new encoding, or NULL on error. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_iconv_open * \sa SDL_iconv_close @@ -4212,6 +4307,9 @@ size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size); size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size); #endif +/* strdup is not ANSI but POSIX, and its prototype might be hidden... */ +char *strdup(const char *str); + /* Starting LLVM 16, the analyser errors out if these functions do not have their prototype defined (clang-diagnostic-implicit-function-declaration) */ #include @@ -4273,7 +4371,7 @@ size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ SDL_FORCE_INLINE bool SDL_size_mul_check_overflow(size_t a, size_t b, size_t *ret) { @@ -4312,7 +4410,7 @@ SDL_FORCE_INLINE bool SDL_size_mul_check_overflow_builtin(size_t a, size_t b, si * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ SDL_FORCE_INLINE bool SDL_size_add_check_overflow(size_t a, size_t b, size_t *ret) { @@ -4351,7 +4449,7 @@ SDL_FORCE_INLINE bool SDL_size_add_check_overflow_builtin(size_t a, size_t b, si * perhaps to work around a compiler or existing code, you can define * `SDL_FUNCTION_POINTER_IS_VOID_POINTER` before including any SDL headers. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef void (*SDL_FunctionPointer)(void); #elif defined(SDL_FUNCTION_POINTER_IS_VOID_POINTER) diff --git a/Source/ThirdParty/SDL/SDL3/SDL_storage.h b/Source/ThirdParty/SDL/SDL3/SDL_storage.h index 9edbcf8e4..c408120a5 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_storage.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_storage.h @@ -54,7 +54,7 @@ extern "C" { * * This structure should be initialized using SDL_INIT_INTERFACE() * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_INIT_INTERFACE */ @@ -114,7 +114,7 @@ SDL_COMPILE_TIME_ASSERT(SDL_StorageInterface_SIZE, * functions like SDL_OpenTitleStorage or SDL_OpenUserStorage, etc, or create * an object with a custom implementation using SDL_OpenStorage. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_Storage SDL_Storage; @@ -126,7 +126,7 @@ typedef struct SDL_Storage SDL_Storage; * \returns a title storage container on success or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CloseStorage * \sa SDL_GetStorageFileSize @@ -149,7 +149,7 @@ extern SDL_DECLSPEC SDL_Storage * SDLCALL SDL_OpenTitleStorage(const char *overr * \returns a user storage container on success or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CloseStorage * \sa SDL_GetStorageFileSize @@ -173,7 +173,7 @@ extern SDL_DECLSPEC SDL_Storage * SDLCALL SDL_OpenUserStorage(const char *org, c * \returns a filesystem storage container on success or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CloseStorage * \sa SDL_GetStorageFileSize @@ -202,7 +202,7 @@ extern SDL_DECLSPEC SDL_Storage * SDLCALL SDL_OpenFileStorage(const char *path); * \returns a storage container on success or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CloseStorage * \sa SDL_GetStorageFileSize @@ -223,7 +223,7 @@ extern SDL_DECLSPEC SDL_Storage * SDLCALL SDL_OpenStorage(const SDL_StorageInter * returns an error, the container data will be freed; the error is * only for informational purposes. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_OpenFileStorage * \sa SDL_OpenStorage @@ -242,7 +242,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CloseStorage(SDL_Storage *storage); * \param storage a storage container to query. * \returns true if the container is ready, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_StorageReady(SDL_Storage *storage); @@ -255,7 +255,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_StorageReady(SDL_Storage *storage); * \returns true if the file could be queried or false on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ReadStorageFile * \sa SDL_StorageReady @@ -273,7 +273,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetStorageFileSize(SDL_Storage *storage, co * \returns true if the file was read or false on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetStorageFileSize * \sa SDL_StorageReady @@ -291,7 +291,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadStorageFile(SDL_Storage *storage, const * \returns true if the file was written or false on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetStorageSpaceRemaining * \sa SDL_ReadStorageFile @@ -307,7 +307,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteStorageFile(SDL_Storage *storage, cons * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_StorageReady */ @@ -318,11 +318,13 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CreateStorageDirectory(SDL_Storage *storage * * This function provides every directory entry through an app-provided * callback, called once for each directory entry, until all results have been - * provided or the callback returns <= 0. + * provided or the callback returns either SDL_ENUM_SUCCESS or + * SDL_ENUM_FAILURE. * * This will return false if there was a system problem in general, or if a - * callback returns -1. A successful return means a callback returned 1 to - * halt enumeration, or all directory entries were enumerated. + * callback returns SDL_ENUM_FAILURE. A successful return means a callback + * returned SDL_ENUM_SUCCESS to halt enumeration, or all directory entries + * were enumerated. * * \param storage a storage container. * \param path the path of the directory to enumerate. @@ -331,7 +333,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CreateStorageDirectory(SDL_Storage *storage * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_StorageReady */ @@ -345,7 +347,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_EnumerateStorageDirectory(SDL_Storage *stor * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_StorageReady */ @@ -360,7 +362,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RemoveStoragePath(SDL_Storage *storage, con * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_StorageReady */ @@ -375,7 +377,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenameStoragePath(SDL_Storage *storage, con * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_StorageReady */ @@ -391,7 +393,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CopyStorageFile(SDL_Storage *storage, const * \returns true on success or false if the file doesn't exist, or another * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_StorageReady */ @@ -403,7 +405,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetStoragePathInfo(SDL_Storage *storage, co * \param storage a storage container to query. * \returns the amount of remaining space, in bytes. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_StorageReady * \sa SDL_WriteStorageFile @@ -443,7 +445,7 @@ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetStorageSpaceRemaining(SDL_Storage *sto * \threadsafety It is safe to call this function from any thread, assuming * the `storage` object is thread-safe. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC char ** SDLCALL SDL_GlobStorageDirectory(SDL_Storage *storage, const char *path, const char *pattern, SDL_GlobFlags flags, int *count); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_surface.h b/Source/ThirdParty/SDL/SDL3/SDL_surface.h index 2a758a6d9..b69454711 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_surface.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_surface.h @@ -22,7 +22,19 @@ /** * # CategorySurface * - * SDL_Surface definition and management functions. + * SDL surfaces are buffers of pixels in system RAM. These are useful for + * passing around and manipulating images that are not stored in GPU memory. + * + * SDL_Surface makes serious efforts to manage images in various formats, and + * provides a reasonable toolbox for transforming the data, including copying + * between surfaces, filling rectangles in the image data, etc. + * + * There is also a simple .bmp loader, SDL_LoadBMP(). SDL itself does not + * provide loaders for various other file formats, but there are several + * excellent external libraries that do, including its own satellite library, + * SDL_image: + * + * https://github.com/libsdl-org/SDL_image */ #ifndef SDL_surface_h_ @@ -47,7 +59,7 @@ extern "C" { * * These are generally considered read-only. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_SurfaceFlags; @@ -59,14 +71,14 @@ typedef Uint32 SDL_SurfaceFlags; /** * Evaluates to true if the surface needs to be locked before access. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_MUSTLOCK(S) ((((S)->flags & SDL_SURFACE_LOCK_NEEDED)) == SDL_SURFACE_LOCK_NEEDED) /** * The scaling mode. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_ScaleMode { @@ -77,7 +89,7 @@ typedef enum SDL_ScaleMode /** * The flip mode. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_FlipMode { @@ -103,7 +115,7 @@ typedef enum SDL_FlipMode * remaining bytes to reach the pitch are used as padding to reach a desired * alignment, and have undefined contents. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_CreateSurface * \sa SDL_DestroySurface @@ -136,7 +148,7 @@ typedef struct SDL_Surface SDL_Surface; * \returns the new SDL_Surface structure that is created or NULL on failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateSurfaceFrom * \sa SDL_DestroySurface @@ -164,7 +176,7 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_CreateSurface(int width, int heigh * \returns the new SDL_Surface structure that is created or NULL on failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateSurface * \sa SDL_DestroySurface @@ -178,9 +190,8 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_CreateSurfaceFrom(int width, int h * * \param surface the SDL_Surface to free. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * - * \sa SDL_CreateStackSurface * \sa SDL_CreateSurface * \sa SDL_CreateSurfaceFrom */ @@ -210,7 +221,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroySurface(SDL_Surface *surface); * \returns a valid property ID on success or 0 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetSurfaceProperties(SDL_Surface *surface); @@ -225,12 +236,12 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetSurfaceProperties(SDL_Surfac * interpreted in color operations. * * \param surface the SDL_Surface structure to update. - * \param colorspace an SDL_ColorSpace value describing the surface + * \param colorspace an SDL_Colorspace value describing the surface * colorspace. * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetSurfaceColorspace */ @@ -247,7 +258,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfaceColorspace(SDL_Surface *surface, * \returns the colorspace used by the surface, or SDL_COLORSPACE_UNKNOWN if * the surface is NULL. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetSurfaceColorspace */ @@ -275,7 +286,7 @@ extern SDL_DECLSPEC SDL_Colorspace SDLCALL SDL_GetSurfaceColorspace(SDL_Surface * the surface didn't have an index format); call SDL_GetError() for * more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetPaletteColors */ @@ -291,7 +302,7 @@ extern SDL_DECLSPEC SDL_Palette * SDLCALL SDL_CreateSurfacePalette(SDL_Surface * * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreatePalette * \sa SDL_GetSurfacePalette @@ -305,7 +316,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfacePalette(SDL_Surface *surface, SDL * \returns a pointer to the palette used by the surface, or NULL if there is * no palette used. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetSurfacePalette */ @@ -328,7 +339,7 @@ extern SDL_DECLSPEC SDL_Palette * SDLCALL SDL_GetSurfacePalette(SDL_Surface *sur * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_RemoveSurfaceAlternateImages * \sa SDL_GetSurfaceImages @@ -342,7 +353,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_AddSurfaceAlternateImage(SDL_Surface *surfa * \param surface the SDL_Surface structure to query. * \returns true if alternate versions are available or true otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AddSurfaceAlternateImage * \sa SDL_RemoveSurfaceAlternateImages @@ -367,7 +378,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SurfaceHasAlternateImages(SDL_Surface *surf * failure; call SDL_GetError() for more information. This should be * freed with SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AddSurfaceAlternateImage * \sa SDL_RemoveSurfaceAlternateImages @@ -383,7 +394,7 @@ extern SDL_DECLSPEC SDL_Surface ** SDLCALL SDL_GetSurfaceImages(SDL_Surface *sur * * \param surface the SDL_Surface structure to update. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AddSurfaceAlternateImage * \sa SDL_GetSurfaceImages @@ -407,7 +418,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_RemoveSurfaceAlternateImages(SDL_Surface *s * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_MUSTLOCK * \sa SDL_UnlockSurface @@ -419,7 +430,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_LockSurface(SDL_Surface *surface); * * \param surface the SDL_Surface structure to be unlocked. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LockSurface */ @@ -437,7 +448,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface *surface); * \returns a pointer to a new SDL_Surface structure or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DestroySurface * \sa SDL_LoadBMP @@ -455,7 +466,7 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_LoadBMP_IO(SDL_IOStream *src, bool * \returns a pointer to a new SDL_Surface structure or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DestroySurface * \sa SDL_LoadBMP_IO @@ -479,7 +490,7 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_LoadBMP(const char *file); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LoadBMP_IO * \sa SDL_SaveBMP @@ -500,7 +511,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SaveBMP_IO(SDL_Surface *surface, SDL_IOStre * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_LoadBMP * \sa SDL_SaveBMP_IO @@ -518,7 +529,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SaveBMP(SDL_Surface *surface, const char *f * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BlitSurface * \sa SDL_LockSurface @@ -534,7 +545,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfaceRLE(SDL_Surface *surface, bool en * \param surface the SDL_Surface structure to query. * \returns true if the surface is RLE enabled, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetSurfaceRLE */ @@ -556,7 +567,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SurfaceHasRLE(SDL_Surface *surface); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetSurfaceColorKey * \sa SDL_SetSurfaceRLE @@ -572,7 +583,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfaceColorKey(SDL_Surface *surface, bo * \param surface the SDL_Surface structure to query. * \returns true if the surface has a color key, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetSurfaceColorKey * \sa SDL_GetSurfaceColorKey @@ -592,7 +603,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SurfaceHasColorKey(SDL_Surface *surface); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetSurfaceColorKey * \sa SDL_SurfaceHasColorKey @@ -615,7 +626,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetSurfaceColorKey(SDL_Surface *surface, Ui * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetSurfaceColorMod * \sa SDL_SetSurfaceAlphaMod @@ -633,7 +644,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfaceColorMod(SDL_Surface *surface, Ui * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetSurfaceAlphaMod * \sa SDL_SetSurfaceColorMod @@ -653,7 +664,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetSurfaceColorMod(SDL_Surface *surface, Ui * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetSurfaceAlphaMod * \sa SDL_SetSurfaceColorMod @@ -668,7 +679,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Ui * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetSurfaceColorMod * \sa SDL_SetSurfaceAlphaMod @@ -687,7 +698,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface *surface, Ui * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetSurfaceBlendMode */ @@ -701,7 +712,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface *surface, S * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetSurfaceBlendMode */ @@ -722,7 +733,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface *surface, S * \returns true if the rectangle intersects the surface, otherwise false and * blits will be completely clipped. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetSurfaceClipRect */ @@ -741,7 +752,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfaceClipRect(SDL_Surface *surface, co * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetSurfaceClipRect */ @@ -755,7 +766,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetSurfaceClipRect(SDL_Surface *surface, SD * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_FlipSurface(SDL_Surface *surface, SDL_FlipMode flip); @@ -771,7 +782,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_FlipSurface(SDL_Surface *surface, SDL_FlipM * \returns a copy of the surface or NULL on failure; call SDL_GetError() for * more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DestroySurface */ @@ -790,7 +801,7 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_DuplicateSurface(SDL_Surface *surf * \returns a copy of the surface or NULL on failure; call SDL_GetError() for * more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DestroySurface */ @@ -815,7 +826,7 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_ScaleSurface(SDL_Surface *surface, * \returns the new SDL_Surface structure that is created or NULL on failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ConvertSurfaceAndColorspace * \sa SDL_DestroySurface @@ -841,7 +852,7 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_ConvertSurface(SDL_Surface *surfac * \returns the new SDL_Surface structure that is created or NULL on failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ConvertSurface * \sa SDL_ConvertSurface @@ -863,7 +874,7 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_ConvertSurfaceAndColorspace(SDL_Su * \returns false on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ConvertPixelsAndColorspace */ @@ -876,14 +887,14 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ConvertPixels(int width, int height, SDL_Pi * \param width the width of the block to copy, in pixels. * \param height the height of the block to copy, in pixels. * \param src_format an SDL_PixelFormat value of the `src` pixels format. - * \param src_colorspace an SDL_ColorSpace value describing the colorspace of + * \param src_colorspace an SDL_Colorspace value describing the colorspace of * the `src` pixels. * \param src_properties an SDL_PropertiesID with additional source color * properties, or 0. * \param src a pointer to the source pixels. * \param src_pitch the pitch of the source pixels, in bytes. * \param dst_format an SDL_PixelFormat value of the `dst` pixels format. - * \param dst_colorspace an SDL_ColorSpace value describing the colorspace of + * \param dst_colorspace an SDL_Colorspace value describing the colorspace of * the `dst` pixels. * \param dst_properties an SDL_PropertiesID with additional destination color * properties, or 0. @@ -892,7 +903,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ConvertPixels(int width, int height, SDL_Pi * \returns false on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ConvertPixels */ @@ -916,7 +927,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ConvertPixelsAndColorspace(int width, int h * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_PremultiplyAlpha(int width, int height, SDL_PixelFormat src_format, const void *src, int src_pitch, SDL_PixelFormat dst_format, void *dst, int dst_pitch, bool linear); @@ -931,7 +942,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PremultiplyAlpha(int width, int height, SDL * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_PremultiplySurfaceAlpha(SDL_Surface *surface, bool linear); @@ -951,7 +962,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PremultiplySurfaceAlpha(SDL_Surface *surfac * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ClearSurface(SDL_Surface *surface, float r, float g, float b, float a); @@ -974,7 +985,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ClearSurface(SDL_Surface *surface, float r, * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_FillSurfaceRects */ @@ -999,7 +1010,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_FillSurfaceRect(SDL_Surface *dst, const SDL * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_FillSurfaceRect */ @@ -1074,7 +1085,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_FillSurfaceRects(SDL_Surface *dst, const SD * threads at once. It is safe to use the same source surface * from multiple threads. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BlitSurfaceScaled */ @@ -1099,7 +1110,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurface(SDL_Surface *src, const SDL_Rec * threads at once. It is safe to use the same source surface * from multiple threads. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BlitSurface */ @@ -1124,7 +1135,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurfaceUnchecked(SDL_Surface *src, cons * threads at once. It is safe to use the same source surface * from multiple threads. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BlitSurface */ @@ -1150,7 +1161,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurfaceScaled(SDL_Surface *src, const S * threads at once. It is safe to use the same source surface * from multiple threads. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BlitSurfaceScaled */ @@ -1176,7 +1187,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurfaceUncheckedScaled(SDL_Surface *src * threads at once. It is safe to use the same source surface * from multiple threads. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BlitSurface */ @@ -1206,7 +1217,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurfaceTiled(SDL_Surface *src, const SD * threads at once. It is safe to use the same source surface * from multiple threads. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BlitSurface */ @@ -1243,7 +1254,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurfaceTiledWithScale(SDL_Surface *src, * threads at once. It is safe to use the same source surface * from multiple threads. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_BlitSurface */ @@ -1273,7 +1284,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurface9Grid(SDL_Surface *src, const SD * \param b the blue component of the pixel in the range 0-255. * \returns a pixel value. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_MapSurfaceRGBA */ @@ -1304,7 +1315,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_MapSurfaceRGB(SDL_Surface *surface, Uint8 * \param a the alpha component of the pixel in the range 0-255. * \returns a pixel value. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_MapSurfaceRGB */ @@ -1333,7 +1344,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_MapSurfaceRGBA(SDL_Surface *surface, Uint * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadSurfacePixel(SDL_Surface *surface, int x, int y, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a); @@ -1357,7 +1368,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadSurfacePixel(SDL_Surface *surface, int * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ReadSurfacePixelFloat(SDL_Surface *surface, int x, int y, float *r, float *g, float *b, float *a); @@ -1380,7 +1391,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadSurfacePixelFloat(SDL_Surface *surface, * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteSurfacePixel(SDL_Surface *surface, int x, int y, Uint8 r, Uint8 g, Uint8 b, Uint8 a); @@ -1400,7 +1411,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteSurfacePixel(SDL_Surface *surface, int * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_WriteSurfacePixelFloat(SDL_Surface *surface, int x, int y, float r, float g, float b, float a); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_system.h b/Source/ThirdParty/SDL/SDL3/SDL_system.h index 88e318ddf..c144fb671 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_system.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_system.h @@ -64,7 +64,7 @@ typedef struct tagMSG MSG; * \threadsafety This may only be called (by SDL) from the thread handling the * Windows event loop. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_SetWindowsMessageHook * \sa SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP @@ -80,7 +80,7 @@ typedef bool (SDLCALL *SDL_WindowsMessageHook)(void *userdata, MSG *msg); * \param callback the SDL_WindowsMessageHook function to call. * \param userdata a pointer to pass to every iteration of `callback`. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_WindowsMessageHook * \sa SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP @@ -101,7 +101,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHoo * \returns the D3D9 adapter index on success or -1 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID); @@ -118,7 +118,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displ * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int *adapterIndex, int *outputIndex); @@ -141,7 +141,7 @@ typedef bool (SDLCALL *SDL_X11EventHook)(void *userdata, XEvent *xevent); * \param callback the SDL_X11EventHook function to call. * \param userdata a pointer to pass to every iteration of `callback`. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_SetX11EventHook(SDL_X11EventHook callback, void *userdata); @@ -158,7 +158,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetX11EventHook(SDL_X11EventHook callback, * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriority(Sint64 threadID, int priority); @@ -174,7 +174,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriority(Sint64 threadID, int * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy); @@ -197,7 +197,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriorityAndPolicy(Sint64 thre * \param userdata what was passed as `callbackParam` to * SDL_SetiOSAnimationCallback as `callbackParam`. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_SetiOSAnimationCallback */ @@ -236,7 +236,7 @@ typedef void (SDLCALL *SDL_iOSAnimationCallback)(void *userdata); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetiOSEventPump */ @@ -249,7 +249,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetiOSAnimationCallback(SDL_Window *window, * * \param enabled true to enable the event pump, false to disable it. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetiOSAnimationCallback */ @@ -279,7 +279,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetiOSEventPump(bool enabled); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAndroidActivity */ @@ -304,7 +304,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_GetAndroidJNIEnv(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAndroidJNIEnv */ @@ -342,7 +342,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_GetAndroidActivity(void); * * \returns the Android API level. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void); @@ -351,7 +351,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void); * * \returns true if this is a Chromebook, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_IsChromebook(void); @@ -360,7 +360,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsChromebook(void); * * \returns true if this is a DeX docking station, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_IsDeXMode(void); @@ -369,7 +369,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsDeXMode(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_SendAndroidBackButton(void); @@ -377,7 +377,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SendAndroidBackButton(void); * See the official Android developer guide for more information: * http://developer.android.com/guide/topics/data/data-storage.html * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01 #define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02 @@ -398,9 +398,10 @@ extern SDL_DECLSPEC void SDLCALL SDL_SendAndroidBackButton(void); * \returns the path used for internal storage or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * - * \sa SDL_GetAndroidExternalStorageState + * \sa SDL_GetAndroidExternalStoragePath + * \sa SDL_GetAndroidCachePath */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidInternalStoragePath(void); @@ -415,7 +416,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidInternalStoragePath(void) * \returns the current state of external storage, or 0 if external storage is * currently unavailable. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAndroidExternalStoragePath */ @@ -437,9 +438,11 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetAndroidExternalStorageState(void); * \returns the path used for external storage for this application on success * or NULL on failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetAndroidExternalStorageState + * \sa SDL_GetAndroidInternalStoragePath + * \sa SDL_GetAndroidCachePath */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidExternalStoragePath(void); @@ -458,7 +461,10 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidExternalStoragePath(void) * \returns the path used for caches for this application on success or NULL * on failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. + * + * \sa SDL_GetAndroidInternalStoragePath + * \sa SDL_GetAndroidExternalStoragePath */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidCachePath(void); @@ -484,6 +490,10 @@ typedef void (SDLCALL *SDL_RequestAndroidPermissionCallback)(void *userdata, con * like memory running out. Normally there will be a yes or no to the request * through the callback. * + * For the `permission` parameter, choose a value from here: + * + * https://developer.android.com/reference/android/Manifest.permission + * * \param permission the permission to request. * \param cb the callback to trigger when the request has a response. * \param userdata an app-controlled pointer that is passed to the callback. @@ -493,7 +503,7 @@ typedef void (SDLCALL *SDL_RequestAndroidPermissionCallback)(void *userdata, con * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_RequestAndroidPermission(const char *permission, SDL_RequestAndroidPermissionCallback cb, void *userdata); @@ -521,7 +531,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RequestAndroidPermission(const char *permis * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ShowAndroidToast(const char *message, int duration, int gravity, int xoffset, int yoffset); @@ -537,7 +547,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ShowAndroidToast(const char *message, int d * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SendAndroidMessage(Uint32 command, int param); @@ -550,7 +560,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SendAndroidMessage(Uint32 command, int para * * \returns true if the device is a tablet, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_IsTablet(void); @@ -561,10 +571,35 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsTablet(void); * * \returns true if the device is a TV, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_IsTV(void); +/** + * Application sandbox environment. + * + * \since This enum is available since SDL 3.2.0. + */ +typedef enum SDL_Sandbox +{ + SDL_SANDBOX_NONE = 0, + SDL_SANDBOX_UNKNOWN_CONTAINER, + SDL_SANDBOX_FLATPAK, + SDL_SANDBOX_SNAP, + SDL_SANDBOX_MACOS +} SDL_Sandbox; + +/** + * Get the application sandbox environment, if any. + * + * \returns the application sandbox environment or SDL_SANDBOX_NONE if the + * application is not running in a sandbox environment. + * + * \since This function is available since SDL 3.1.6. + */ +extern SDL_DECLSPEC SDL_Sandbox SDLCALL SDL_GetSandbox(void); + + /* Functions used by iOS app delegates to notify SDL about state changes. */ /** @@ -580,7 +615,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsTV(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationWillTerminate(void); @@ -597,7 +632,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationWillTerminate(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationDidReceiveMemoryWarning(void); @@ -614,7 +649,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationDidReceiveMemoryWarning(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationWillEnterBackground(void); @@ -631,7 +666,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationWillEnterBackground(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void); @@ -648,7 +683,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void); @@ -665,7 +700,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationDidEnterForeground(void); @@ -684,7 +719,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationDidEnterForeground(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void); #endif @@ -708,7 +743,7 @@ typedef struct XUser *XUserHandle; * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetGDKTaskQueue(XTaskQueueHandle *outTaskQueue); @@ -723,7 +758,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetGDKTaskQueue(XTaskQueueHandle *outTaskQu * \returns true if success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetGDKDefaultUser(XUserHandle *outUserHandle); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_test_compare.h b/Source/ThirdParty/SDL/SDL3/SDL_test_compare.h index a7e18e3c7..24bc9ee6e 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_test_compare.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_test_compare.h @@ -65,7 +65,7 @@ int SDLCALL SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *reference * * \returns 0 if the left and right memory block are equal, non-zero if they are non-equal. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ int SDLCALL SDLTest_CompareMemory(const void *actual, size_t size_actual, const void *reference, size_t size_reference); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_test_font.h b/Source/ThirdParty/SDL/SDL3/SDL_test_font.h index 99308abbf..9d7b346eb 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_test_font.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_test_font.h @@ -93,7 +93,7 @@ typedef struct SDLTest_TextWindow * * \returns the new window, or NULL on failure. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ SDLTest_TextWindow * SDLCALL SDLTest_TextWindowCreate(float x, float y, float w, float h); @@ -105,7 +105,7 @@ SDLTest_TextWindow * SDLCALL SDLTest_TextWindowCreate(float x, float y, float w, * \param textwin The text output window * \param renderer The renderer to use for display * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ void SDLCALL SDLTest_TextWindowDisplay(SDLTest_TextWindow *textwin, SDL_Renderer *renderer); @@ -120,7 +120,7 @@ void SDLCALL SDLTest_TextWindowDisplay(SDLTest_TextWindow *textwin, SDL_Renderer * \param fmt A printf() style format string * \param ... additional parameters matching % tokens in the `fmt` string, if any * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ void SDLCALL SDLTest_TextWindowAddText(SDLTest_TextWindow *textwin, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2); @@ -135,7 +135,7 @@ void SDLCALL SDLTest_TextWindowAddText(SDLTest_TextWindow *textwin, SDL_PRINTF_F * \param text The text to add to the window * \param len The length, in bytes, of the text to add to the window * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ void SDLCALL SDLTest_TextWindowAddTextWithLength(SDLTest_TextWindow *textwin, const char *text, size_t len); @@ -144,7 +144,7 @@ void SDLCALL SDLTest_TextWindowAddTextWithLength(SDLTest_TextWindow *textwin, co * * \param textwin The text output window * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ void SDLCALL SDLTest_TextWindowClear(SDLTest_TextWindow *textwin); @@ -153,7 +153,7 @@ void SDLCALL SDLTest_TextWindowClear(SDLTest_TextWindow *textwin); * * \param textwin The text output window * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ void SDLCALL SDLTest_TextWindowDestroy(SDLTest_TextWindow *textwin); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_thread.h b/Source/ThirdParty/SDL/SDL3/SDL_thread.h index f21356544..0eb481587 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_thread.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_thread.h @@ -50,7 +50,7 @@ extern "C" { * * These are opaque data. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_CreateThread * \sa SDL_WaitThread @@ -64,7 +64,7 @@ typedef struct SDL_Thread SDL_Thread; * application will operate on, but having a way to uniquely identify a thread * can be useful at times. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_GetThreadID * \sa SDL_GetCurrentThreadID @@ -77,7 +77,7 @@ typedef Uint64 SDL_ThreadID; * 0 is the invalid ID. An app can create these and then set data for these * IDs that is unique to each thread. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_GetTLS * \sa SDL_SetTLS @@ -93,7 +93,7 @@ typedef SDL_AtomicInt SDL_TLSID; * state. SDL_HINT_THREAD_PRIORITY_POLICY can be used to control aspects of * this behavior. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_ThreadPriority { SDL_THREAD_PRIORITY_LOW, @@ -108,7 +108,7 @@ typedef enum SDL_ThreadPriority { * \param data what was passed as `data` to SDL_CreateThread(). * \returns a value that can be reported through SDL_WaitThread(). * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef int (SDLCALL * SDL_ThreadFunction) (void *data); @@ -178,7 +178,7 @@ typedef int (SDLCALL * SDL_ThreadFunction) (void *data); * new thread could not be created; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateThreadWithProperties * \sa SDL_WaitThread @@ -244,7 +244,7 @@ extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(SDL_ThreadFunction fn, * new thread could not be created; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateThread * \sa SDL_WaitThread @@ -299,7 +299,7 @@ extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadWithProperties(SDL_Prop * new thread could not be created; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadRuntime(SDL_ThreadFunction fn, const char *name, void *data, SDL_FunctionPointer pfnBeginThread, SDL_FunctionPointer pfnEndThread); @@ -313,7 +313,7 @@ extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadRuntime(SDL_ThreadFunct * new thread could not be created; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadWithPropertiesRuntime(SDL_PropertiesID props, SDL_FunctionPointer pfnBeginThread, SDL_FunctionPointer pfnEndThread); @@ -333,7 +333,7 @@ extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadWithPropertiesRuntime(S * \returns a pointer to a UTF-8 string that names the specified thread, or * NULL if it doesn't have a name. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetThreadName(SDL_Thread *thread); @@ -349,7 +349,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetThreadName(SDL_Thread *thread); * * \returns the ID of the current thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetThreadID */ @@ -366,7 +366,7 @@ extern SDL_DECLSPEC SDL_ThreadID SDLCALL SDL_GetCurrentThreadID(void); * \returns the ID of the specified thread, or the ID of the current thread if * `thread` is NULL. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetCurrentThreadID */ @@ -383,7 +383,7 @@ extern SDL_DECLSPEC SDL_ThreadID SDLCALL SDL_GetThreadID(SDL_Thread *thread); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetCurrentThreadPriority(SDL_ThreadPriority priority); @@ -415,7 +415,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetCurrentThreadPriority(SDL_ThreadPriority * from the thread function by its 'return', or NULL to not * receive such value back. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateThread * \sa SDL_DetachThread @@ -451,7 +451,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread *thread, int *status) * \param thread the SDL_Thread pointer that was returned from the * SDL_CreateThread() call that started this thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateThread * \sa SDL_WaitThread @@ -467,7 +467,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread *thread); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetTLS */ @@ -480,7 +480,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_GetTLS(SDL_TLSID *id); * * \param value a pointer previously handed to SDL_SetTLS. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_SetTLS */ @@ -508,7 +508,7 @@ typedef void (SDLCALL *SDL_TLSDestructorCallback)(void *value); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetTLS */ @@ -523,7 +523,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetTLS(SDL_TLSID *id, const void *value, SD * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_CleanupTLS(void); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_time.h b/Source/ThirdParty/SDL/SDL3/SDL_time.h index eb73f7a7f..4dfe84f94 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_time.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_time.h @@ -41,7 +41,7 @@ extern "C" { * A structure holding a calendar date and time broken down into its * components. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. */ typedef struct SDL_DateTime { @@ -59,7 +59,7 @@ typedef struct SDL_DateTime /** * The preferred date format of the current system locale. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. * * \sa SDL_GetDateTimeLocalePreferences */ @@ -73,7 +73,7 @@ typedef enum SDL_DateFormat /** * The preferred time format of the current system locale. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. * * \sa SDL_GetDateTimeLocalePreferences */ @@ -98,7 +98,7 @@ typedef enum SDL_TimeFormat * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetDateTimeLocalePreferences(SDL_DateFormat *dateFormat, SDL_TimeFormat *timeFormat); @@ -110,7 +110,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetDateTimeLocalePreferences(SDL_DateFormat * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetCurrentTime(SDL_Time *ticks); @@ -126,7 +126,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetCurrentTime(SDL_Time *ticks); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime *dt, bool localTime); @@ -141,7 +141,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_DateTimeToTime(const SDL_DateTime *dt, SDL_Time *ticks); @@ -157,7 +157,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_DateTimeToTime(const SDL_DateTime *dt, SDL_ * \param dwHighDateTime a pointer filled in with the high portion of the * Windows FILETIME value. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_TimeToWindows(SDL_Time ticks, Uint32 *dwLowDateTime, Uint32 *dwHighDateTime); @@ -172,7 +172,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_TimeToWindows(SDL_Time ticks, Uint32 *dwLow * \param dwHighDateTime the high portion of the Windows FILETIME value. * \returns the converted SDL time. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Time SDLCALL SDL_TimeFromWindows(Uint32 dwLowDateTime, Uint32 dwHighDateTime); @@ -184,7 +184,7 @@ extern SDL_DECLSPEC SDL_Time SDLCALL SDL_TimeFromWindows(Uint32 dwLowDateTime, U * \returns the number of days in the requested month or -1 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_GetDaysInMonth(int year, int month); @@ -197,7 +197,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetDaysInMonth(int year, int month); * \returns the day of year [0-365] if the date is valid or -1 on failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_GetDayOfYear(int year, int month, int day); @@ -210,7 +210,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetDayOfYear(int year, int month, int day); * \returns a value between 0 and 6 (0 being Sunday) if the date is valid or * -1 on failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC int SDLCALL SDL_GetDayOfWeek(int year, int month, int day); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_timer.h b/Source/ThirdParty/SDL/SDL3/SDL_timer.h index fa8b2bb22..62206cc77 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_timer.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_timer.h @@ -56,7 +56,9 @@ extern "C" { * \returns an unsigned 64-bit value representing the number of milliseconds * since the SDL library initialized. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetTicks(void); @@ -66,7 +68,9 @@ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetTicks(void); * \returns an unsigned 64-bit value representing the number of nanoseconds * since the SDL library initialized. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetTicksNS(void); @@ -81,7 +85,9 @@ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetTicksNS(void); * * \returns the current counter value. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPerformanceFrequency */ @@ -92,7 +98,9 @@ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void); * * \returns a platform-specific count per second. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetPerformanceCounter */ @@ -107,10 +115,27 @@ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetPerformanceFrequency(void); * * \param ms the number of milliseconds to delay. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_Delay(Uint32 ms); +/** + * Wait a specified number of nanoseconds before returning. + * + * This function waits a specified number of nanoseconds before returning. It + * waits at least the specified time, but possibly longer due to OS + * scheduling. + * + * \param ns the number of nanoseconds to delay. + * + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. + */ +extern SDL_DECLSPEC void SDLCALL SDL_DelayNS(Uint64 ns); + /** * Wait a specified number of nanoseconds before returning. * @@ -120,14 +145,16 @@ extern SDL_DECLSPEC void SDLCALL SDL_Delay(Uint32 ms); * * \param ns the number of nanoseconds to delay. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.6. */ -extern SDL_DECLSPEC void SDLCALL SDL_DelayNS(Uint64 ns); +extern SDL_DECLSPEC void SDLCALL SDL_DelayPrecise(Uint64 ns); /** * Definition of the timer ID type. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_TimerID; @@ -151,7 +178,7 @@ typedef Uint32 SDL_TimerID; * thread; the application is responsible for locking resources * the callback touches that need to be protected. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_AddTimer */ @@ -186,7 +213,7 @@ typedef Uint32 (SDLCALL *SDL_TimerCallback)(void *userdata, SDL_TimerID timerID, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AddTimerNS * \sa SDL_RemoveTimer @@ -213,7 +240,7 @@ extern SDL_DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval, SDL_TimerC * thread; the application is responsible for locking resources * the callback touches that need to be protected. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_AddTimerNS */ @@ -248,7 +275,7 @@ typedef Uint64 (SDLCALL *SDL_NSTimerCallback)(void *userdata, SDL_TimerID timerI * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_AddTimer * \sa SDL_RemoveTimer @@ -262,7 +289,9 @@ extern SDL_DECLSPEC SDL_TimerID SDLCALL SDL_AddTimerNS(Uint64 interval, SDL_NSTi * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.1.3. * * \sa SDL_AddTimer */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_touch.h b/Source/ThirdParty/SDL/SDL3/SDL_touch.h index 2b07d2d32..3eb47d52d 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_touch.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_touch.h @@ -56,7 +56,7 @@ typedef enum SDL_TouchDeviceType * contact with the touch device (so a "touch" can be a "multitouch," in * reality), and this struct reports details of the specific fingers. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_GetTouchFingers */ @@ -88,7 +88,7 @@ typedef struct SDL_Finger * SDL_GetError() for more information. This should be freed with * SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_TouchID * SDLCALL SDL_GetTouchDevices(int *count); @@ -99,7 +99,7 @@ extern SDL_DECLSPEC SDL_TouchID * SDLCALL SDL_GetTouchDevices(int *count); * \returns touch device name, or NULL on failure; call SDL_GetError() for * more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC const char * SDLCALL SDL_GetTouchDeviceName(SDL_TouchID touchID); @@ -109,7 +109,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetTouchDeviceName(SDL_TouchID touc * \param touchID the ID of a touch device. * \returns touch device type. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID); @@ -124,7 +124,7 @@ extern SDL_DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_Touch * allocation that should be freed with SDL_free() when it is no * longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Finger ** SDLCALL SDL_GetTouchFingers(SDL_TouchID touchID, int *count); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_version.h b/Source/ThirdParty/SDL/SDL3/SDL_version.h index 09b010dc0..427612b05 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_version.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_version.h @@ -42,7 +42,7 @@ extern "C" { * * If this were SDL version 3.2.1, this value would be 3. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_MAJOR_VERSION 3 @@ -51,7 +51,7 @@ extern "C" { * * If this were SDL version 3.2.1, this value would be 2. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_MINOR_VERSION 1 @@ -60,9 +60,9 @@ extern "C" { * * If this were SDL version 3.2.1, this value would be 1. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ -#define SDL_MICRO_VERSION 3 +#define SDL_MICRO_VERSION 7 /** * This macro turns the version numbers into a numeric value. @@ -73,7 +73,7 @@ extern "C" { * \param minor the minorversion number. * \param patch the patch version number. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_VERSIONNUM(major, minor, patch) \ ((major) * 1000000 + (minor) * 1000 + (patch)) @@ -85,7 +85,7 @@ extern "C" { * * \param version the version number. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_VERSIONNUM_MAJOR(version) ((version) / 1000000) @@ -96,7 +96,7 @@ extern "C" { * * \param version the version number. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_VERSIONNUM_MINOR(version) (((version) / 1000) % 1000) @@ -107,14 +107,16 @@ extern "C" { * * \param version the version number. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_VERSIONNUM_MICRO(version) ((version) % 1000) /** * This is the version number macro for the current SDL version. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. + * + * \sa SDL_GetVersion */ #define SDL_VERSION \ SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION) @@ -122,7 +124,7 @@ extern "C" { /** * This macro will evaluate to true if compiled with SDL at least X.Y.Z. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_VERSION_ATLEAST(X, Y, Z) \ (SDL_VERSION >= SDL_VERSIONNUM(X, Y, Z)) @@ -139,7 +141,7 @@ extern "C" { * * \returns the version of the linked library. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRevision */ @@ -165,7 +167,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetVersion(void); * \returns an arbitrary string, uniquely identifying the exact revision of * the SDL library in use. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetVersion */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_video.h b/Source/ThirdParty/SDL/SDL3/SDL_video.h index 4310f03e3..e4c9e278f 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_video.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_video.h @@ -70,7 +70,7 @@ extern "C" { * * The value 0 is an invalid ID. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_DisplayID; @@ -79,7 +79,7 @@ typedef Uint32 SDL_DisplayID; * * The value 0 is an invalid ID. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_WindowID; @@ -103,7 +103,7 @@ typedef Uint32 SDL_WindowID; /** * System theme. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_SystemTheme { @@ -118,7 +118,7 @@ typedef struct SDL_DisplayModeData SDL_DisplayModeData; /** * The structure that defines a display mode. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_GetFullscreenDisplayModes * \sa SDL_GetDesktopDisplayMode @@ -144,7 +144,7 @@ typedef struct SDL_DisplayMode /** * Display orientation values; the way a display is rotated. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_DisplayOrientation { @@ -158,7 +158,7 @@ typedef enum SDL_DisplayOrientation /** * The struct used as an opaque handle to a window. * - * \since This struct is available since SDL 3.0.0. + * \since This struct is available since SDL 3.1.3. * * \sa SDL_CreateWindow */ @@ -172,7 +172,7 @@ typedef struct SDL_Window SDL_Window; * changed on existing windows by the app, and some of it might be altered by * the user or system outside of the app's control. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_GetWindowFlags */ @@ -208,7 +208,7 @@ typedef Uint64 SDL_WindowFlags; /** * Used to indicate that you don't care what the window position is. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000u #define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X)) @@ -219,7 +219,7 @@ typedef Uint64 SDL_WindowFlags; /** * Used to indicate that the window position should be centered. * - * \since This macro is available since SDL 3.0.0. + * \since This macro is available since SDL 3.1.3. */ #define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000u #define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X)) @@ -230,7 +230,7 @@ typedef Uint64 SDL_WindowFlags; /** * Window flash operation. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ typedef enum SDL_FlashOperation { @@ -242,7 +242,7 @@ typedef enum SDL_FlashOperation /** * An opaque handle to an OpenGL context. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_GL_CreateContext */ @@ -251,7 +251,7 @@ typedef struct SDL_GLContextState *SDL_GLContext; /** * Opaque EGL types. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ typedef void *SDL_EGLDisplay; typedef void *SDL_EGLConfig; @@ -278,7 +278,7 @@ typedef int SDL_EGLint; * \param userdata an app-controlled pointer that is passed to the callback. * \returns a newly-allocated array of attributes, terminated with `EGL_NONE`. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_EGL_SetAttributeCallbacks */ @@ -309,7 +309,7 @@ typedef SDL_EGLAttrib *(SDLCALL *SDL_EGLAttribArrayCallback)(void *userdata); * \param config the EGL config to be used. * \returns a newly-allocated array of attributes, terminated with `EGL_NONE`. * - * \since This datatype is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. * * \sa SDL_EGL_SetAttributeCallbacks */ @@ -330,9 +330,9 @@ typedef SDL_EGLint *(SDLCALL *SDL_EGLIntArrayCallback)(void *userdata, SDL_EGLDi * fail if the GL can't provide your requested attributes at a minimum, but * you should check to see exactly what you got. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. */ -typedef enum SDL_GLattr +typedef enum SDL_GLAttr { SDL_GL_RED_SIZE, /**< the minimum number of bits for the red channel of the color buffer; defaults to 3. */ SDL_GL_GREEN_SIZE, /**< the minimum number of bits for the green channel of the color buffer; defaults to 3. */ @@ -353,64 +353,64 @@ typedef enum SDL_GLattr SDL_GL_RETAINED_BACKING, /**< not used (deprecated). */ SDL_GL_CONTEXT_MAJOR_VERSION, /**< OpenGL context major version. */ SDL_GL_CONTEXT_MINOR_VERSION, /**< OpenGL context minor version. */ - SDL_GL_CONTEXT_FLAGS, /**< some combination of 0 or more of elements of the SDL_GLcontextFlag enumeration; defaults to 0. */ - SDL_GL_CONTEXT_PROFILE_MASK, /**< type of GL context (Core, Compatibility, ES). See SDL_GLprofile; default value depends on platform. */ + SDL_GL_CONTEXT_FLAGS, /**< some combination of 0 or more of elements of the SDL_GLContextFlag enumeration; defaults to 0. */ + SDL_GL_CONTEXT_PROFILE_MASK, /**< type of GL context (Core, Compatibility, ES). See SDL_GLProfile; default value depends on platform. */ SDL_GL_SHARE_WITH_CURRENT_CONTEXT, /**< OpenGL context sharing; defaults to 0. */ SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, /**< requests sRGB capable visual; defaults to 0. */ - SDL_GL_CONTEXT_RELEASE_BEHAVIOR, /**< sets context the release behavior. See SDL_GLcontextReleaseFlag; defaults to FLUSH. */ + SDL_GL_CONTEXT_RELEASE_BEHAVIOR, /**< sets context the release behavior. See SDL_GLContextReleaseFlag; defaults to FLUSH. */ SDL_GL_CONTEXT_RESET_NOTIFICATION, /**< set context reset notification. See SDL_GLContextResetNotification; defaults to NO_NOTIFICATION. */ SDL_GL_CONTEXT_NO_ERROR, SDL_GL_FLOATBUFFERS, SDL_GL_EGL_PLATFORM -} SDL_GLattr; +} SDL_GLAttr; /** * Possible values to be set for the SDL_GL_CONTEXT_PROFILE_MASK attribute. * - * \since This enum is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ -typedef enum SDL_GLprofile -{ - SDL_GL_CONTEXT_PROFILE_CORE = 0x0001, - SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = 0x0002, - SDL_GL_CONTEXT_PROFILE_ES = 0x0004 /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */ -} SDL_GLprofile; +typedef Uint32 SDL_GLProfile; + +#define SDL_GL_CONTEXT_PROFILE_CORE 0x0001 /**< OpenGL Core Profile context */ +#define SDL_GL_CONTEXT_PROFILE_COMPATIBILITY 0x0002 /**< OpenGL Compatibility Profile context */ +#define SDL_GL_CONTEXT_PROFILE_ES 0x0004 /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */ + /** - * Possible values to be set for the SDL_GL_CONTEXT_FLAGS attribute. + * Possible flags to be set for the SDL_GL_CONTEXT_FLAGS attribute. * - * \since This enum is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ -typedef enum SDL_GLcontextFlag -{ - SDL_GL_CONTEXT_DEBUG_FLAG = 0x0001, - SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002, - SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG = 0x0004, - SDL_GL_CONTEXT_RESET_ISOLATION_FLAG = 0x0008 -} SDL_GLcontextFlag; +typedef Uint32 SDL_GLContextFlag; + +#define SDL_GL_CONTEXT_DEBUG_FLAG 0x0001 +#define SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG 0x0002 +#define SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG 0x0004 +#define SDL_GL_CONTEXT_RESET_ISOLATION_FLAG 0x0008 + /** * Possible values to be set for the SDL_GL_CONTEXT_RELEASE_BEHAVIOR * attribute. * - * \since This enum is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ -typedef enum SDL_GLcontextReleaseFlag -{ - SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE = 0x0000, - SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x0001 -} SDL_GLcontextReleaseFlag; +typedef Uint32 SDL_GLContextReleaseFlag; + +#define SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE 0x0000 +#define SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x0001 + /** * Possible values to be set SDL_GL_CONTEXT_RESET_NOTIFICATION attribute. * - * \since This enum is available since SDL 3.0.0. + * \since This datatype is available since SDL 3.1.3. */ -typedef enum SDL_GLContextResetNotification -{ - SDL_GL_CONTEXT_RESET_NO_NOTIFICATION = 0x0000, - SDL_GL_CONTEXT_RESET_LOSE_CONTEXT = 0x0001 -} SDL_GLContextResetNotification; +typedef Uint32 SDL_GLContextResetNotification; + +#define SDL_GL_CONTEXT_RESET_NO_NOTIFICATION 0x0000 +#define SDL_GL_CONTEXT_RESET_LOSE_CONTEXT 0x0001 + /* Function prototypes */ @@ -419,7 +419,7 @@ typedef enum SDL_GLContextResetNotification * * \returns the number of built in video drivers. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetVideoDriver */ @@ -438,7 +438,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void); * \param index the index of a video driver. * \returns the name of the video driver with the given **index**. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetNumVideoDrivers */ @@ -454,7 +454,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetVideoDriver(int index); * \returns the name of the current video driver or NULL if no driver has been * initialized. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetNumVideoDrivers * \sa SDL_GetVideoDriver @@ -466,7 +466,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentVideoDriver(void); * * \returns the current system theme, light, dark, or unknown. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_SystemTheme SDLCALL SDL_GetSystemTheme(void); @@ -479,7 +479,7 @@ extern SDL_DECLSPEC SDL_SystemTheme SDLCALL SDL_GetSystemTheme(void); * call SDL_GetError() for more information. This should be freed * with SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_DisplayID * SDLCALL SDL_GetDisplays(int *count); @@ -489,7 +489,7 @@ extern SDL_DECLSPEC SDL_DisplayID * SDLCALL SDL_GetDisplays(int *count); * \returns the instance ID of the primary display on success or 0 on failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetDisplays */ @@ -517,7 +517,7 @@ extern SDL_DECLSPEC SDL_DisplayID SDLCALL SDL_GetPrimaryDisplay(void); * \returns a valid property ID on success or 0 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetDisplayProperties(SDL_DisplayID displayID); @@ -531,7 +531,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetDisplayProperties(SDL_Displa * \returns the name of a display or NULL on failure; call SDL_GetError() for * more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetDisplays */ @@ -547,7 +547,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetDisplayName(SDL_DisplayID displa * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetDisplayUsableBounds * \sa SDL_GetDisplays @@ -571,7 +571,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetDisplayBounds(SDL_DisplayID displayID, S * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetDisplayBounds * \sa SDL_GetDisplays @@ -585,7 +585,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetDisplayUsableBounds(SDL_DisplayID displa * \returns the SDL_DisplayOrientation enum value of the display, or * `SDL_ORIENTATION_UNKNOWN` if it isn't available. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetDisplays */ @@ -598,7 +598,7 @@ extern SDL_DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetNaturalDisplayOrientat * \returns the SDL_DisplayOrientation enum value of the display, or * `SDL_ORIENTATION_UNKNOWN` if it isn't available. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetDisplays */ @@ -616,7 +616,7 @@ extern SDL_DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetCurrentDisplayOrientat * \returns the content scale of the display, or 0.0f on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetDisplays */ @@ -642,7 +642,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetDisplayContentScale(SDL_DisplayID displ * single allocation that should be freed with SDL_free() when it is * no longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetDisplays */ @@ -656,7 +656,7 @@ extern SDL_DECLSPEC SDL_DisplayMode ** SDLCALL SDL_GetFullscreenDisplayModes(SDL * refresh rate default to the desktop mode if they are set to 0. The modes * are scanned with size being first priority, format being second priority, * and finally checking the refresh rate. If all the available modes are too - * small, then NULL is returned. + * small, then false is returned. * * \param displayID the instance ID of the display to query. * \param w the width in pixels of the desired display mode. @@ -665,17 +665,17 @@ extern SDL_DECLSPEC SDL_DisplayMode ** SDLCALL SDL_GetFullscreenDisplayModes(SDL * for the desktop refresh rate. * \param include_high_density_modes boolean to include high density modes in * the search. - * \param mode a pointer filled in with the closest display mode equal to or - * larger than the desired mode. + * \param closest a pointer filled in with the closest display mode equal to + * or larger than the desired mode. * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetDisplays * \sa SDL_GetFullscreenDisplayModes */ -extern SDL_DECLSPEC bool SDLCALL SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, bool include_high_density_modes, SDL_DisplayMode *mode); +extern SDL_DECLSPEC bool SDLCALL SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, bool include_high_density_modes, SDL_DisplayMode *closest); /** * Get information about the desktop's display mode. @@ -689,7 +689,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetClosestFullscreenDisplayMode(SDL_Display * \returns a pointer to the desktop display mode or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetCurrentDisplayMode * \sa SDL_GetDisplays @@ -708,7 +708,7 @@ extern SDL_DECLSPEC const SDL_DisplayMode * SDLCALL SDL_GetDesktopDisplayMode(SD * \returns a pointer to the desktop display mode or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetDesktopDisplayMode * \sa SDL_GetDisplays @@ -722,7 +722,7 @@ extern SDL_DECLSPEC const SDL_DisplayMode * SDLCALL SDL_GetCurrentDisplayMode(SD * \returns the instance ID of the display containing the point or 0 on * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetDisplayBounds * \sa SDL_GetDisplays @@ -737,7 +737,7 @@ extern SDL_DECLSPEC SDL_DisplayID SDLCALL SDL_GetDisplayForPoint(const SDL_Point * closest to the center of the rect on success or 0 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetDisplayBounds * \sa SDL_GetDisplays @@ -752,7 +752,7 @@ extern SDL_DECLSPEC SDL_DisplayID SDLCALL SDL_GetDisplayForRect(const SDL_Rect * * on success or 0 on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetDisplayBounds * \sa SDL_GetDisplays @@ -770,7 +770,7 @@ extern SDL_DECLSPEC SDL_DisplayID SDLCALL SDL_GetDisplayForWindow(SDL_Window *wi * \returns the pixel density or 0.0f on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowDisplayScale */ @@ -794,7 +794,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetWindowPixelDensity(SDL_Window *window); * \returns the display scale, or 0.0f on failure; call SDL_GetError() for * more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC float SDLCALL SDL_GetWindowDisplayScale(SDL_Window *window); @@ -823,7 +823,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetWindowDisplayScale(SDL_Window *window); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowFullscreenMode * \sa SDL_SetWindowFullscreen @@ -838,7 +838,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowFullscreenMode(SDL_Window *window, * \returns a pointer to the exclusive fullscreen mode to use or NULL for * borderless fullscreen desktop mode. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetWindowFullscreenMode * \sa SDL_SetWindowFullscreen @@ -854,7 +854,7 @@ extern SDL_DECLSPEC const SDL_DisplayMode * SDLCALL SDL_GetWindowFullscreenMode( * SDL_GetError() for more information. This should be freed with * SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void * SDLCALL SDL_GetWindowICCProfile(SDL_Window *window, size_t *size); @@ -866,7 +866,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_GetWindowICCProfile(SDL_Window *window, s * SDL_PIXELFORMAT_UNKNOWN on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PixelFormat SDLCALL SDL_GetWindowPixelFormat(SDL_Window *window); @@ -880,7 +880,7 @@ extern SDL_DECLSPEC SDL_PixelFormat SDLCALL SDL_GetWindowPixelFormat(SDL_Window * allocation that should be freed with SDL_free() when it is no * longer needed. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Window ** SDLCALL SDL_GetWindows(int *count); @@ -939,7 +939,7 @@ extern SDL_DECLSPEC SDL_Window ** SDLCALL SDL_GetWindows(int *count); * corresponding UnloadLibrary function is called by SDL_DestroyWindow(). * * If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver, - * SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail. + * SDL_CreateWindow() will fail, because SDL_Vulkan_LoadLibrary() will fail. * * If SDL_WINDOW_METAL is specified on an OS that does not support Metal, * SDL_CreateWindow() will fail. @@ -959,8 +959,9 @@ extern SDL_DECLSPEC SDL_Window ** SDLCALL SDL_GetWindows(int *count); * \returns the window that was created or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * + * \sa SDL_CreateWindowAndRenderer * \sa SDL_CreatePopupWindow * \sa SDL_CreateWindowWithProperties * \sa SDL_DestroyWindow @@ -970,36 +971,41 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title, int /** * Create a child popup window of the specified parent window. * - * 'flags' **must** contain exactly one of the following: - - * 'SDL_WINDOW_TOOLTIP': The popup window is a tooltip and will not pass any - * input events. - 'SDL_WINDOW_POPUP_MENU': The popup window is a popup menu. - * The topmost popup menu will implicitly gain the keyboard focus. + * The flags parameter **must** contain at least one of the following: + * + * - `SDL_WINDOW_TOOLTIP`: The popup window is a tooltip and will not pass any + * input events. + * - `SDL_WINDOW_POPUP_MENU`: The popup window is a popup menu. The topmost + * popup menu will implicitly gain the keyboard focus. * * The following flags are not relevant to popup window creation and will be * ignored: * - * - 'SDL_WINDOW_MINIMIZED' - * - 'SDL_WINDOW_MAXIMIZED' - * - 'SDL_WINDOW_FULLSCREEN' - * - 'SDL_WINDOW_BORDERLESS' + * - `SDL_WINDOW_MINIMIZED` + * - `SDL_WINDOW_MAXIMIZED` + * - `SDL_WINDOW_FULLSCREEN` + * - `SDL_WINDOW_BORDERLESS` + * + * The following flags are incompatible with popup window creation and will + * cause it to fail: + * + * - `SDL_WINDOW_UTILITY` + * - `SDL_WINDOW_MODAL` * * The parent parameter **must** be non-null and a valid window. The parent of * a popup window can be either a regular, toplevel window, or another popup * window. * * Popup windows cannot be minimized, maximized, made fullscreen, raised, - * flash, be made a modal window, be the parent of a modal window, or grab the - * mouse and/or keyboard. Attempts to do so will fail. + * flash, be made a modal window, be the parent of a toplevel window, or grab + * the mouse and/or keyboard. Attempts to do so will fail. * * Popup windows implicitly do not have a border/decorations and do not appear * on the taskbar/dock or in lists of windows such as alt-tab menus. * - * If a parent window is hidden, any child popup windows will be recursively - * hidden as well. Child popup windows not explicitly hidden will be restored - * when the parent is shown. - * - * If the parent window is destroyed, any child popup windows will be - * recursively destroyed as well. + * If a parent window is hidden or destroyed, any child popup windows will be + * recursively hidden or destroyed as well. Child popup windows not explicitly + * hidden will be restored when the parent is shown. * * \param parent the parent of the window, must not be NULL. * \param offset_x the x position of the popup window relative to the origin @@ -1013,7 +1019,7 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title, int * \returns the window that was created or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateWindow * \sa SDL_CreateWindowWithProperties @@ -1056,7 +1062,7 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_CreatePopupWindow(SDL_Window *paren * - `SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN`: true if the window will be used * with OpenGL rendering * - `SDL_PROP_WINDOW_CREATE_PARENT_POINTER`: an SDL_Window that will be the - * parent of this window, required for windows with the "toolip", "menu", + * parent of this window, required for windows with the "tooltip", "menu", * and "modal" properties * - `SDL_PROP_WINDOW_CREATE_RESIZABLE_BOOLEAN`: true if the window should be * resizable @@ -1093,8 +1099,9 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_CreatePopupWindow(SDL_Window *paren * [README/wayland](README/wayland) for more information on using custom * surfaces. * - `SDL_PROP_WINDOW_CREATE_WAYLAND_CREATE_EGL_WINDOW_BOOLEAN` - true if the - * application wants an associated `wl_egl_window` object to be created, - * even if the window does not have the OpenGL property or flag set. + * application wants an associated `wl_egl_window` object to be created and + * attached to the window, even if the window does not have the OpenGL + * property or `SDL_WINDOW_OPENGL` flag set. * - `SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER` - the wl_surface * associated with the window, if you want to wrap an existing window. See * [README/wayland](README/wayland) for more information. @@ -1130,7 +1137,7 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_CreatePopupWindow(SDL_Window *paren * \returns the window that was created or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateProperties * \sa SDL_CreateWindow @@ -1183,7 +1190,7 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowWithProperties(SDL_Prop * \returns the ID of the window on success or 0 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowFromID */ @@ -1199,7 +1206,7 @@ extern SDL_DECLSPEC SDL_WindowID SDLCALL SDL_GetWindowID(SDL_Window *window); * \returns the window associated with `id` or NULL if it doesn't exist; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowID */ @@ -1212,7 +1219,7 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(SDL_WindowID id); * \returns the parent of the window on success or NULL if the window has no * parent. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreatePopupWindow */ @@ -1250,7 +1257,7 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetWindowParent(SDL_Window *window) * - `SDL_PROP_WINDOW_UIKIT_WINDOW_POINTER`: the `(__unsafe_unretained)` * UIWindow associated with the window * - `SDL_PROP_WINDOW_UIKIT_METAL_VIEW_TAG_NUMBER`: the NSInteger tag - * assocated with metal views on the window + * associated with metal views on the window * - `SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER`: the OpenGL view's * framebuffer object. It must be bound when rendering to the screen using * OpenGL. @@ -1275,6 +1282,11 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetWindowParent(SDL_Window *window) * - `SDL_PROP_WINDOW_COCOA_METAL_VIEW_TAG_NUMBER`: the NSInteger tag * assocated with metal views on the window * + * On OpenVR: + * + * - `SDL_PROP_WINDOW_OPENVR_OVERLAY_ID`: the OpenVR Overlay Handle ID for the + * associated overlay window. + * * On Vivante: * * - `SDL_PROP_WINDOW_VIVANTE_DISPLAY_POINTER`: the EGLNativeDisplayType @@ -1301,6 +1313,8 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetWindowParent(SDL_Window *window) * the window * - `SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER`: the wl_surface associated with * the window + * - `SDL_PROP_WINDOW_WAYLAND_VIEWPORT_POINTER`: the wp_viewport associated + * with the window * - `SDL_PROP_WINDOW_WAYLAND_EGL_WINDOW_POINTER`: the wl_egl_window * associated with the window * - `SDL_PROP_WINDOW_WAYLAND_XDG_SURFACE_POINTER`: the xdg_surface associated @@ -1327,7 +1341,7 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetWindowParent(SDL_Window *window) * \returns a valid property ID on success or 0 on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetWindowProperties(SDL_Window *window); @@ -1347,6 +1361,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetWindowProperties(SDL_Window #define SDL_PROP_WINDOW_KMSDRM_GBM_DEVICE_POINTER "SDL.window.kmsdrm.gbm_dev" #define SDL_PROP_WINDOW_COCOA_WINDOW_POINTER "SDL.window.cocoa.window" #define SDL_PROP_WINDOW_COCOA_METAL_VIEW_TAG_NUMBER "SDL.window.cocoa.metal_view_tag" +#define SDL_PROP_WINDOW_OPENVR_OVERLAY_ID "SDL.window.openvr.overlay_id" #define SDL_PROP_WINDOW_VIVANTE_DISPLAY_POINTER "SDL.window.vivante.display" #define SDL_PROP_WINDOW_VIVANTE_WINDOW_POINTER "SDL.window.vivante.window" #define SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER "SDL.window.vivante.surface" @@ -1355,6 +1370,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetWindowProperties(SDL_Window #define SDL_PROP_WINDOW_WIN32_INSTANCE_POINTER "SDL.window.win32.instance" #define SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER "SDL.window.wayland.display" #define SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER "SDL.window.wayland.surface" +#define SDL_PROP_WINDOW_WAYLAND_VIEWPORT_POINTER "SDL.window.wayland.viewport" #define SDL_PROP_WINDOW_WAYLAND_EGL_WINDOW_POINTER "SDL.window.wayland.egl_window" #define SDL_PROP_WINDOW_WAYLAND_XDG_SURFACE_POINTER "SDL.window.wayland.xdg_surface" #define SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_POINTER "SDL.window.wayland.xdg_toplevel" @@ -1371,7 +1387,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetWindowProperties(SDL_Window * \param window the window to query. * \returns a mask of the SDL_WindowFlags associated with `window`. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateWindow * \sa SDL_HideWindow @@ -1393,7 +1409,7 @@ extern SDL_DECLSPEC SDL_WindowFlags SDLCALL SDL_GetWindowFlags(SDL_Window *windo * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowTitle */ @@ -1406,7 +1422,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowTitle(SDL_Window *window, const ch * \returns the title of the window in UTF-8 format or "" if there is no * title. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetWindowTitle */ @@ -1430,7 +1446,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetWindowTitle(SDL_Window *window); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowIcon(SDL_Window *window, SDL_Surface *icon); @@ -1467,7 +1483,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowIcon(SDL_Window *window, SDL_Surfa * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowPosition * \sa SDL_SyncWindow @@ -1491,7 +1507,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowPosition(SDL_Window *window, int x * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetWindowPosition */ @@ -1525,7 +1541,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowPosition(SDL_Window *window, int * * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowSize * \sa SDL_SetWindowFullscreenMode @@ -1546,7 +1562,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowSize(SDL_Window *window, int w, in * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetRenderOutputSize * \sa SDL_GetWindowSizeInPixels @@ -1560,7 +1576,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowSize(SDL_Window *window, int *w, i * Some devices have portions of the screen which are partially obscured or * not interactive, possibly due to on-screen controls, curved edges, camera * notches, TV overscan, etc. This function provides the area of the window - * which is safe to have interactible content. You should continue rendering + * which is safe to have interactable content. You should continue rendering * into the rest of the window, but it should not contain visually important * or interactible content. * @@ -1570,7 +1586,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowSize(SDL_Window *window, int *w, i * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowSafeArea(SDL_Window *window, SDL_Rect *rect); @@ -1606,7 +1622,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowSafeArea(SDL_Window *window, SDL_R * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowAspectRatio * \sa SDL_SyncWindow @@ -1624,7 +1640,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowAspectRatio(SDL_Window *window, fl * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetWindowAspectRatio */ @@ -1659,7 +1675,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowAspectRatio(SDL_Window *window, fl * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowSize */ @@ -1676,7 +1692,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowBordersSize(SDL_Window *window, in * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreateWindow * \sa SDL_GetWindowSize @@ -1692,7 +1708,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowSizeInPixels(SDL_Window *window, i * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowMinimumSize * \sa SDL_SetWindowMaximumSize @@ -1710,7 +1726,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowMinimumSize(SDL_Window *window, in * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowMaximumSize * \sa SDL_SetWindowMinimumSize @@ -1726,7 +1742,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowMinimumSize(SDL_Window *window, in * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowMaximumSize * \sa SDL_SetWindowMinimumSize @@ -1744,7 +1760,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowMaximumSize(SDL_Window *window, in * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowMinimumSize * \sa SDL_SetWindowMaximumSize @@ -1765,7 +1781,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowMaximumSize(SDL_Window *window, in * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowFlags */ @@ -1785,7 +1801,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowBordered(SDL_Window *window, bool * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowFlags */ @@ -1802,7 +1818,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowResizable(SDL_Window *window, bool * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowFlags */ @@ -1815,7 +1831,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window *window, bo * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_HideWindow * \sa SDL_RaiseWindow @@ -1829,9 +1845,10 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ShowWindow(SDL_Window *window); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_ShowWindow + * \sa SDL_WINDOW_HIDDEN */ extern SDL_DECLSPEC bool SDLCALL SDL_HideWindow(SDL_Window *window); @@ -1849,7 +1866,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HideWindow(SDL_Window *window); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_RaiseWindow(SDL_Window *window); @@ -1877,7 +1894,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RaiseWindow(SDL_Window *window); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_MinimizeWindow * \sa SDL_RestoreWindow @@ -1889,7 +1906,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_MaximizeWindow(SDL_Window *window); * Request that the window be minimized to an iconic representation. * * On some windowing systems this request is asynchronous and the new window - * state may not have have been applied immediately upon the return of this + * state may not have been applied immediately upon the return of this * function. If an immediate change is required, call SDL_SyncWindow() to * block until the changes have taken effect. * @@ -1901,7 +1918,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_MaximizeWindow(SDL_Window *window); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_MaximizeWindow * \sa SDL_RestoreWindow @@ -1926,7 +1943,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_MinimizeWindow(SDL_Window *window); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_MaximizeWindow * \sa SDL_MinimizeWindow @@ -1955,11 +1972,12 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RestoreWindow(SDL_Window *window); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowFullscreenMode * \sa SDL_SetWindowFullscreenMode * \sa SDL_SyncWindow + * \sa SDL_WINDOW_FULLSCREEN */ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowFullscreen(SDL_Window *window, bool fullscreen); @@ -1980,7 +1998,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowFullscreen(SDL_Window *window, boo * \returns true on success or false if the operation timed out before the * window was in the requested state. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetWindowSize * \sa SDL_SetWindowPosition @@ -1999,7 +2017,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SyncWindow(SDL_Window *window); * \returns true if there is a surface associated with the window, or false * otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowSurface */ @@ -2023,7 +2041,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WindowHasSurface(SDL_Window *window); * \returns the surface associated with the window, or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DestroyWindowSurface * \sa SDL_WindowHasSurface @@ -2050,7 +2068,7 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window *windo * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowSurfaceVSync */ @@ -2068,7 +2086,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowSurfaceVSync(SDL_Window *window, i * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetWindowSurfaceVSync */ @@ -2086,7 +2104,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowSurfaceVSync(SDL_Window *window, i * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowSurface * \sa SDL_UpdateWindowSurfaceRects @@ -2113,7 +2131,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_UpdateWindowSurface(SDL_Window *window); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowSurface * \sa SDL_UpdateWindowSurface @@ -2127,7 +2145,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window *window * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowSurface * \sa SDL_WindowHasSurface @@ -2158,7 +2176,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_DestroyWindowSurface(SDL_Window *window); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowKeyboardGrab * \sa SDL_SetWindowMouseGrab @@ -2175,9 +2193,11 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window *window, b * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * - * \sa SDL_GetWindowMouseGrab + * \sa SDL_GetWindowMouseRect + * \sa SDL_SetWindowMouseRect + * \sa SDL_SetWindowMouseGrab * \sa SDL_SetWindowKeyboardGrab */ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowMouseGrab(SDL_Window *window, bool grabbed); @@ -2188,7 +2208,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowMouseGrab(SDL_Window *window, bool * \param window the window to query. * \returns true if keyboard is grabbed, and false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetWindowKeyboardGrab */ @@ -2200,8 +2220,11 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowKeyboardGrab(SDL_Window *window); * \param window the window to query. * \returns true if mouse is grabbed, and false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * + * \sa SDL_GetWindowMouseRect + * \sa SDL_SetWindowMouseRect + * \sa SDL_SetWindowMouseGrab * \sa SDL_SetWindowKeyboardGrab */ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowMouseGrab(SDL_Window *window); @@ -2211,7 +2234,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowMouseGrab(SDL_Window *window); * * \returns the window if input is grabbed or NULL otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetWindowMouseGrab * \sa SDL_SetWindowKeyboardGrab @@ -2230,9 +2253,10 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowMouseRect + * \sa SDL_GetWindowMouseGrab * \sa SDL_SetWindowMouseGrab */ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowMouseRect(SDL_Window *window, const SDL_Rect *rect); @@ -2244,9 +2268,11 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowMouseRect(SDL_Window *window, cons * \returns a pointer to the mouse confinement rectangle of a window, or NULL * if there isn't one. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetWindowMouseRect + * \sa SDL_GetWindowMouseGrab + * \sa SDL_SetWindowMouseGrab */ extern SDL_DECLSPEC const SDL_Rect * SDLCALL SDL_GetWindowMouseRect(SDL_Window *window); @@ -2263,7 +2289,7 @@ extern SDL_DECLSPEC const SDL_Rect * SDLCALL SDL_GetWindowMouseRect(SDL_Window * * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GetWindowOpacity */ @@ -2279,7 +2305,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowOpacity(SDL_Window *window, float * \returns the opacity, (0.0f - transparent, 1.0f - opaque), or -1.0f on * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetWindowOpacity */ @@ -2292,9 +2318,16 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetWindowOpacity(SDL_Window *window); * reparented to the new owner. Setting the parent window to NULL unparents * the window and removes child window status. * + * If a parent window is hidden or destroyed, the operation will be + * recursively applied to child windows. Child windows hidden with the parent + * that did not have their hidden status explicitly set will be restored when + * the parent is shown. + * * Attempting to set the parent of a window that is currently in the modal - * state will fail. Use SDL_SetWindowModalFor() to cancel the modal status - * before attempting to change the parent. + * state will fail. Use SDL_SetWindowModal() to cancel the modal status before + * attempting to change the parent. + * + * Popup windows cannot change parents and attempts to do so will fail. * * Setting a parent window that is currently the sibling or descendent of the * child window results in undefined behavior. @@ -2304,7 +2337,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetWindowOpacity(SDL_Window *window); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetWindowModal */ @@ -2321,9 +2354,10 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowParent(SDL_Window *window, SDL_Win * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_SetWindowParent + * \sa SDL_WINDOW_MODAL */ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowModal(SDL_Window *window, bool modal); @@ -2335,7 +2369,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowModal(SDL_Window *window, bool mod * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowFocusable(SDL_Window *window, bool focusable); @@ -2359,14 +2393,14 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowFocusable(SDL_Window *window, bool * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_ShowWindowSystemMenu(SDL_Window *window, int x, int y); /** * Possible return values from the SDL_HitTest callback. * - * \since This enum is available since SDL 3.0.0. + * \since This enum is available since SDL 3.1.3. * * \sa SDL_HitTest */ @@ -2436,7 +2470,7 @@ typedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win, * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowHitTest(SDL_Window *window, SDL_HitTest callback, void *callback_data); @@ -2445,12 +2479,14 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowHitTest(SDL_Window *window, SDL_Hi * * This sets the alpha channel of a transparent window and any fully * transparent areas are also transparent to mouse clicks. If you are using - * something besides the SDL render API, then you are responsible for setting - * the alpha channel of the window yourself. + * something besides the SDL render API, then you are responsible for drawing + * the alpha channel of the window to match the shape alpha channel to get + * consistent cross-platform results. * * The shape is copied inside this function, so you can free it afterwards. If * your shape surface changes, you should call SDL_SetWindowShape() again to - * update the window. + * update the window. This is an expensive operation, so should be done + * sparingly. * * The window must have been created with the SDL_WINDOW_TRANSPARENT flag. * @@ -2460,7 +2496,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowHitTest(SDL_Window *window, SDL_Hi * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowShape(SDL_Window *window, SDL_Surface *shape); @@ -2472,19 +2508,19 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowShape(SDL_Window *window, SDL_Surf * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_FlashWindow(SDL_Window *window, SDL_FlashOperation operation); /** * Destroy a window. * - * Any popups or modal windows owned by the window will be recursively - * destroyed as well. + * Any child windows owned by the window will be recursively destroyed as + * well. * * \param window the window to destroy. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_CreatePopupWindow * \sa SDL_CreateWindow @@ -2502,7 +2538,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window *window); * * \returns true if the screensaver is enabled, false if it is disabled. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DisableScreenSaver * \sa SDL_EnableScreenSaver @@ -2515,7 +2551,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ScreenSaverEnabled(void); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_DisableScreenSaver * \sa SDL_ScreenSaverEnabled @@ -2534,7 +2570,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_EnableScreenSaver(void); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_EnableScreenSaver * \sa SDL_ScreenSaverEnabled @@ -2562,7 +2598,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_DisableScreenSaver(void); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GL_GetProcAddress * \sa SDL_GL_UnloadLibrary @@ -2614,7 +2650,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GL_LoadLibrary(const char *path); * \returns a pointer to the named OpenGL function. The returned pointer * should be cast to the appropriate function signature. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GL_ExtensionSupported * \sa SDL_GL_LoadLibrary @@ -2633,7 +2669,7 @@ extern SDL_DECLSPEC SDL_FunctionPointer SDLCALL SDL_GL_GetProcAddress(const char * \returns a pointer to the named EGL function. The returned pointer should * be cast to the appropriate function signature. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_EGL_GetCurrentDisplay */ @@ -2642,7 +2678,7 @@ extern SDL_DECLSPEC SDL_FunctionPointer SDLCALL SDL_EGL_GetProcAddress(const cha /** * Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary(). * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GL_LoadLibrary */ @@ -2665,14 +2701,14 @@ extern SDL_DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void); * \param extension the name of the extension to check. * \returns true if the extension is supported, false otherwise. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GL_ExtensionSupported(const char *extension); /** * Reset all previously set OpenGL context attributes to their default values. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GL_GetAttribute * \sa SDL_GL_SetAttribute @@ -2687,34 +2723,34 @@ extern SDL_DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void); * SDL_GL_GetAttribute() to check the values after creating the OpenGL * context, since the values obtained can differ from the requested ones. * - * \param attr an SDL_GLattr enum value specifying the OpenGL attribute to + * \param attr an SDL_GLAttr enum value specifying the OpenGL attribute to * set. * \param value the desired value for the attribute. * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GL_GetAttribute * \sa SDL_GL_ResetAttributes */ -extern SDL_DECLSPEC bool SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value); +extern SDL_DECLSPEC bool SDLCALL SDL_GL_SetAttribute(SDL_GLAttr attr, int value); /** * Get the actual value for an attribute from the current context. * - * \param attr an SDL_GLattr enum value specifying the OpenGL attribute to + * \param attr an SDL_GLAttr enum value specifying the OpenGL attribute to * get. * \param value a pointer filled in with the current value of `attr`. * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GL_ResetAttributes * \sa SDL_GL_SetAttribute */ -extern SDL_DECLSPEC bool SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value); +extern SDL_DECLSPEC bool SDLCALL SDL_GL_GetAttribute(SDL_GLAttr attr, int *value); /** * Create an OpenGL context for an OpenGL window, and make it current. @@ -2731,7 +2767,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value * \returns the OpenGL context associated with `window` or NULL on failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GL_DestroyContext * \sa SDL_GL_MakeCurrent @@ -2748,7 +2784,7 @@ extern SDL_DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *windo * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GL_CreateContext */ @@ -2760,7 +2796,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GL_MakeCurrent(SDL_Window *window, SDL_GLCo * \returns the currently active OpenGL window on success or NULL on failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GL_GetCurrentWindow(void); @@ -2770,7 +2806,7 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GL_GetCurrentWindow(void); * \returns the currently active OpenGL context or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GL_MakeCurrent */ @@ -2782,7 +2818,7 @@ extern SDL_DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void); * \returns the currently active EGL display or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_EGLDisplay SDLCALL SDL_EGL_GetCurrentDisplay(void); @@ -2792,7 +2828,7 @@ extern SDL_DECLSPEC SDL_EGLDisplay SDLCALL SDL_EGL_GetCurrentDisplay(void); * \returns the currently active EGL config or NULL on failure; call * SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_EGLConfig SDLCALL SDL_EGL_GetCurrentConfig(void); @@ -2803,7 +2839,7 @@ extern SDL_DECLSPEC SDL_EGLConfig SDLCALL SDL_EGL_GetCurrentConfig(void); * \returns the EGLSurface pointer associated with the window, or NULL on * failure. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_EGLSurface SDLCALL SDL_EGL_GetWindowSurface(SDL_Window *window); @@ -2823,7 +2859,7 @@ extern SDL_DECLSPEC SDL_EGLSurface SDLCALL SDL_EGL_GetWindowSurface(SDL_Window * * eglCreateContext. May be NULL. * \param userdata a pointer that is passed to the callbacks. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC void SDLCALL SDL_EGL_SetAttributeCallbacks(SDL_EGLAttribArrayCallback platformAttribCallback, SDL_EGLIntArrayCallback surfaceAttribCallback, @@ -2852,7 +2888,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_EGL_SetAttributeCallbacks(SDL_EGLAttribArra * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GL_GetSwapInterval */ @@ -2871,7 +2907,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GL_SetSwapInterval(int interval); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GL_SetSwapInterval */ @@ -2891,7 +2927,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GL_GetSwapInterval(int *interval); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC bool SDLCALL SDL_GL_SwapWindow(SDL_Window *window); @@ -2902,7 +2938,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GL_SwapWindow(SDL_Window *window); * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_GL_CreateContext */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_vulkan.h b/Source/ThirdParty/SDL/SDL3/SDL_vulkan.h index 6c777749e..1ce0e34c6 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_vulkan.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_vulkan.h @@ -23,6 +23,19 @@ * # CategoryVulkan * * Functions for creating Vulkan surfaces on SDL windows. + * + * For the most part, Vulkan operates independent of SDL, but it benefits from + * a little support during setup. + * + * Use SDL_Vulkan_GetInstanceExtensions() to get platform-specific bits for + * creating a VkInstance, then SDL_Vulkan_GetVkGetInstanceProcAddr() to get + * the appropriate function for querying Vulkan entry points. Then + * SDL_Vulkan_CreateSurface() will get you the final pieces you need to + * prepare for rendering into an SDL_Window with Vulkan. + * + * Unlike OpenGL, most of the details of "context" creation and window buffer + * swapping are handled by the Vulkan API directly, so SDL doesn't provide + * Vulkan equivalents of SDL_GL_SwapWindow(), etc; they aren't necessary. */ #ifndef SDL_vulkan_h_ @@ -56,6 +69,10 @@ VK_DEFINE_HANDLE(VkPhysicalDevice) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR) struct VkAllocationCallbacks; +/* Make sure to undef to avoid issues in case of later vulkan include */ +#undef VK_DEFINE_HANDLE +#undef VK_DEFINE_NON_DISPATCHABLE_HANDLE + #endif /* !NO_SDL_VULKAN_TYPEDEFS */ /** @@ -99,7 +116,7 @@ struct VkAllocationCallbacks; * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Vulkan_GetVkGetInstanceProcAddr * \sa SDL_Vulkan_UnloadLibrary @@ -123,14 +140,14 @@ extern SDL_DECLSPEC bool SDLCALL SDL_Vulkan_LoadLibrary(const char *path); * \returns the function pointer for `vkGetInstanceProcAddr` or NULL on * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. */ extern SDL_DECLSPEC SDL_FunctionPointer SDLCALL SDL_Vulkan_GetVkGetInstanceProcAddr(void); /** * Unload the Vulkan library previously loaded by SDL_Vulkan_LoadLibrary(). * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Vulkan_LoadLibrary */ @@ -154,7 +171,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void); * \returns an array of extension name strings on success, NULL on failure; * call SDL_GetError() for more information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Vulkan_CreateSurface */ @@ -179,7 +196,7 @@ extern SDL_DECLSPEC char const * const * SDLCALL SDL_Vulkan_GetInstanceExtension * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Vulkan_GetInstanceExtensions * \sa SDL_Vulkan_DestroySurface @@ -207,7 +224,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window *window, * \param allocator a VkAllocationCallbacks struct, which lets the app set the * allocator that destroys the surface. Can be NULL. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Vulkan_GetInstanceExtensions * \sa SDL_Vulkan_CreateSurface @@ -229,7 +246,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_Vulkan_DestroySurface(VkInstance instance, * device. * \returns true if supported, false if unsupported or an error occurred. * - * \since This function is available since SDL 3.0.0. + * \since This function is available since SDL 3.1.3. * * \sa SDL_Vulkan_GetInstanceExtensions */ diff --git a/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs b/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs index 0cfc365d7..ecaa5186f 100644 --- a/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs +++ b/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs @@ -88,8 +88,8 @@ namespace Flax.Deps.Dependencies Path.Combine(root, "include", "SDL3"), }; - CloneGitRepoFastSince(root, "https://github.com/libsdl-org/SDL.git", new DateTime(2024, 10, 1)); - GitResetToCommit(root, "e292d1f5ace469f718d7b6b4dec8c28e37dcaa0e"); + CloneGitRepoFastSince(root, "https://github.com/libsdl-org/SDL.git", new DateTime(2024, 12, 1)); + GitResetToCommit(root, "acf0f09320ec75528d74b1fd160090ea262c0698"); foreach (var platform in options.Platforms) { diff --git a/Source/Tools/Flax.Build/Deps/Dependency.cs b/Source/Tools/Flax.Build/Deps/Dependency.cs index fbb505dd1..a5ead049f 100644 --- a/Source/Tools/Flax.Build/Deps/Dependency.cs +++ b/Source/Tools/Flax.Build/Deps/Dependency.cs @@ -185,6 +185,7 @@ namespace Flax.Deps /// /// The local path for close. /// The remote url. + /// The time after history is included in the local repository. /// The custom arguments to add to the clone command. /// True if initialize submodules of the repository (recursive). public static void CloneGitRepoFastSince(string path, string url, DateTime time, string args = null, bool submodules = false)