-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SDL2, windows: update to latest official 2.30.4 version.
- Loading branch information
Showing
71 changed files
with
473 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -209,7 +209,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)(); | |
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__) | ||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory") | ||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory") | ||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__) | ||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) | ||
#ifdef __thumb__ | ||
/* The mcr instruction isn't available in thumb mode, use real functions */ | ||
#define SDL_MEMORY_BARRIER_USES_FUNCTION | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -65,8 +65,8 @@ typedef enum | |
typedef enum | ||
{ | ||
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */ | ||
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */ | ||
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */ | ||
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */ | ||
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */ | ||
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */ | ||
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */ | ||
} SDL_BlendOperation; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -99,9 +99,11 @@ typedef unsigned int uintptr_t; | |
#define HAVE_D3D11_H 1 | ||
#define HAVE_ROAPI_H 1 | ||
#endif | ||
#if defined(WDK_NTDDI_VERSION) && WDK_NTDDI_VERSION > 0x0A000008 /* 10.0.19041.0 */ | ||
#if defined(__has_include) | ||
#if __has_include(<d3d12.h>) && __has_include(<d3d12sdklayers.h>) | ||
#define HAVE_D3D12_H 1 | ||
#endif | ||
#endif | ||
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0603 /* Windows 8.1 SDK */ | ||
#define HAVE_SHELLSCALINGAPI_H 1 | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -131,6 +131,8 @@ typedef enum | |
SDL_CONTROLLERTOUCHPADMOTION, /**< Game controller touchpad finger was moved */ | ||
SDL_CONTROLLERTOUCHPADUP, /**< Game controller touchpad finger was lifted */ | ||
SDL_CONTROLLERSENSORUPDATE, /**< Game controller sensor was updated */ | ||
SDL_CONTROLLERUPDATECOMPLETE_RESERVED_FOR_SDL3, | ||
SDL_CONTROLLERSTEAMHANDLEUPDATED, /**< Game controller Steam handle has changed */ | ||
|
||
/* Touch events */ | ||
SDL_FINGERDOWN = 0x700, | ||
|
@@ -446,7 +448,7 @@ typedef struct SDL_ControllerButtonEvent | |
*/ | ||
typedef struct SDL_ControllerDeviceEvent | ||
{ | ||
Uint32 type; /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */ | ||
Uint32 type; /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, ::SDL_CONTROLLERDEVICEREMAPPED, or ::SDL_CONTROLLERSTEAMHANDLEUPDATED */ | ||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ | ||
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */ | ||
} SDL_ControllerDeviceEvent; | ||
|
@@ -580,15 +582,6 @@ typedef struct SDL_QuitEvent | |
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ | ||
} SDL_QuitEvent; | ||
|
||
/** | ||
* \brief OS Specific event | ||
*/ | ||
typedef struct SDL_OSEvent | ||
{ | ||
Uint32 type; /**< ::SDL_QUIT */ | ||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ | ||
} SDL_OSEvent; | ||
|
||
/** | ||
* \brief A user-defined event type (event.user.*) | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -64,7 +64,7 @@ extern "C" { | |
* directory of the application as it is uncommon to store resources outside | ||
* the executable. As such it is not a writable directory. | ||
* | ||
* The returned path is guaranteed to end with a path separator ('\' on | ||
* The returned path is guaranteed to end with a path separator ('\\' on | ||
* Windows, '/' on most other platforms). | ||
* | ||
* The pointer returned is owned by the caller. Please call SDL_free() on the | ||
|
@@ -120,7 +120,7 @@ extern DECLSPEC char *SDLCALL SDL_GetBasePath(void); | |
* - ...only use letters, numbers, and spaces. Avoid punctuation like "Game | ||
* Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient. | ||
* | ||
* The returned path is guaranteed to end with a path separator ('\' on | ||
* The returned path is guaranteed to end with a path separator ('\\' on | ||
* Windows, '/' on most other platforms). | ||
* | ||
* The pointer returned is owned by the caller. Please call SDL_free() on the | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -73,7 +73,8 @@ typedef enum | |
SDL_CONTROLLER_TYPE_NVIDIA_SHIELD, | ||
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_LEFT, | ||
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT, | ||
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR | ||
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR, | ||
SDL_CONTROLLER_TYPE_MAX | ||
} SDL_GameControllerType; | ||
|
||
typedef enum | ||
|
@@ -523,6 +524,20 @@ extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetFirmwareVersion(SDL_GameCont | |
*/ | ||
extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameController *gamecontroller); | ||
|
||
/** | ||
* Get the Steam Input handle of an opened controller, if available. | ||
* | ||
* Returns an InputHandle_t for the controller that can be used with Steam Input API: | ||
* https://partner.steamgames.com/doc/api/ISteamInput | ||
* | ||
* \param gamecontroller the game controller object to query. | ||
* \returns the gamepad handle, or 0 if unavailable. | ||
* | ||
* \since This function is available since SDL 2.30.0. | ||
*/ | ||
extern DECLSPEC Uint64 SDLCALL SDL_GameControllerGetSteamHandle(SDL_GameController *gamecontroller); | ||
|
||
|
||
/** | ||
* Check if a controller has been opened and is currently connected. | ||
* | ||
|
@@ -598,7 +613,9 @@ extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void); | |
* and are centered within ~8000 of zero, though advanced UI will allow users to set | ||
* or autodetect the dead zone, which varies between controllers. | ||
* | ||
* Trigger axis values range from 0 to SDL_JOYSTICK_AXIS_MAX. | ||
* Trigger axis values range from 0 (released) to SDL_JOYSTICK_AXIS_MAX | ||
* (fully pressed) when reported by SDL_GameControllerGetAxis(). Note that this is not the | ||
* same range that will be reported by the lower-level SDL_GetJoystickAxis(). | ||
*/ | ||
typedef enum | ||
{ | ||
|
@@ -687,8 +704,13 @@ SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameController | |
* | ||
* The axis indices start at index 0. | ||
* | ||
* The state is a value ranging from -32768 to 32767. Triggers, however, range | ||
* from 0 to 32767 (they never return a negative value). | ||
* For thumbsticks, the state is a value ranging from -32768 (up/left) | ||
* to 32767 (down/right). | ||
* | ||
* Triggers range from 0 when released to 32767 when fully pressed, and | ||
* never return a negative value. Note that this differs from the value | ||
* reported by the lower-level SDL_GetJoystickAxis(), which normally uses | ||
* the full range. | ||
* | ||
* \param gamecontroller a game controller | ||
* \param axis an axis index (one of the SDL_GameControllerAxis values) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2024 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
Oops, something went wrong.