Update SDL to 3.4.0
This commit is contained in:
2
Source/ThirdParty/SDL/SDL3/SDL.h
vendored
2
Source/ThirdParty/SDL/SDL3/SDL.h
vendored
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Main include header for the SDL library, version 3.3.4
|
||||
* Main include header for the SDL library, version 3.4.0
|
||||
*
|
||||
* It is almost always best to include just this one header instead of
|
||||
* picking out individual headers included here. There are exceptions to
|
||||
|
||||
9
Source/ThirdParty/SDL/SDL3/SDL_audio.h
vendored
9
Source/ThirdParty/SDL/SDL3/SDL_audio.h
vendored
@@ -577,6 +577,15 @@ extern SDL_DECLSPEC SDL_AudioDeviceID * SDLCALL SDL_GetAudioRecordingDevices(int
|
||||
/**
|
||||
* Get the human-readable name of a specific audio device.
|
||||
*
|
||||
* **WARNING**: this function will work with SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK
|
||||
* and SDL_AUDIO_DEVICE_DEFAULT_RECORDING, returning the current default
|
||||
* physical devices' names. However, as the default device may change at any
|
||||
* time, it is likely better to show a generic name to the user, like "System
|
||||
* default audio device" or perhaps "default [currently %s]". Do not store
|
||||
* this name to disk to reidentify the device in a later run of the program,
|
||||
* as the default might change in general, and the string will be the name of
|
||||
* a specific device and not the abstract system default.
|
||||
*
|
||||
* \param devid the instance ID of the device to query.
|
||||
* \returns the name of the audio device, or NULL on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
|
||||
95
Source/ThirdParty/SDL/SDL3/SDL_dlopennote.h
vendored
95
Source/ThirdParty/SDL/SDL3/SDL_dlopennote.h
vendored
@@ -32,21 +32,23 @@
|
||||
* this CMake snippet to check for support:
|
||||
*
|
||||
* ```cmake
|
||||
* set(CHECK_ELF_DLNOTES_SRC [==[
|
||||
* #ifndef __ELF__
|
||||
* ELF DL notes is only supported on ELF platforms
|
||||
* #endif
|
||||
* __attribute__ ((used,aligned(4),section(".note.dlopen"))) static const struct {
|
||||
* struct { int a; int b; int c; } hdr; char name[4]; __attribute__((aligned(4))) char json[24];
|
||||
* } dlnote = { { 4, 0x407c0c0aU, 16 }, "FDO", "[\\"a\\":{\\"a\\":\\"1\\",\\"b\\":\\"2\\"}]" };
|
||||
* int main(int argc, char *argv[]) {
|
||||
* return argc + dlnote.hdr.a;
|
||||
* }
|
||||
* ]==])
|
||||
* check_c_source_compiles("${CHECK_ELF_DLNOTES_SRC}" COMPILER_SUPPORTS_ELFNOTES)
|
||||
* if(NOT COMPILER_SUPPORTS_ELFNOTES)
|
||||
* set(SDL_DISABLE_DLOPEN_NOTES TRUE)
|
||||
* endif()
|
||||
* include(CheckCSourceCompiles)
|
||||
* find_package(SDL3 REQUIRED CONFIG COMPONENTS Headers)
|
||||
* list(APPEND CMAKE_REQUIRED_LIBRARIES SDL3::Headers)
|
||||
* check_c_source_compiles([==[
|
||||
* #include <SDL3/SDL_dlopennote.h>
|
||||
* SDL_ELF_NOTE_DLOPEN("sdl-video",
|
||||
* "Support for video through SDL",
|
||||
* SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
|
||||
* "libSDL-1.2.so.0", "libSDL-2.0.so.0", "libSDL3.so.0"
|
||||
* )
|
||||
* int main(int argc, char *argv[]) {
|
||||
* return argc + argv[0][1];
|
||||
* }
|
||||
* ]==] COMPILER_SUPPORTS_SDL_ELF_NOTE_DLOPEN)
|
||||
* if(NOT COMPILER_SUPPORTS_SDL_ELF_NOTE_DLOPEN)
|
||||
* add_compile_definitions(-DSDL_DISABLE_DLOPEN_NOTE)
|
||||
* endif()
|
||||
* ```
|
||||
*/
|
||||
|
||||
@@ -141,36 +143,37 @@
|
||||
#define SDL_ELF_NOTE_INTERNAL(json, variable_name) \
|
||||
SDL_ELF_NOTE_INTERNAL2(json, variable_name)
|
||||
|
||||
#define SDL_SONAME_ARRAY1(N1) "[\"" N1 "\"]"
|
||||
#define SDL_SONAME_ARRAY2(N1,N2) "[\"" N1 "\",\"" N2 "\"]"
|
||||
#define SDL_SONAME_ARRAY3(N1,N2,N3) "[\"" N1 "\",\"" N2 "\",\"" N3 "\"]"
|
||||
#define SDL_SONAME_ARRAY4(N1,N2,N3,N4) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\"]"
|
||||
#define SDL_SONAME_ARRAY5(N1,N2,N3,N4,N5) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\"]"
|
||||
#define SDL_SONAME_ARRAY6(N1,N2,N3,N4,N5,N6) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\",\"" N6 "\"]"
|
||||
#define SDL_SONAME_ARRAY7(N1,N2,N3,N4,N5,N6,N7) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\",\"" N6 "\",\"" N7 "\"]"
|
||||
#define SDL_SONAME_ARRAY8(N1,N2,N3,N4,N5,N6,N7,N8) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\",\"" N6 "\",\"" N7 "\",\"" N8 "\"]"
|
||||
#define SDL_SONAME_ARRAY_GET(N1,N2,N3,N4,N5,N6,N7,N8,NAME,...) NAME
|
||||
#define SDL_SONAME_ARRAY(...) \
|
||||
SDL_SONAME_ARRAY_GET(__VA_ARGS__, \
|
||||
SDL_SONAME_ARRAY8, \
|
||||
SDL_SONAME_ARRAY7, \
|
||||
SDL_SONAME_ARRAY6, \
|
||||
SDL_SONAME_ARRAY5, \
|
||||
SDL_SONAME_ARRAY4, \
|
||||
SDL_SONAME_ARRAY3, \
|
||||
SDL_SONAME_ARRAY2, \
|
||||
SDL_SONAME_ARRAY1 \
|
||||
#define SDL_DLNOTE_JSON_ARRAY1(N1) "[\"" N1 "\"]"
|
||||
#define SDL_DLNOTE_JSON_ARRAY2(N1,N2) "[\"" N1 "\",\"" N2 "\"]"
|
||||
#define SDL_DLNOTE_JSON_ARRAY3(N1,N2,N3) "[\"" N1 "\",\"" N2 "\",\"" N3 "\"]"
|
||||
#define SDL_DLNOTE_JSON_ARRAY4(N1,N2,N3,N4) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\"]"
|
||||
#define SDL_DLNOTE_JSON_ARRAY5(N1,N2,N3,N4,N5) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\"]"
|
||||
#define SDL_DLNOTE_JSON_ARRAY6(N1,N2,N3,N4,N5,N6) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\",\"" N6 "\"]"
|
||||
#define SDL_DLNOTE_JSON_ARRAY7(N1,N2,N3,N4,N5,N6,N7) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\",\"" N6 "\",\"" N7 "\"]"
|
||||
#define SDL_DLNOTE_JSON_ARRAY8(N1,N2,N3,N4,N5,N6,N7,N8) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\",\"" N6 "\",\"" N7 "\",\"" N8 "\"]"
|
||||
#define SDL_DLNOTE_JSON_ARRAY_GET(N1,N2,N3,N4,N5,N6,N7,N8,NAME,...) NAME
|
||||
#define SDL_DLNOTE_JSON_ARRAY(...) \
|
||||
SDL_DLNOTE_JSON_ARRAY_GET( \
|
||||
__VA_ARGS__, \
|
||||
SDL_DLNOTE_JSON_ARRAY8, \
|
||||
SDL_DLNOTE_JSON_ARRAY7, \
|
||||
SDL_DLNOTE_JSON_ARRAY6, \
|
||||
SDL_DLNOTE_JSON_ARRAY5, \
|
||||
SDL_DLNOTE_JSON_ARRAY4, \
|
||||
SDL_DLNOTE_JSON_ARRAY3, \
|
||||
SDL_DLNOTE_JSON_ARRAY2, \
|
||||
SDL_DLNOTE_JSON_ARRAY1 \
|
||||
)(__VA_ARGS__)
|
||||
|
||||
/* Create "unique" variable name using __LINE__,
|
||||
* so creating elf notes on the same line is not supported
|
||||
* so creating multiple elf notes on the same line is not supported
|
||||
*/
|
||||
#define SDL_ELF_NOTE_JOIN2(A,B) A##B
|
||||
#define SDL_ELF_NOTE_JOIN(A,B) SDL_ELF_NOTE_JOIN2(A,B)
|
||||
#define SDL_ELF_NOTE_UNIQUE_NAME SDL_ELF_NOTE_JOIN(s_SDL_dlopen_note_, __LINE__)
|
||||
#define SDL_DLNOTE_JOIN2(A,B) A##B
|
||||
#define SDL_DLNOTE_JOIN(A,B) SDL_DLNOTE_JOIN2(A,B)
|
||||
#define SDL_DLNOTE_UNIQUE_NAME SDL_DLNOTE_JOIN(s_SDL_dlopen_note_, __LINE__)
|
||||
|
||||
/**
|
||||
* Note that your application has dynamic shared library dependencies.
|
||||
* Add a note that your application has dynamic shared library dependencies.
|
||||
*
|
||||
* You can do this by adding the following to the global scope:
|
||||
*
|
||||
@@ -180,9 +183,11 @@
|
||||
* "Support for loading PNG images using libpng (required for APNG)",
|
||||
* SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
|
||||
* "libpng12.so.0"
|
||||
* );
|
||||
* )
|
||||
* ```
|
||||
*
|
||||
* A trailing semicolon is not needed.
|
||||
*
|
||||
* Or if you support multiple versions of a library, you can list them:
|
||||
*
|
||||
* ```c
|
||||
@@ -192,9 +197,12 @@
|
||||
* "Create windows through SDL video backend",
|
||||
* SDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED
|
||||
* "libSDL-1.2.so.0", "libSDL2-2.0.so.0", "libSDL3.so.0"
|
||||
* );
|
||||
* )
|
||||
* ```
|
||||
*
|
||||
* This macro is not available for compilers that do not support variadic
|
||||
* macro's.
|
||||
*
|
||||
* \since This macro is available since SDL 3.4.0.
|
||||
*
|
||||
* \sa SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED
|
||||
@@ -206,8 +214,8 @@
|
||||
"[{\"feature\":\"" feature \
|
||||
"\",\"description\":\"" description \
|
||||
"\",\"priority\":\"" priority \
|
||||
"\",\"soname\":" SDL_SONAME_ARRAY(__VA_ARGS__) "}]", \
|
||||
SDL_ELF_NOTE_UNIQUE_NAME)
|
||||
"\",\"soname\":" SDL_DLNOTE_JSON_ARRAY(__VA_ARGS__) "}]", \
|
||||
SDL_DLNOTE_UNIQUE_NAME);
|
||||
|
||||
#elif defined(__GNUC__) && __GNUC__ < 3
|
||||
|
||||
@@ -216,7 +224,6 @@
|
||||
#elif defined(_MSC_VER) && _MSC_VER < 1400
|
||||
|
||||
/* Variadic macros are not supported */
|
||||
#define SDL_ELF_NOTE_DLOPEN
|
||||
|
||||
#else
|
||||
|
||||
|
||||
7
Source/ThirdParty/SDL/SDL3/SDL_gamepad.h
vendored
7
Source/ThirdParty/SDL/SDL3/SDL_gamepad.h
vendored
@@ -48,6 +48,9 @@
|
||||
* SDL_INIT_GAMEPAD flag. This causes SDL to scan the system for gamepads, and
|
||||
* load appropriate drivers.
|
||||
*
|
||||
* If you're using SDL gamepad support in a Steam game, you must call
|
||||
* SteamAPI_InitEx() before calling SDL_Init().
|
||||
*
|
||||
* If you would like to receive gamepad updates while the application is in
|
||||
* the background, you should set the following hint before calling
|
||||
* SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
|
||||
@@ -1278,7 +1281,7 @@ extern SDL_DECLSPEC Sint16 SDLCALL SDL_GetGamepadAxis(SDL_Gamepad *gamepad, SDL_
|
||||
* You do not normally need to call this function unless you are parsing
|
||||
* SDL_Gamepad mappings in your own code.
|
||||
*
|
||||
* \param str string representing a SDL_Gamepad axis.
|
||||
* \param str string representing a SDL_Gamepad button.
|
||||
* \returns the SDL_GamepadButton enum corresponding to the input string, or
|
||||
* `SDL_GAMEPAD_BUTTON_INVALID` if no match was found.
|
||||
*
|
||||
@@ -1492,7 +1495,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetGamepadSensorDataRate(SDL_Gamepad *game
|
||||
* Get the current state of a gamepad sensor.
|
||||
*
|
||||
* The number of values and interpretation of the data is sensor dependent.
|
||||
* See SDL_sensor.h for the details for each type of sensor.
|
||||
* See the remarks in SDL_SensorType for details for each type of sensor.
|
||||
*
|
||||
* \param gamepad the gamepad to query.
|
||||
* \param type the type of sensor to query.
|
||||
|
||||
24
Source/ThirdParty/SDL/SDL3/SDL_gpu.h
vendored
24
Source/ThirdParty/SDL/SDL3/SDL_gpu.h
vendored
@@ -2361,7 +2361,7 @@ extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDeviceWithProperties(
|
||||
* When no such structure is provided, SDL will use Vulkan API version 1.0 and
|
||||
* a minimal set of features. The requested API version influences how the
|
||||
* feature_list is processed by SDL. When requesting API version 1.0, the
|
||||
* feature_list is ignored. Only the vulkan_10_phyisical_device_features and
|
||||
* feature_list is ignored. Only the vulkan_10_physical_device_features and
|
||||
* the extension lists are used. When requesting API version 1.1, the
|
||||
* feature_list is scanned for feature structures introduced in Vulkan 1.1.
|
||||
* When requesting Vulkan 1.2 or higher, the feature_list is additionally
|
||||
@@ -3139,7 +3139,7 @@ extern SDL_DECLSPEC SDL_GPUCommandBuffer * SDLCALL SDL_AcquireGPUCommandBuffer(
|
||||
/**
|
||||
* Pushes data to a vertex uniform slot on the command buffer.
|
||||
*
|
||||
* Subsequent draw calls will use this uniform data.
|
||||
* Subsequent draw calls in this command buffer will use this uniform data.
|
||||
*
|
||||
* The data being pushed must respect std140 layout conventions. In practical
|
||||
* terms this means you must ensure that vec3 and vec4 fields are 16-byte
|
||||
@@ -3164,7 +3164,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUVertexUniformData(
|
||||
/**
|
||||
* Pushes data to a fragment uniform slot on the command buffer.
|
||||
*
|
||||
* Subsequent draw calls will use this uniform data.
|
||||
* Subsequent draw calls in this command buffer will use this uniform data.
|
||||
*
|
||||
* The data being pushed must respect std140 layout conventions. In practical
|
||||
* terms this means you must ensure that vec3 and vec4 fields are 16-byte
|
||||
@@ -3186,7 +3186,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUFragmentUniformData(
|
||||
/**
|
||||
* Pushes data to a uniform slot on the command buffer.
|
||||
*
|
||||
* Subsequent draw calls will use this uniform data.
|
||||
* Subsequent draw calls in this command buffer will use this uniform data.
|
||||
*
|
||||
* The data being pushed must respect std140 layout conventions. In practical
|
||||
* terms this means you must ensure that vec3 and vec4 fields are 16-byte
|
||||
@@ -3672,7 +3672,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputePipeline(
|
||||
* The textures must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.
|
||||
*
|
||||
* Be sure your shader is set up according to the requirements documented in
|
||||
* SDL_CreateGPUShader().
|
||||
* SDL_CreateGPUComputePipeline().
|
||||
*
|
||||
* \param compute_pass a compute pass handle.
|
||||
* \param first_slot the compute sampler slot to begin binding from.
|
||||
@@ -3683,7 +3683,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputePipeline(
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CreateGPUShader
|
||||
* \sa SDL_CreateGPUComputePipeline
|
||||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeSamplers(
|
||||
SDL_GPUComputePass *compute_pass,
|
||||
@@ -3698,7 +3698,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeSamplers(
|
||||
* SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ.
|
||||
*
|
||||
* Be sure your shader is set up according to the requirements documented in
|
||||
* SDL_CreateGPUShader().
|
||||
* SDL_CreateGPUComputePipeline().
|
||||
*
|
||||
* \param compute_pass a compute pass handle.
|
||||
* \param first_slot the compute storage texture slot to begin binding from.
|
||||
@@ -3707,7 +3707,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeSamplers(
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CreateGPUShader
|
||||
* \sa SDL_CreateGPUComputePipeline
|
||||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageTextures(
|
||||
SDL_GPUComputePass *compute_pass,
|
||||
@@ -3722,7 +3722,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageTextures(
|
||||
* SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ.
|
||||
*
|
||||
* Be sure your shader is set up according to the requirements documented in
|
||||
* SDL_CreateGPUShader().
|
||||
* SDL_CreateGPUComputePipeline().
|
||||
*
|
||||
* \param compute_pass a compute pass handle.
|
||||
* \param first_slot the compute storage buffer slot to begin binding from.
|
||||
@@ -3731,7 +3731,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageTextures(
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CreateGPUShader
|
||||
* \sa SDL_CreateGPUComputePipeline
|
||||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageBuffers(
|
||||
SDL_GPUComputePass *compute_pass,
|
||||
@@ -3903,6 +3903,10 @@ extern SDL_DECLSPEC void SDLCALL SDL_UploadToGPUBuffer(
|
||||
* This copy occurs on the GPU timeline. You may assume the copy has finished
|
||||
* in subsequent commands.
|
||||
*
|
||||
* This function does not support copying between depth and color textures.
|
||||
* For those, copy the texture to a buffer and then to the destination
|
||||
* texture.
|
||||
*
|
||||
* \param copy_pass a copy pass handle.
|
||||
* \param source a source texture region.
|
||||
* \param destination a destination texture region.
|
||||
|
||||
71
Source/ThirdParty/SDL/SDL3/SDL_hints.h
vendored
71
Source/ThirdParty/SDL/SDL3/SDL_hints.h
vendored
@@ -787,32 +787,6 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
|
||||
|
||||
/**
|
||||
* Dictate that windows on Emscripten will fill the whole browser window.
|
||||
*
|
||||
* When enabled, the canvas element fills the entire document. Resize events
|
||||
* will be generated as the browser window is resized, as that will adjust the
|
||||
* canvas size as well. The canvas will cover anything else on the page,
|
||||
* including any controls provided by Emscripten in its generated HTML file
|
||||
* (in fact, any elements on the page that aren't the canvas will be moved
|
||||
* into a hidden `div` element).
|
||||
*
|
||||
* Often times this is desirable for a browser-based game, but it means
|
||||
* several things that we expect of an SDL window on other platforms might not
|
||||
* work as expected, such as minimum window sizes and aspect ratios.
|
||||
*
|
||||
* This hint overrides SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN
|
||||
* properties when creating an SDL window.
|
||||
*
|
||||
* This hint only applies to the Emscripten platform.
|
||||
*
|
||||
* This hint can be set at any time (before creating the window, or to toggle
|
||||
* its state later). Only one window can fill the document at a time.
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.0.
|
||||
*/
|
||||
#define SDL_HINT_EMSCRIPTEN_FILL_DOCUMENT "SDL_EMSCRIPTEN_FILL_DOCUMENT"
|
||||
|
||||
/**
|
||||
* A variable that controls whether the on-screen keyboard should be shown
|
||||
* when text input is active.
|
||||
@@ -1110,6 +1084,21 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_HIDAPI_LIBUSB "SDL_HIDAPI_LIBUSB"
|
||||
|
||||
|
||||
/**
|
||||
* A variable to control whether HIDAPI uses libusb for GameCube adapters.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "0": HIDAPI will not use libusb for GameCube adapters.
|
||||
* - "1": HIDAPI will use libusb for GameCube adapters if available. (default)
|
||||
*
|
||||
* This hint should be set before SDL is initialized.
|
||||
*
|
||||
* \since This hint is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_HINT_HIDAPI_LIBUSB_GAMECUBE "SDL_HIDAPI_LIBUSB_GAMECUBE"
|
||||
|
||||
/**
|
||||
* A variable to control whether HIDAPI uses libusb only for whitelisted
|
||||
* devices.
|
||||
@@ -2718,6 +2707,24 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_DEFAULT_SYSTEM_CURSOR "SDL_MOUSE_DEFAULT_SYSTEM_CURSOR"
|
||||
|
||||
/**
|
||||
* A variable setting whether we should scale cursors by the current display
|
||||
* scale.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "0": Cursors will not change size based on the display content scale.
|
||||
* (default)
|
||||
* - "1": Cursors will automatically match the display content scale (e.g. a
|
||||
* 2x sized cursor will be used when the window is on a monitor with 200%
|
||||
* scale). This is currently implemented on Windows and Wayland.
|
||||
*
|
||||
* This hint needs to be set before creating cursors.
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.0.
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_DPI_SCALE_CURSORS "SDL_MOUSE_DPI_SCALE_CURSORS"
|
||||
|
||||
/**
|
||||
* A variable controlling whether warping a hidden mouse cursor will activate
|
||||
* relative mouse mode.
|
||||
@@ -3549,10 +3556,12 @@ extern "C" {
|
||||
* 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...).
|
||||
* 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.
|
||||
* On Wayland desktops, the connector names associated with displays can be
|
||||
* found in the `name` property of the info output from `wayland-info -i
|
||||
* wl_output`. On X11 desktops, the `xrandr` utility can be used to retrieve
|
||||
* the connector names associated with displays.
|
||||
*
|
||||
* This hint is currently supported on the following drivers:
|
||||
*
|
||||
@@ -3733,8 +3742,10 @@ extern "C" {
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "0": Fullscreen windows will not be minimized when they lose focus.
|
||||
* (default)
|
||||
* - "1": Fullscreen windows are minimized when they lose focus.
|
||||
* - "auto": Fullscreen windows are minimized when they lose focus if they use
|
||||
* exclusive fullscreen modes, so the desktop video mode is restored.
|
||||
* (default)
|
||||
*
|
||||
* This hint can be set anytime.
|
||||
*
|
||||
|
||||
2
Source/ThirdParty/SDL/SDL3/SDL_keycode.h
vendored
2
Source/ThirdParty/SDL/SDL3/SDL_keycode.h
vendored
@@ -48,7 +48,7 @@
|
||||
* by default to SDLK_0...SDLK_9 on AZERTY layouts.
|
||||
*
|
||||
* Keys with the `SDLK_EXTENDED_MASK` bit set do not map to a scancode or
|
||||
* unicode code point.
|
||||
* Unicode code point.
|
||||
*
|
||||
* Many common keycodes are listed below, but this list is not exhaustive.
|
||||
*
|
||||
|
||||
17
Source/ThirdParty/SDL/SDL3/SDL_mouse.h
vendored
17
Source/ThirdParty/SDL/SDL3/SDL_mouse.h
vendored
@@ -203,10 +203,10 @@ typedef Uint32 SDL_MouseButtonFlags;
|
||||
* \sa SDL_SetRelativeMouseTransform
|
||||
*/
|
||||
typedef void (SDLCALL *SDL_MouseMotionTransformCallback)(
|
||||
void *userdata,
|
||||
Uint64 timestamp,
|
||||
SDL_Window *window,
|
||||
SDL_MouseID mouseID,
|
||||
void *userdata,
|
||||
Uint64 timestamp,
|
||||
SDL_Window *window,
|
||||
SDL_MouseID mouseID,
|
||||
float *x, float *y
|
||||
);
|
||||
|
||||
@@ -593,9 +593,10 @@ extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_CreateCursor(const Uint8 *data,
|
||||
* If this function is passed a surface with alternate representations added
|
||||
* with SDL_AddSurfaceAlternateImage(), the surface will be interpreted as the
|
||||
* content to be used for 100% display scale, and the alternate
|
||||
* representations will be used for high DPI situations. For example, if the
|
||||
* original surface is 32x32, then on a 2x macOS display or 200% display scale
|
||||
* on Windows, a 64x64 version of the image will be used, if available. If a
|
||||
* representations will be used for high DPI situations if
|
||||
* SDL_HINT_MOUSE_DPI_SCALE_CURSORS is enabled. For example, if the original
|
||||
* surface is 32x32, then on a 2x macOS display or 200% display scale on
|
||||
* Windows, a 64x64 version of the image will be used, if available. If a
|
||||
* matching version of the image isn't available, the closest larger size
|
||||
* image will be downscaled to the appropriate size and be used instead, if
|
||||
* available. Otherwise, the closest smaller image will be upscaled and be
|
||||
@@ -730,7 +731,7 @@ extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_GetCursor(void);
|
||||
* You do not have to call SDL_DestroyCursor() on the return value, but it is
|
||||
* safe to do so.
|
||||
*
|
||||
* \returns the default cursor on success or NULL on failuree; call
|
||||
* \returns the default cursor on success or NULL on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
|
||||
8
Source/ThirdParty/SDL/SDL3/SDL_render.h
vendored
8
Source/ThirdParty/SDL/SDL3/SDL_render.h
vendored
@@ -768,9 +768,10 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Rende
|
||||
*
|
||||
* With the vulkan renderer:
|
||||
*
|
||||
* - `SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER`: the VkImage with layout
|
||||
* VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL associated with the texture, if
|
||||
* you want to wrap an existing texture.
|
||||
* - `SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER`: the VkImage associated
|
||||
* with the texture, if you want to wrap an existing texture.
|
||||
* - `SDL_PROP_TEXTURE_CREATE_VULKAN_LAYOUT_NUMBER`: the VkImageLayout for the
|
||||
* VkImage, defaults to VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL.
|
||||
*
|
||||
* With the GPU renderer:
|
||||
*
|
||||
@@ -828,6 +829,7 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureWithProperties(SDL_Re
|
||||
#define SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_U_NUMBER "SDL.texture.create.opengles2.texture_u"
|
||||
#define SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_V_NUMBER "SDL.texture.create.opengles2.texture_v"
|
||||
#define SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER "SDL.texture.create.vulkan.texture"
|
||||
#define SDL_PROP_TEXTURE_CREATE_VULKAN_LAYOUT_NUMBER "SDL.texture.create.vulkan.layout"
|
||||
#define SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_POINTER "SDL.texture.create.gpu.texture"
|
||||
#define SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_UV_POINTER "SDL.texture.create.gpu.texture_uv"
|
||||
#define SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_U_POINTER "SDL.texture.create.gpu.texture_u"
|
||||
|
||||
4
Source/ThirdParty/SDL/SDL3/SDL_revision.h
vendored
4
Source/ThirdParty/SDL/SDL3/SDL_revision.h
vendored
@@ -31,9 +31,9 @@
|
||||
/* #undef SDL_VENDOR_INFO */
|
||||
|
||||
#ifdef SDL_VENDOR_INFO
|
||||
#define SDL_REVISION "SDL-3.3.4-prerelease-3.3.4 (" SDL_VENDOR_INFO ")"
|
||||
#define SDL_REVISION "SDL-3.4.0-release-3.4.0 (" SDL_VENDOR_INFO ")"
|
||||
#else
|
||||
#define SDL_REVISION "SDL-3.3.4-prerelease-3.3.4"
|
||||
#define SDL_REVISION "SDL-3.4.0-release-3.4.0"
|
||||
#endif
|
||||
|
||||
#endif /* SDL_revision_h_ */
|
||||
|
||||
18
Source/ThirdParty/SDL/SDL3/SDL_surface.h
vendored
18
Source/ThirdParty/SDL/SDL3/SDL_surface.h
vendored
@@ -241,9 +241,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroySurface(SDL_Surface *surface);
|
||||
* left edge of the image, if this surface is being used as a cursor.
|
||||
* - `SDL_PROP_SURFACE_HOTSPOT_Y_NUMBER`: the hotspot pixel offset from the
|
||||
* top edge of the image, if this surface is being used as a cursor.
|
||||
* - `SDL_PROP_SURFACE_ROTATION_NUMBER`: the number of degrees a surface's
|
||||
* data is meant to be rotated clockwise to make the image right-side up.
|
||||
* Default 0. This is used by the camera API, if a mobile device is oriented
|
||||
* - `SDL_PROP_SURFACE_ROTATION_FLOAT`: the number of degrees a surface's data
|
||||
* is meant to be rotated clockwise to make the image right-side up. Default
|
||||
* 0. This is used by the camera API, if a mobile device is oriented
|
||||
* differently than what its camera provides (i.e. - the camera always
|
||||
* provides portrait images but the phone is being held in landscape
|
||||
* orientation). Since SDL 3.4.0.
|
||||
@@ -263,7 +263,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetSurfaceProperties(SDL_Surfac
|
||||
#define SDL_PROP_SURFACE_TONEMAP_OPERATOR_STRING "SDL.surface.tonemap"
|
||||
#define SDL_PROP_SURFACE_HOTSPOT_X_NUMBER "SDL.surface.hotspot.x"
|
||||
#define SDL_PROP_SURFACE_HOTSPOT_Y_NUMBER "SDL.surface.hotspot.y"
|
||||
#define SDL_PROP_SURFACE_ROTATION_NUMBER "SDL.surface.rotation"
|
||||
#define SDL_PROP_SURFACE_ROTATION_FLOAT "SDL.surface.rotation"
|
||||
|
||||
/**
|
||||
* Set the colorspace used by a surface.
|
||||
@@ -1027,6 +1027,14 @@ extern SDL_DECLSPEC bool SDLCALL SDL_FlipSurface(SDL_Surface *surface, SDL_FlipM
|
||||
* larger than the original, with the background filled in with the colorkey,
|
||||
* if available, or RGBA 255/255/255/0 if not.
|
||||
*
|
||||
* If `surface` has the SDL_PROP_SURFACE_ROTATION_FLOAT property set on it,
|
||||
* the new copy will have the adjusted value set: if the rotation property is
|
||||
* 90 and `angle` was 30, the new surface will have a property value of 60
|
||||
* (that is: to be upright vs gravity, this surface needs to rotate 60 more
|
||||
* degrees). However, note that further rotations on the new surface in this
|
||||
* example will produce unexpected results, since the image will have resized
|
||||
* and padded to accommodate the not-90 degree angle.
|
||||
*
|
||||
* \param surface the surface to rotate.
|
||||
* \param angle the rotation angle, in degrees.
|
||||
* \returns a rotated copy of the surface or NULL on failure; call
|
||||
@@ -1247,7 +1255,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PremultiplySurfaceAlpha(SDL_Surface *surfac
|
||||
* This function handles all surface formats, and ignores any clip rectangle.
|
||||
*
|
||||
* If the surface is YUV, the color is assumed to be in the sRGB colorspace,
|
||||
* otherwise the color is assumed to be in the colorspace of the suface.
|
||||
* otherwise the color is assumed to be in the colorspace of the surface.
|
||||
*
|
||||
* \param surface the SDL_Surface to clear.
|
||||
* \param r the red component of the pixel, normally in the range 0-1.
|
||||
|
||||
8
Source/ThirdParty/SDL/SDL3/SDL_test_log.h
vendored
8
Source/ThirdParty/SDL/SDL3/SDL_test_log.h
vendored
@@ -42,6 +42,14 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Prints given message with a timestamp in the TEST category and given priority.
|
||||
*
|
||||
* \param priority Priority of the message
|
||||
* \param fmt Message to be logged
|
||||
*/
|
||||
void SDLCALL SDLTest_LogMessage(SDL_LogPriority priority, SDL_PRINTF_FORMAT_STRING const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* Prints given message with a timestamp in the TEST category and INFO priority.
|
||||
*
|
||||
|
||||
4
Source/ThirdParty/SDL/SDL3/SDL_version.h
vendored
4
Source/ThirdParty/SDL/SDL3/SDL_version.h
vendored
@@ -53,7 +53,7 @@ extern "C" {
|
||||
*
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_MINOR_VERSION 3
|
||||
#define SDL_MINOR_VERSION 4
|
||||
|
||||
/**
|
||||
* The current micro (or patchlevel) version of the SDL headers.
|
||||
@@ -62,7 +62,7 @@ extern "C" {
|
||||
*
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_MICRO_VERSION 4
|
||||
#define SDL_MICRO_VERSION 0
|
||||
|
||||
/**
|
||||
* This macro turns the version numbers into a numeric value.
|
||||
|
||||
49
Source/ThirdParty/SDL/SDL3/SDL_video.h
vendored
49
Source/ThirdParty/SDL/SDL3/SDL_video.h
vendored
@@ -215,6 +215,7 @@ typedef Uint64 SDL_WindowFlags;
|
||||
#define SDL_WINDOW_TOOLTIP SDL_UINT64_C(0x0000000000040000) /**< window should be treated as a tooltip and does not get mouse or keyboard focus, requires a parent window */
|
||||
#define SDL_WINDOW_POPUP_MENU SDL_UINT64_C(0x0000000000080000) /**< window should be treated as a popup menu, requires a parent window */
|
||||
#define SDL_WINDOW_KEYBOARD_GRABBED SDL_UINT64_C(0x0000000000100000) /**< window has grabbed keyboard input */
|
||||
#define SDL_WINDOW_FILL_DOCUMENT SDL_UINT64_C(0x0000000000200000) /**< window is in fill-document mode (Emscripten only), since SDL 3.4.0 */
|
||||
#define SDL_WINDOW_VULKAN SDL_UINT64_C(0x0000000010000000) /**< window usable for Vulkan surface */
|
||||
#define SDL_WINDOW_METAL SDL_UINT64_C(0x0000000020000000) /**< window usable for Metal view */
|
||||
#define SDL_WINDOW_TRANSPARENT SDL_UINT64_C(0x0000000040000000) /**< window with transparent buffer */
|
||||
@@ -1370,15 +1371,6 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_CreatePopupWindow(SDL_Window *paren
|
||||
*
|
||||
* - `SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_CANVAS_ID_STRING`: the id given to the
|
||||
* canvas element. This should start with a '#' sign
|
||||
* - `SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN`: true to make
|
||||
* the canvas element fill the entire document. Resize events will be
|
||||
* generated as the browser window is resized, as that will adjust the
|
||||
* canvas size as well. The canvas will cover anything else on the page,
|
||||
* including any controls provided by Emscripten in its generated HTML file.
|
||||
* Often times this is desirable for a browser-based game, but it means
|
||||
* several things that we expect of an SDL window on other platforms might
|
||||
* not work as expected, such as minimum window sizes and aspect ratios.
|
||||
* Default false.
|
||||
* - `SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING`: override the
|
||||
* binding element for keyboard inputs for this canvas. The variable can be
|
||||
* one of:
|
||||
@@ -1453,7 +1445,6 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowWithProperties(SDL_Prop
|
||||
#define SDL_PROP_WINDOW_CREATE_WIN32_PIXEL_FORMAT_HWND_POINTER "SDL.window.create.win32.pixel_format_hwnd"
|
||||
#define SDL_PROP_WINDOW_CREATE_X11_WINDOW_NUMBER "SDL.window.create.x11.window"
|
||||
#define SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_CANVAS_ID_STRING "SDL.window.create.emscripten.canvas_id"
|
||||
#define SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN "SDL.window.create.emscripten.fill_document"
|
||||
#define SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING "SDL.window.create.emscripten.keyboard_element"
|
||||
|
||||
/**
|
||||
@@ -1623,9 +1614,6 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetWindowParent(SDL_Window *window)
|
||||
*
|
||||
* - `SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING`: the id the canvas element
|
||||
* will have
|
||||
* - `SDL_PROP_WINDOW_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN`: true if the canvas is
|
||||
* set to consume the entire browser window, bypassing some SDL window
|
||||
* functionality.
|
||||
* - `SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING`: the keyboard
|
||||
* element that associates keyboard events to this window
|
||||
*
|
||||
@@ -1675,7 +1663,6 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetWindowProperties(SDL_Window
|
||||
#define SDL_PROP_WINDOW_X11_SCREEN_NUMBER "SDL.window.x11.screen"
|
||||
#define SDL_PROP_WINDOW_X11_WINDOW_NUMBER "SDL.window.x11.window"
|
||||
#define SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING "SDL.window.emscripten.canvas_id"
|
||||
#define SDL_PROP_WINDOW_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN "SDL.window.emscripten.fill_document"
|
||||
#define SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING "SDL.window.emscripten.keyboard_element"
|
||||
|
||||
/**
|
||||
@@ -1694,6 +1681,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetWindowProperties(SDL_Window
|
||||
* \sa SDL_MinimizeWindow
|
||||
* \sa SDL_SetWindowFullscreen
|
||||
* \sa SDL_SetWindowMouseGrab
|
||||
* \sa SDL_SetWindowFillDocument
|
||||
* \sa SDL_ShowWindow
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_WindowFlags SDLCALL SDL_GetWindowFlags(SDL_Window *window);
|
||||
@@ -1893,7 +1881,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowSize(SDL_Window *window, int *w, i
|
||||
* notches, TV overscan, etc. This function provides the area of the window
|
||||
* 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.
|
||||
* or interactable content.
|
||||
*
|
||||
* \param window the window to query.
|
||||
* \param rect a pointer filled in with the client area that is safe for
|
||||
@@ -2163,6 +2151,37 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowResizable(SDL_Window *window, bool
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window *window, bool on_top);
|
||||
|
||||
/**
|
||||
* Set the window to fill the current document space (Emscripten only).
|
||||
*
|
||||
* This will add or remove the window's `SDL_WINDOW_FILL_DOCUMENT` flag.
|
||||
*
|
||||
* Currently this flag only applies to the Emscripten target.
|
||||
*
|
||||
* When enabled, the canvas element fills the entire document. Resize events
|
||||
* will be generated as the browser window is resized, as that will adjust the
|
||||
* canvas size as well. The canvas will cover anything else on the page,
|
||||
* including any controls provided by Emscripten in its generated HTML file
|
||||
* (in fact, any elements on the page that aren't the canvas will be moved
|
||||
* into a hidden `div` element).
|
||||
*
|
||||
* Often times this is desirable for a browser-based game, but it means
|
||||
* several things that we expect of an SDL window on other platforms might not
|
||||
* work as expected, such as minimum window sizes and aspect ratios.
|
||||
*
|
||||
* \param window the window of which to change the fill-document state.
|
||||
* \param fill true to set the window to fill the document, false to disable.
|
||||
* \returns true on success or false on failure; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.4.0.
|
||||
*
|
||||
* \sa SDL_GetWindowFlags
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowFillDocument(SDL_Window *window, bool fill);
|
||||
|
||||
/**
|
||||
* Show a window.
|
||||
*
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace Flax.Deps.Dependencies
|
||||
|
||||
CloneGitRepo(root, "https://github.com/libsdl-org/SDL");
|
||||
GitFetch(root);
|
||||
GitResetToCommit(root, "f173fd28f04cb64ae054d6a97edb5d33925f539b"); // 3.3.4 preview
|
||||
GitResetToCommit(root, "a962f40bbba175e9716557a25d5d7965f134a3d3"); // 3.4.0
|
||||
|
||||
foreach (var platform in options.Platforms)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user