mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-23 17:21:08 +01:00
Compare commits
389 Commits
prerelease
...
release-3.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99a026cfde | ||
|
|
fa68d7de8b | ||
|
|
b7e46361f5 | ||
|
|
c9271b2f18 | ||
|
|
7b7322b222 | ||
|
|
a4c326a7bb | ||
|
|
a2fb4d6d47 | ||
|
|
b560f8ab17 | ||
|
|
0bf2065922 | ||
|
|
5ee57a9da1 | ||
|
|
86c664d695 | ||
|
|
8fa310e162 | ||
|
|
4dc440ff71 | ||
|
|
8ba903c859 | ||
|
|
a63fd07812 | ||
|
|
993993aaf3 | ||
|
|
c189cce819 | ||
|
|
6248eeec09 | ||
|
|
58c9c0ba7b | ||
|
|
96c4104523 | ||
|
|
e8f600bf46 | ||
|
|
ffd2696516 | ||
|
|
c5bc4576fc | ||
|
|
66020c2ed7 | ||
|
|
c2a910ab02 | ||
|
|
1e4fd21700 | ||
|
|
36ed4b75d1 | ||
|
|
7280152549 | ||
|
|
a70353891e | ||
|
|
fb312b2463 | ||
|
|
b08f7924a4 | ||
|
|
96e05da95e | ||
|
|
776e87ada9 | ||
|
|
99a65853a6 | ||
|
|
4128c4e44b | ||
|
|
18a0157457 | ||
|
|
b36a5ab6f4 | ||
|
|
aa5bcfa3d8 | ||
|
|
ef03c66ef3 | ||
|
|
6299705584 | ||
|
|
fcce05a19c | ||
|
|
1ee158cd31 | ||
|
|
e4c664a75f | ||
|
|
7a1d02083d | ||
|
|
0030fafda2 | ||
|
|
c9479f86f6 | ||
|
|
8bf6e23164 | ||
|
|
fb9bb7426d | ||
|
|
3a2a13d966 | ||
|
|
48fb914228 | ||
|
|
3e87c31a6c | ||
|
|
654f6f94f6 | ||
|
|
e7e2805475 | ||
|
|
df72790cfb | ||
|
|
0f02c41ac0 | ||
|
|
6d93ffe923 | ||
|
|
2fad85fa26 | ||
|
|
36ba09b63d | ||
|
|
b0414440a3 | ||
|
|
28014a0452 | ||
|
|
488e196415 | ||
|
|
d5b90fd82f | ||
|
|
c903079708 | ||
|
|
b488c2e4a0 | ||
|
|
aa9de89232 | ||
|
|
645b8e7f6d | ||
|
|
17532fd62e | ||
|
|
2214522b69 | ||
|
|
c608ce5acb | ||
|
|
b3adee0720 | ||
|
|
00c85a0b9e | ||
|
|
77edb4d5d3 | ||
|
|
62aea530b4 | ||
|
|
abab2f1181 | ||
|
|
01d8bb5b7c | ||
|
|
27439467ce | ||
|
|
399b2b18ce | ||
|
|
cbee4abdfc | ||
|
|
7066c6491e | ||
|
|
74bfc913ac | ||
|
|
d01ec84d85 | ||
|
|
d281a080c6 | ||
|
|
683181b47c | ||
|
|
a3bfd36665 | ||
|
|
70e1804e9f | ||
|
|
eaa20b5e8a | ||
|
|
a056d0f39a | ||
|
|
910d31e56a | ||
|
|
77dd2685ec | ||
|
|
7cc9955ae1 | ||
|
|
76ff74eeab | ||
|
|
dc590257ba | ||
|
|
267f13446d | ||
|
|
4cc96e3506 | ||
|
|
13ff9e0818 | ||
|
|
42abf69434 | ||
|
|
5d9d966d59 | ||
|
|
8df04368b3 | ||
|
|
3b4cf41c92 | ||
|
|
65dfdce3df | ||
|
|
3a5d0bac71 | ||
|
|
29c58245a7 | ||
|
|
1edb906aad | ||
|
|
1faaa128e5 | ||
|
|
99e1d9595f | ||
|
|
8389de757a | ||
|
|
a82660bb76 | ||
|
|
3d2af85934 | ||
|
|
ea2b4f4674 | ||
|
|
febe5dd3bc | ||
|
|
8f9dd75ead | ||
|
|
a849c4d361 | ||
|
|
8973dfd9cc | ||
|
|
2f4919c6ff | ||
|
|
d390a4e8f0 | ||
|
|
9f0ebbef46 | ||
|
|
6707df6d88 | ||
|
|
744ea5701c | ||
|
|
b467276f4a | ||
|
|
4361920501 | ||
|
|
b5cad69b9c | ||
|
|
723b77ede8 | ||
|
|
a7bac75470 | ||
|
|
a806a9092b | ||
|
|
55d78567b1 | ||
|
|
88bbc94921 | ||
|
|
027183f89c | ||
|
|
0810c5ac0d | ||
|
|
9f45801fa7 | ||
|
|
ae3bb879c7 | ||
|
|
17eb20505c | ||
|
|
badd9e5a15 | ||
|
|
576c2d2f2c | ||
|
|
48e5fc7b69 | ||
|
|
12e9ff33c3 | ||
|
|
054bea938a | ||
|
|
b9107ec196 | ||
|
|
5728f9d703 | ||
|
|
e61a874c66 | ||
|
|
2b72332b81 | ||
|
|
9ee86e7e79 | ||
|
|
6168085e45 | ||
|
|
000d56702e | ||
|
|
c12d90108f | ||
|
|
44c0feed99 | ||
|
|
fc5862b0dd | ||
|
|
7f3d51b690 | ||
|
|
45086459d2 | ||
|
|
5964104910 | ||
|
|
9194d199e7 | ||
|
|
81d9f30db4 | ||
|
|
38b9c9117d | ||
|
|
2887de55d6 | ||
|
|
8107d5b042 | ||
|
|
94f6f8d3c3 | ||
|
|
5935fe73d3 | ||
|
|
775eac98ee | ||
|
|
d9bc9dda7a | ||
|
|
f9bb023eeb | ||
|
|
9bf533d1c4 | ||
|
|
a2653b857c | ||
|
|
00fc74e6af | ||
|
|
28470f9231 | ||
|
|
171874ae5c | ||
|
|
6dc3211d56 | ||
|
|
6c38358984 | ||
|
|
c3e92cf1c4 | ||
|
|
de5e0f1784 | ||
|
|
1a278bb511 | ||
|
|
e803cbb34a | ||
|
|
997808a945 | ||
|
|
3cf15dc222 | ||
|
|
38b5ad824d | ||
|
|
d90c07a88f | ||
|
|
ff2a43bfbf | ||
|
|
5a4f1cbceb | ||
|
|
c4074bc9c9 | ||
|
|
6b6fe286fb | ||
|
|
e612c58518 | ||
|
|
dfb270f87c | ||
|
|
1ec73bac92 | ||
|
|
e1294f3b48 | ||
|
|
9c0b773f09 | ||
|
|
6cd9374929 | ||
|
|
3bde3e2406 | ||
|
|
5c002ba0b9 | ||
|
|
05fdfa1572 | ||
|
|
d4da5df088 | ||
|
|
6fef8fd0dc | ||
|
|
13f8201dbe | ||
|
|
4431c5f8ba | ||
|
|
a3232fe84e | ||
|
|
2ea3ac2914 | ||
|
|
34c687a59b | ||
|
|
388546be2e | ||
|
|
78b16b3cb8 | ||
|
|
e48e8a48ad | ||
|
|
26352be1e5 | ||
|
|
1d6d424775 | ||
|
|
c8fa870b36 | ||
|
|
b7df720371 | ||
|
|
b73ab6cc82 | ||
|
|
fffa14eb1a | ||
|
|
5454573e2d | ||
|
|
c6489b731e | ||
|
|
b451b27427 | ||
|
|
895bdc4f21 | ||
|
|
9e5975f332 | ||
|
|
a84cde99b7 | ||
|
|
aae4cb8d15 | ||
|
|
8ed4f46db0 | ||
|
|
3a54ca75cf | ||
|
|
3ec7fc8f59 | ||
|
|
4214001b97 | ||
|
|
44b59db1d5 | ||
|
|
7627f5d838 | ||
|
|
9c69084ed3 | ||
|
|
3b4ea10ebc | ||
|
|
799d2ca80b | ||
|
|
66a8454f2d | ||
|
|
012443729d | ||
|
|
26d20d5e22 | ||
|
|
45ab4a16a2 | ||
|
|
2a6187aa6b | ||
|
|
b7a241973a | ||
|
|
b8aff4a3ed | ||
|
|
d264c27468 | ||
|
|
92d6308aac | ||
|
|
a2f3e2ac23 | ||
|
|
e1b020f340 | ||
|
|
c88049d27f | ||
|
|
3cd5a407b8 | ||
|
|
75ff70b489 | ||
|
|
f6a979d7e8 | ||
|
|
f4b937adf8 | ||
|
|
6aa227a428 | ||
|
|
cc0755881c | ||
|
|
f1b2fa5b9b | ||
|
|
a4b7a77d70 | ||
|
|
06a6adf2b0 | ||
|
|
08b2176a80 | ||
|
|
99b2344253 | ||
|
|
35a891d0e9 | ||
|
|
0394e2e583 | ||
|
|
8a418521e1 | ||
|
|
fa894b07be | ||
|
|
832b2aaf39 | ||
|
|
3f58b99b53 | ||
|
|
406cd277d2 | ||
|
|
9a5700e9a3 | ||
|
|
2237a8eba2 | ||
|
|
0bc2296756 | ||
|
|
a85a6364d8 | ||
|
|
9fbba079b9 | ||
|
|
3d651ee403 | ||
|
|
8de01986b1 | ||
|
|
cbed9bd54d | ||
|
|
fd345ae2f9 | ||
|
|
c5dee0feb5 | ||
|
|
a6ff5646f4 | ||
|
|
80c6a5f8d9 | ||
|
|
d15ecb21be | ||
|
|
a962f40bbb | ||
|
|
cac2460623 | ||
|
|
25e33948af | ||
|
|
9698e20399 | ||
|
|
0ac6f972f9 | ||
|
|
d7a2d007d0 | ||
|
|
cb4f33b644 | ||
|
|
4d8f84f161 | ||
|
|
618eb57519 | ||
|
|
128b9260ec | ||
|
|
1a27b5b838 | ||
|
|
7d66d3271b | ||
|
|
b681862f14 | ||
|
|
3d354eeaad | ||
|
|
d33642b710 | ||
|
|
95ac0ff4d6 | ||
|
|
cb04dcd6f8 | ||
|
|
4fcb92e0df | ||
|
|
48d6c70f2c | ||
|
|
d10fe8bf2f | ||
|
|
becd08f376 | ||
|
|
38345adff0 | ||
|
|
370e9407b5 | ||
|
|
b6f4e10bf9 | ||
|
|
9e0b31b297 | ||
|
|
76352f2931 | ||
|
|
1fee2a9ae0 | ||
|
|
9fe5c1512f | ||
|
|
89dd2426cf | ||
|
|
8c54961de0 | ||
|
|
bb3d78e260 | ||
|
|
edec0c2ffd | ||
|
|
bf113bbe2a | ||
|
|
9dd3e2305e | ||
|
|
e18b301c51 | ||
|
|
58f534708e | ||
|
|
6840bbef58 | ||
|
|
5c03796ac7 | ||
|
|
0f1a705fda | ||
|
|
bd29d60d3c | ||
|
|
419e8600c8 | ||
|
|
e79cfbe520 | ||
|
|
2cd84bd581 | ||
|
|
0b9946d7bf | ||
|
|
7fe81f789f | ||
|
|
9094395b13 | ||
|
|
2bc6cf6efd | ||
|
|
00fe482efb | ||
|
|
bd35a1c8e5 | ||
|
|
5a257202d2 | ||
|
|
efc33633e3 | ||
|
|
37fca1fdcf | ||
|
|
b14aceea51 | ||
|
|
59961d8343 | ||
|
|
341f60555f | ||
|
|
0d705ca275 | ||
|
|
190b902fac | ||
|
|
2c3657a0ce | ||
|
|
46df9ea92a | ||
|
|
235f417616 | ||
|
|
d028d8bc3b | ||
|
|
63636c8403 | ||
|
|
c7508ca2e9 | ||
|
|
9c856aea96 | ||
|
|
d583fc88be | ||
|
|
9022d90e01 | ||
|
|
ef0a604d44 | ||
|
|
aeb4b3d2fc | ||
|
|
78d008fcd2 | ||
|
|
d94cd1efad | ||
|
|
09a2283b53 | ||
|
|
6665ebaa2e | ||
|
|
765a2e9118 | ||
|
|
1260c10aab | ||
|
|
73c9f25867 | ||
|
|
9092ddff3c | ||
|
|
db84b948f9 | ||
|
|
deb85d1fa8 | ||
|
|
64df9cfa47 | ||
|
|
bcaedd5781 | ||
|
|
518c98ea01 | ||
|
|
de642c8890 | ||
|
|
ae8df644d7 | ||
|
|
a3e5335dbf | ||
|
|
16b74a6ffa | ||
|
|
517a3d20e8 | ||
|
|
d780fa144a | ||
|
|
5fe69e73ba | ||
|
|
a2d19ec7f3 | ||
|
|
ec19f1e12f | ||
|
|
71be323973 | ||
|
|
bdb72bb3f0 | ||
|
|
76dfb85407 | ||
|
|
d6f6421973 | ||
|
|
f8a4fbf128 | ||
|
|
e5731f9bac | ||
|
|
c2710bd4e8 | ||
|
|
450a2cb5e4 | ||
|
|
ef416e84a1 | ||
|
|
5bbf1dcb44 | ||
|
|
466ca58b04 | ||
|
|
5b572638b8 | ||
|
|
62639fdf88 | ||
|
|
b3cdeb942a | ||
|
|
a296c40867 | ||
|
|
f896e26f59 | ||
|
|
d19b010d4e | ||
|
|
14aa5cf762 | ||
|
|
69255b870d | ||
|
|
a4de176e1c | ||
|
|
9b36a76ee6 | ||
|
|
a75bf983e5 | ||
|
|
6f774908fe | ||
|
|
a35639c7b5 | ||
|
|
db3ee5d62b | ||
|
|
08a547e077 | ||
|
|
b428c1834f | ||
|
|
5813d0ec0a | ||
|
|
4194879df1 | ||
|
|
9918d6cb5e | ||
|
|
19988c5faa | ||
|
|
7773157fae | ||
|
|
9bf86a2db3 | ||
|
|
edb81cf84a | ||
|
|
9257df24b5 | ||
|
|
97b0b13147 | ||
|
|
7e78636e8e |
6
.github/workflows/create-test-plan.py
vendored
6
.github/workflows/create-test-plan.py
vendored
@@ -117,8 +117,10 @@ JOB_SPECS = {
|
||||
"ubuntu-22.04": JobSpec(name="Ubuntu 22.04", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04", ),
|
||||
"ubuntu-latest": JobSpec(name="Ubuntu (latest)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-ubuntu-latest", ),
|
||||
"ubuntu-24.04-arm64": JobSpec(name="Ubuntu 24.04 (ARM64)", os=JobOs.Ubuntu24_04_arm, platform=SdlPlatform.Linux, artifact="SDL-ubuntu24.04-arm64", ),
|
||||
"steamrt3": JobSpec(name="Steam Linux Runtime 3.0 (x86_64)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-steamrt3", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest", more_hard_deps = True, ),
|
||||
"steamrt3-arm64": JobSpec(name="Steam Linux Runtime 3.0 (arm64)", os=JobOs.Ubuntu24_04_arm, platform=SdlPlatform.Linux, artifact="SDL-steamrt3-arm64", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk/arm64:latest", more_hard_deps = True, ),
|
||||
"steamrt3": JobSpec(name="Steam Linux Runtime 3.0 (x86_64)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-steamrt3", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest" ),
|
||||
"steamrt3-arm64": JobSpec(name="Steam Linux Runtime 3.0 (arm64)", os=JobOs.Ubuntu24_04_arm, platform=SdlPlatform.Linux, artifact="SDL-steamrt3-arm64", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk/arm64:latest" ),
|
||||
"steamrt4": JobSpec(name="Steam Linux Runtime 4.0 (x86_64)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-steamrt4", container="registry.gitlab.steamos.cloud/steamrt/steamrt4/sdk:latest", more_hard_deps = True, ),
|
||||
"steamrt4-arm64": JobSpec(name="Steam Linux Runtime 4.0 (arm64)", os=JobOs.Ubuntu24_04_arm, platform=SdlPlatform.Linux, artifact="SDL-steamrt4-arm64", container="registry.gitlab.steamos.cloud/steamrt/steamrt4/sdk/arm64:latest", more_hard_deps = True, ),
|
||||
"ubuntu-intel-icx": JobSpec(name="Ubuntu 22.04 (Intel oneAPI)", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04-oneapi", intel=IntelCompiler.Icx, ),
|
||||
"ubuntu-intel-icc": JobSpec(name="Ubuntu 22.04 (Intel Compiler)", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04-icc", intel=IntelCompiler.Icc, ),
|
||||
"macos-framework-x64": JobSpec(name="MacOS (Framework) (x64)", os=JobOs.Macos14, platform=SdlPlatform.MacOS, artifact="SDL-macos-framework", apple_framework=True, apple_archs={AppleArch.Aarch64, AppleArch.X86_64, }, xcode=True, ),
|
||||
|
||||
@@ -5,7 +5,7 @@ if(NOT DEFINED CMAKE_BUILD_TYPE)
|
||||
endif()
|
||||
|
||||
# See docs/release_checklist.md
|
||||
project(SDL3 LANGUAGES C VERSION "3.3.4")
|
||||
project(SDL3 LANGUAGES C VERSION "3.4.3")
|
||||
|
||||
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||
set(SDL3_MAINPROJECT ON)
|
||||
@@ -46,6 +46,7 @@ endif()
|
||||
|
||||
include(CheckLibraryExists)
|
||||
include(CheckIncludeFile)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckLanguage)
|
||||
include(CheckSymbolExists)
|
||||
include(CheckCSourceCompiles)
|
||||
@@ -367,7 +368,7 @@ dep_option(SDL_RENDER_D3D12 "Enable the Direct3D 12 render driver" ON "SD
|
||||
dep_option(SDL_RENDER_METAL "Enable the Metal render driver" ON "SDL_RENDER;APPLE" OFF)
|
||||
dep_option(SDL_RENDER_GPU "Enable the SDL_GPU render driver" ON "SDL_RENDER;SDL_GPU" OFF)
|
||||
dep_option(SDL_VIVANTE "Use Vivante EGL video driver" ON "${UNIX_SYS};SDL_CPU_ARM32" OFF)
|
||||
dep_option(SDL_VULKAN "Enable Vulkan support" ON "SDL_VIDEO;ANDROID OR APPLE OR LINUX OR FREEBSD OR WINDOWS" OFF)
|
||||
dep_option(SDL_VULKAN "Enable Vulkan support" ON "SDL_VIDEO;ANDROID OR APPLE OR LINUX OR FREEBSD OR OPENBSD OR WINDOWS" OFF)
|
||||
dep_option(SDL_RENDER_VULKAN "Enable the Vulkan render driver" ON "SDL_RENDER;SDL_VULKAN" OFF)
|
||||
dep_option(SDL_METAL "Enable Metal support" ON "APPLE" OFF)
|
||||
set_option(SDL_OPENVR "Use OpenVR video driver" OFF)
|
||||
@@ -378,7 +379,7 @@ dep_option(SDL_DUMMYCAMERA "Support the dummy camera driver" ON SDL_CAME
|
||||
option_string(SDL_BACKGROUNDING_SIGNAL "number to use for magic backgrounding signal or 'OFF'" OFF)
|
||||
option_string(SDL_FOREGROUNDING_SIGNAL "number to use for magic foregrounding signal or 'OFF'" OFF)
|
||||
dep_option(SDL_HIDAPI "Enable the HIDAPI subsystem" ON "NOT VISIONOS" OFF)
|
||||
dep_option(SDL_HIDAPI_LIBUSB "Use libusb for low level joystick drivers" ON SDL_HIDAPI_LIBUSB_AVAILABLE OFF)
|
||||
dep_option(SDL_HIDAPI_LIBUSB "Use libusb for low level joystick drivers" ON "SDL_HIDAPI;SDL_HIDAPI_LIBUSB_AVAILABLE" OFF)
|
||||
dep_option(SDL_HIDAPI_LIBUSB_SHARED "Dynamically load libusb support" ON "SDL_HIDAPI_LIBUSB;SDL_DEPS_SHARED" OFF)
|
||||
dep_option(SDL_HIDAPI_JOYSTICK "Use HIDAPI for low level joystick drivers" ON SDL_HIDAPI OFF)
|
||||
dep_option(SDL_VIRTUAL_JOYSTICK "Enable the virtual-joystick driver" ON SDL_HIDAPI OFF)
|
||||
@@ -393,7 +394,7 @@ cmake_dependent_option(SDL_SHARED "Build a shared version of the library" ${SDL_
|
||||
cmake_dependent_option(SDL_STATIC "Build a static version of the library" ${SDL_STATIC_DEFAULT} ${SDL_STATIC_AVAILABLE} OFF)
|
||||
option(SDL_TEST_LIBRARY "Build the SDL3_test library" ON)
|
||||
|
||||
dep_option(SDL_TESTS "Build the test directory" OFF SDL_TEST_LIBRARY OFF)
|
||||
dep_option(SDL_TESTS "Build the test directory" ${SDL3_MAINPROJECT} SDL_TEST_LIBRARY OFF)
|
||||
dep_option(SDL_INSTALL_TESTS "Install test-cases" OFF "SDL_INSTALL;NOT SDL_FRAMEWORK" OFF)
|
||||
dep_option(SDL_TESTS_LINK_SHARED "link tests to shared SDL library" "${SDL_SHARED}" "SDL_SHARED;SDL_STATIC" "${SDL_SHARED}")
|
||||
set(SDL_TESTS_TIMEOUT_MULTIPLIER "1" CACHE STRING "Timeout multiplier to account for really slow machines")
|
||||
@@ -658,12 +659,7 @@ if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
check_linker_flag(C "-Wl,-undefined,error" LINKER_SUPPORTS_WL_UNDEFINED_ERROR)
|
||||
if(LINKER_SUPPORTS_WL_UNDEFINED_ERROR)
|
||||
sdl_shared_link_options("-Wl,-undefined,error")
|
||||
endif()
|
||||
elseif(NOT OPENBSD)
|
||||
if(NOT OPENBSD)
|
||||
cmake_push_check_state()
|
||||
check_linker_flag(C "-Wl,--no-undefined" LINKER_SUPPORTS_WL_NO_UNDEFINED)
|
||||
#FIXME: originally this if had an additional "AND NOT (USE_CLANG AND WINDOWS)"
|
||||
@@ -1161,6 +1157,8 @@ if(SDL_LIBC)
|
||||
check_symbol_exists(fdatasync "unistd.h" HAVE_FDATASYNC)
|
||||
check_symbol_exists(gethostname "unistd.h" HAVE_GETHOSTNAME)
|
||||
check_symbol_exists(getpagesize "unistd.h" HAVE_GETPAGESIZE)
|
||||
check_symbol_exists(getresgid "unistd.h" HAVE_GETRESGID)
|
||||
check_symbol_exists(getresuid "unistd.h" HAVE_GETRESUID)
|
||||
check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
|
||||
check_symbol_exists(sigtimedwait "signal.h" HAVE_SIGTIMEDWAIT)
|
||||
check_symbol_exists(setjmp "setjmp.h" HAVE_SETJMP)
|
||||
@@ -1292,22 +1290,25 @@ sdl_glob_sources(
|
||||
"${SDL3_SOURCE_DIR}/src/video/yuv2rgb/*.h"
|
||||
)
|
||||
|
||||
# Build uclibc as a static library such that non-used symbols don't end up in the SDL3 shared library.
|
||||
file(GLOB SDL_UCLIBC_SOURCES "${SDL3_SOURCE_DIR}/src/libm/*.c")
|
||||
add_library(SDL_uclibc STATIC "${SDL_UCLIBC_SOURCES}")
|
||||
target_compile_definitions(SDL_uclibc PRIVATE USING_GENERATED_CONFIG_H)
|
||||
target_include_directories(SDL_uclibc PRIVATE "${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>/build_config")
|
||||
target_include_directories(SDL_uclibc PRIVATE "${SDL3_SOURCE_DIR}/src")
|
||||
target_include_directories(SDL_uclibc PRIVATE "${SDL3_SOURCE_DIR}/include")
|
||||
SDL_AddCommonCompilerFlags(SDL_uclibc)
|
||||
target_compile_definitions(SDL_uclibc PRIVATE "$<$<CONFIG:Debug>:DEBUG>")
|
||||
sdl_sources(STATIC "$<TARGET_OBJECTS:SDL_uclibc>")
|
||||
set_property(TARGET SDL_uclibc PROPERTY UNITY_BUILD OFF)
|
||||
if(TARGET SDL3-shared)
|
||||
# Build uclibc as a static library such that non-used symbols don't end up in the SDL3 shared library.
|
||||
add_library(SDL_uclibc STATIC ${SDL_UCLIBC_SOURCES})
|
||||
set_property(TARGET SDL_uclibc PROPERTY POSITION_INDEPENDENT_CODE TRUE)
|
||||
target_compile_definitions(SDL_uclibc PRIVATE USING_GENERATED_CONFIG_H)
|
||||
target_include_directories(SDL_uclibc PRIVATE "${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>/build_config")
|
||||
target_include_directories(SDL_uclibc PRIVATE "${SDL3_SOURCE_DIR}/src")
|
||||
target_include_directories(SDL_uclibc PRIVATE "${SDL3_SOURCE_DIR}/include")
|
||||
SDL_AddCommonCompilerFlags(SDL_uclibc)
|
||||
target_compile_definitions(SDL_uclibc PRIVATE "$<$<CONFIG:Debug>:DEBUG>")
|
||||
set_property(TARGET SDL_uclibc PROPERTY UNITY_BUILD OFF)
|
||||
target_link_libraries(SDL3-shared PRIVATE SDL_uclibc)
|
||||
if(HAVE_GCC_FVISIBILITY)
|
||||
set_property(TARGET SDL_uclibc PROPERTY C_VISIBILITY_PRESET "hidden")
|
||||
endif()
|
||||
endif()
|
||||
if(HAVE_GCC_FVISIBILITY)
|
||||
set_property(TARGET SDL_uclibc PROPERTY C_VISIBILITY_PRESET "hidden")
|
||||
if(TARGET SDL3-static)
|
||||
target_sources(SDL3-static PRIVATE ${SDL_UCLIBC_SOURCES})
|
||||
endif()
|
||||
|
||||
# Enable/disable various subsystems of the SDL library
|
||||
@@ -1764,6 +1765,7 @@ elseif(EMSCRIPTEN)
|
||||
|
||||
elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
|
||||
set(SDL_DISABLE_DLOPEN_NOTES TRUE)
|
||||
if(SDL_DLOPEN_NOTES)
|
||||
set(CHECK_ELF_DLNOTES_SRC [==[
|
||||
#ifndef __ELF__
|
||||
@@ -1776,10 +1778,10 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
return argc + dlnote.hdr.a;
|
||||
}
|
||||
]==])
|
||||
set(SDL_DISABLE_DLOPEN_NOTES FALSE)
|
||||
check_c_source_compiles("${CHECK_ELF_DLNOTES_SRC}" COMPILER_SUPPORTS_ELFNOTES)
|
||||
if(NOT COMPILER_SUPPORTS_ELFNOTES)
|
||||
set(SDL_DISABLE_DLOPEN_NOTES TRUE)
|
||||
if(COMPILER_SUPPORTS_ELFNOTES)
|
||||
set(SDL_DISABLE_DLOPEN_NOTES FALSE)
|
||||
set(HAVE_DLOPEN_NOTES TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -3997,6 +3999,8 @@ if(SDL_SHARED)
|
||||
set_property(TARGET SDL3-shared PROPERTY INTERFACE_SDL3_SHARED TRUE)
|
||||
set_property(TARGET SDL3-shared APPEND PROPERTY COMPATIBLE_INTERFACE_STRING "SDL_VERSION")
|
||||
set_property(TARGET SDL3-shared PROPERTY INTERFACE_SDL_VERSION "SDL${SDL3_VERSION_MAJOR}")
|
||||
set_property(TARGET SDL3-shared APPEND PROPERTY EXPORT_PROPERTIES "SDL_FULL_VERSION")
|
||||
set_property(TARGET SDL3-shared PROPERTY SDL_FULL_VERSION "${PROJECT_VERSION}")
|
||||
if(NOT CMAKE_VERSION VERSION_LESS "3.16")
|
||||
target_precompile_headers(SDL3-shared PRIVATE "$<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:${PROJECT_SOURCE_DIR}/src/SDL_internal.h>")
|
||||
endif()
|
||||
@@ -4021,6 +4025,8 @@ if(SDL_STATIC)
|
||||
set_property(TARGET SDL3-static PROPERTY INTERFACE_SDL3_SHARED FALSE)
|
||||
set_property(TARGET SDL3-static APPEND PROPERTY COMPATIBLE_INTERFACE_STRING "SDL_VERSION")
|
||||
set_property(TARGET SDL3-static PROPERTY INTERFACE_SDL_VERSION "SDL${SDL3_VERSION_MAJOR}")
|
||||
set_property(TARGET SDL3-static APPEND PROPERTY EXPORT_PROPERTIES "SDL_FULL_VERSION")
|
||||
set_property(TARGET SDL3-static PROPERTY SDL_FULL_VERSION "${PROJECT_VERSION}")
|
||||
if(NOT CMAKE_VERSION VERSION_LESS "3.16")
|
||||
target_precompile_headers(SDL3-static PRIVATE "$<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:${PROJECT_SOURCE_DIR}/src/SDL_internal.h>")
|
||||
endif()
|
||||
@@ -4036,7 +4042,7 @@ sdl_compile_definitions(
|
||||
##### Tests #####
|
||||
|
||||
if(SDL_TEST_LIBRARY)
|
||||
file(GLOB TEST_SOURCES "${SDL3_SOURCE_DIR}/src/test/*.c")
|
||||
file(GLOB TEST_SOURCES "${SDL3_SOURCE_DIR}/src/test/*.c" "${SDL3_SOURCE_DIR}/src/test/*.h")
|
||||
target_sources(SDL3_test PRIVATE ${TEST_SOURCES})
|
||||
if(APPLE)
|
||||
set_target_properties(SDL3_test PROPERTIES
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -469,6 +469,7 @@
|
||||
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_report_descriptor.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
@@ -744,6 +745,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_zuiki.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_report_descriptor.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_zuiki.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_report_descriptor.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||
@@ -372,6 +373,7 @@
|
||||
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_report_descriptor.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
|
||||
@@ -195,6 +195,9 @@
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\test\SDL_test_internal.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\test\SDL_test_assert.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_common.c" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -291,9 +291,8 @@ static void DrawSprites(SDL_Renderer * renderer, SDL_Texture * sprite)
|
||||
SDL_RenderPresent(renderer);
|
||||
}
|
||||
|
||||
static void loop()
|
||||
static void update()
|
||||
{
|
||||
int i;
|
||||
SDL_Event event;
|
||||
|
||||
/* Check for events */
|
||||
@@ -310,20 +309,39 @@ static void loop()
|
||||
SDLTest_CommonEvent(state, &event, &done);
|
||||
#endif
|
||||
}
|
||||
fillerup();
|
||||
}
|
||||
|
||||
static void draw()
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < state->num_windows; ++i) {
|
||||
if (state->windows[i] == NULL) {
|
||||
continue;
|
||||
}
|
||||
DrawSprites(state->renderers[i], sprites[i]);
|
||||
}
|
||||
fillerup();
|
||||
}
|
||||
|
||||
static bool SDLCALL GDKEventWatch(void* userdata, SDL_Event* event)
|
||||
{
|
||||
bool *suppressdraw = (bool *)userdata;
|
||||
SDL_assert(suppressdraw != NULL);
|
||||
if (event->type == SDL_EVENT_DID_ENTER_BACKGROUND) {
|
||||
*suppressdraw = true;
|
||||
SDL_GDKSuspendComplete();
|
||||
} else if (event->type == SDL_EVENT_WILL_ENTER_FOREGROUND) {
|
||||
*suppressdraw = false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
const char *icon = "icon.bmp";
|
||||
const char *icon = "icon.png";
|
||||
char *soundname = NULL;
|
||||
bool suppressdraw = false;
|
||||
|
||||
/* Initialize parameters */
|
||||
num_sprites = NUM_SPRITES;
|
||||
@@ -390,6 +408,9 @@ int main(int argc, char *argv[])
|
||||
quit(2);
|
||||
}
|
||||
|
||||
/* By this point the renderers are made, so we can now add this watcher */
|
||||
SDL_AddEventWatch(GDKEventWatch, &suppressdraw);
|
||||
|
||||
/* Create the windows, initialize the renderers, and load the textures */
|
||||
sprites =
|
||||
(SDL_Texture **) SDL_malloc(state->num_windows * sizeof(*sprites));
|
||||
@@ -441,7 +462,10 @@ int main(int argc, char *argv[])
|
||||
AddUserSilent();
|
||||
|
||||
while (!done) {
|
||||
loop();
|
||||
update();
|
||||
if (!suppressdraw) {
|
||||
draw();
|
||||
}
|
||||
}
|
||||
|
||||
quit(0);
|
||||
|
||||
@@ -383,6 +383,7 @@
|
||||
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_report_descriptor.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
@@ -635,6 +636,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_zuiki.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_report_descriptor.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||
|
||||
@@ -675,6 +675,9 @@
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_report_descriptor.h">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h">
|
||||
<Filter>joystick\windows</Filter>
|
||||
</ClInclude>
|
||||
@@ -1305,6 +1308,9 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_report_descriptor.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c">
|
||||
<Filter>joystick\windows</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -161,6 +161,9 @@
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\test\SDL_test_internal.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\test\SDL_test_assert.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_common.c" />
|
||||
|
||||
57
WhatsNew.txt
57
WhatsNew.txt
@@ -7,44 +7,97 @@ This is a list of major changes in SDL's version history.
|
||||
|
||||
General:
|
||||
* Added SDL_CreateAnimatedCursor() to create animated color cursors
|
||||
* Added SDL_HINT_MOUSE_DPI_SCALE_CURSORS to automatically scale cursors based on the display scale
|
||||
* Added SDL_SetWindowProgressState(), SDL_SetWindowProgressValue(), SDL_GetWindowProgressState(), and SDL_GetWindowProgressValue() to show progress in the window's taskbar icon on Windows and Linux
|
||||
* Added SDL_GetGPUDeviceProperties() to get the properties of an SDL GPU device
|
||||
* Added GPU device creation properties to enable the GPU API on older hardware if you're not using these features:
|
||||
- SDL_PROP_GPU_DEVICE_CREATE_FEATURE_CLIP_DISTANCE_BOOLEAN
|
||||
- SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN
|
||||
- SDL_PROP_GPU_DEVICE_CREATE_FEATURE_INDIRECT_DRAW_FIRST_INSTANCE_BOOLEAN
|
||||
- SDL_PROP_GPU_DEVICE_CREATE_FEATURE_ANISOTROPY_BOOLEAN
|
||||
- SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN
|
||||
* Added SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER to enable configuring Vulkan features when creating a GPU device
|
||||
* Added SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN to allow requiring Vulkan hardware acceleration when creating a GPU device
|
||||
* Added SDL_GetGPUDeviceProperties() to query information from a GPU device:
|
||||
- SDL_PROP_GPU_DEVICE_NAME_STRING
|
||||
- SDL_PROP_GPU_DEVICE_DRIVER_NAME_STRING
|
||||
- SDL_PROP_GPU_DEVICE_DRIVER_VERSION_STRING
|
||||
- SDL_PROP_GPU_DEVICE_DRIVER_INFO_STRING
|
||||
* Added SDL_GetPixelFormatFromGPUTextureFormat() and SDL_GetGPUTextureFormatFromPixelFormat()
|
||||
* Added SDL_CreateGPURenderer() and SDL_GetGPURendererDevice() to create a 2D renderer for use with GPU rendering.
|
||||
* Added SDL_CreateGPURenderState(), SDL_SetGPURenderStateFragmentUniforms(), SDL_SetGPURenderState(), and SDL_DestroyGPURenderState() to use fragment shaders with a GPU 2D renderer
|
||||
* Added SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_POINTER to create a 2D texture from an existing GPU texture
|
||||
* Added SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER to get the GPU texture from a 2D texture when using the GPU 2D renderer
|
||||
* Added support for YUV textures and HDR colorspaces to the GPU 2D renderer
|
||||
* Added support for textures with palettes, and SDL_GetTexturePalette() and SDL_SetTexturePalette() to interact with them
|
||||
* Added SDL_RenderTexture9GridTiled() to do tiled instead of stretched 9-grid texture rendering
|
||||
* Added SDL_GetDefaultTextureScaleMode() and SDL_SetDefaultTextureScaleMode() to set the texture scale mode for new textures
|
||||
* Added SDL_GetRenderTextureAddressMode() and SDL_SetRenderTextureAddressMode() to change the texture addressing mode
|
||||
* Added SDL_TEXTURE_ADDRESS_WRAP to allow wrapping of textures if the renderer has SDL_PROP_RENDERER_TEXTURE_WRAPPING_BOOLEAN set
|
||||
* The default YUV colorspace is BT.601 limited range, for compatibility with SDL2
|
||||
* Added SDL_SCALEMODE_PIXELART as an improved scaling algorithm for pixel art without introducing blurring
|
||||
* Added SDL_FLIP_HORIZONTAL_AND_VERTICAL to flip a surface both horizontally and vertically
|
||||
* Added SDL_LoadPNG(), SDL_LoadPNG_IO(), SDL_SavePNG(), and SDL_SavePNG_IO() to load and save PNG images
|
||||
* Added SDL_LoadSurface() and SDL_LoadSurface_IO() to detect BMP and PNG formats and load them as surfaces
|
||||
* Added SDL_PROP_SURFACE_ROTATION_FLOAT to indicate the rotation needed to display camera images upright
|
||||
* Added SDL_RotateSurface() to create a rotated copy of a surface
|
||||
* SDL_EVENT_WINDOW_EXPOSED now sets data1 to true if it is sent during live resizing
|
||||
* Added SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED, which is sent when the usable desktop bounds change
|
||||
* Added SDL_EVENT_SCREEN_KEYBOARD_SHOWN, which is sent when the on-screen keyboard has been shown
|
||||
* Added SDL_EVENT_SCREEN_KEYBOARD_HIDDEN, which is sent when the on-screen keyboard has been hidden
|
||||
* Added pinch gesture events: SDL_EVENT_PINCH_BEGIN, SDL_EVENT_PINCH_UPDATE, SDL_EVENT_PINCH_END
|
||||
* SDL_EVENT_AUDIO_DEVICE_ADDED will be sent during initialization for each audio device
|
||||
* SDL_GetCameraPermissionState() returns SDL_CameraPermissionState instead of int
|
||||
* Added SDL_PutAudioStreamDataNoCopy() to do more efficient audio stream processing in some cases
|
||||
* Added SDL_PutAudioStreamPlanarData() to add planar audio data instead of interleaved data to an audio stream
|
||||
* Added SDL_HINT_AUDIO_DEVICE_RAW_STREAM to signal that the OS shouldn't do further audio processing, useful for applications that handle noise canceling, etc.
|
||||
* Added SDL_PROP_AUDIOSTREAM_AUTO_CLEANUP_BOOLEAN to allow streams that persist beyond the audio subsystem lifetime.
|
||||
* Added enhanced support for 8BitDo controllers
|
||||
* Added enhanced support for FlyDigi controllers
|
||||
* Added enhanced support for Hand Held Legend SInput controllers
|
||||
* Added support for wired Nintendo Switch 2 controllers when built with libusb
|
||||
* Added SDL_hid_get_properties() to associate SDL properties with HID devices
|
||||
* Added SDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER to query the libusb handle from an SDL_hid_device, if it's been opened with libusb
|
||||
* Added SDL_SetRelativeMouseTransform() to add custom mouse input transformation
|
||||
* Added SDL_GetPenDeviceType() to determine whether a pen is on the screen or on a separate touchpad
|
||||
* SDL_HINT_MAIN_CALLBACK_RATE may be set to a floating point callback rate
|
||||
* Added SDL_GetEventDescription() to get an English description of an event, suitable for logging
|
||||
* Added SDL_PROP_IOSTREAM_MEMORY_FREE_FUNC_POINTER to allow custom freeing of the memory used by SDL_IOFromMem() and SDL_IOFromConstMem()
|
||||
* Added SDL_PROP_PROCESS_CREATE_WORKING_DIRECTORY_STRING to set the working directory for new processes
|
||||
* Added verbose log output when the DEBUG_INVOCATION environment variable is set to "1"
|
||||
* Added SDL_AddAtomicU32()
|
||||
* Added SDL_GetSystemPageSize() to get the system page size
|
||||
* Added SDL_ALIGNED() to signal that data should have a specific alignment
|
||||
|
||||
Windows:
|
||||
* Added SDL_HINT_RENDER_DIRECT3D11_WARP to enable D3D11 software rasterization
|
||||
* Using SDL_InsertGPUDebugLabel(), SDL_PushGPUDebugGroup(), and SDL_PopGPUDebugGroup() requires WinPixEventRuntime.dll to be in your PATH or in the same directory as your executable
|
||||
* Added SDL_PROP_DISPLAY_WINDOWS_HMONITOR_POINTER so you can query the HMONITOR associated with a display
|
||||
* SDL_HINT_AUDIO_DEVICE_STREAM_ROLE is used by the WASAPI audio driver to set the audio stream category
|
||||
* Added SDL_HINT_AUDIO_DEVICE_RAW_STREAM to signal whether the OS audio driver should do additional signal processing
|
||||
* Added SDL_HINT_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS to allow disabling some system hotkeys when in raw input mode
|
||||
* SDL_HINT_WINDOWS_GAMEINPUT is disabled by default
|
||||
|
||||
macOS:
|
||||
* Added SDL_HINT_MAC_PRESS_AND_HOLD to control whether holding down a key will repeat the pressed key or open the accents menu
|
||||
|
||||
Linux:
|
||||
* Added atomic support for KMSDRM
|
||||
* Added SDL_HINT_KMSDRM_ATOMIC to control whether KMSDRM will use atomic functionality
|
||||
* Added SDL_PROP_DISPLAY_WAYLAND_WL_OUTPUT_POINTER so you can query the wl_output associated with a display
|
||||
|
||||
Emscripten:
|
||||
* Added SDL_HINT_EMSCRIPTEN_FILL_DOCUMENT for applications that don't want to be fullscreen, but would like to fill the window
|
||||
* Added SDL_WINDOW_FILL_DOCUMENT to indicate that windows expand to fill the whole browser window
|
||||
* Added SDL_SetWindowFillDocument() to change whether windows expand to fill the whole browser window
|
||||
* Added SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_CANVAS_ID_STRING to allow setting the SDL canvas ID, and SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING to query it on existing windows
|
||||
* Added SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING to specify where keyboard input is bound, and SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING to query it on existing windows
|
||||
|
||||
iOS:
|
||||
* SDL now supports window scenes, fixing the warning "CLIENT OF UIKIT REQUIRES UPDATE"
|
||||
* Added SDL_PROP_WINDOW_CREATE_WINDOWSCENE_POINTER to specify the window scene for a window
|
||||
|
||||
visionOS:
|
||||
* The default refresh rate has been increased to 90Hz
|
||||
* SDL_SetWindowSize() changes the size of the window on Vision Pro headsets
|
||||
|
||||
PlayStation 2:
|
||||
* Added the following hints to control the display parameters: SDL_HINT_PS2_GS_WIDTH, SDL_HINT_PS2_GS_HEIGHT, SDL_HINT_PS2_GS_PROGRESSIVE, SDL_HINT_PS2_GS_MODE
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.3.4</string>
|
||||
<string>3.4.3</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>3.3.4</string>
|
||||
<string>3.4.3</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 54;
|
||||
objectVersion = 55;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXAggregateTarget section */
|
||||
@@ -414,8 +414,8 @@
|
||||
F386F6F02884663E001840AA /* SDL_utils_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F386F6E52884663E001840AA /* SDL_utils_c.h */; };
|
||||
F386F6F92884663E001840AA /* SDL_utils.c in Sources */ = {isa = PBXBuildFile; fileRef = F386F6E62884663E001840AA /* SDL_utils.c */; };
|
||||
F388C95528B5F6F700661ECF /* SDL_hidapi_ps3.c in Sources */ = {isa = PBXBuildFile; fileRef = F388C95428B5F6F600661ECF /* SDL_hidapi_ps3.c */; };
|
||||
F39344CE2E99771B0056986F /* SDL_dlopennote.h in Headers */ = {isa = PBXBuildFile; fileRef = F39344CD2E99771B0056986F /* SDL_dlopennote.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F38C72492CEEB1DE000B0A90 /* SDL_hidapi_steam_triton.c in Sources */ = {isa = PBXBuildFile; fileRef = F38C72482CEEB1DE000B0A90 /* SDL_hidapi_steam_triton.c */; };
|
||||
F39344CE2E99771B0056986F /* SDL_dlopennote.h in Headers */ = {isa = PBXBuildFile; fileRef = F39344CD2E99771B0056986F /* SDL_dlopennote.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F395BF6525633B2400942BFF /* SDL_crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = F395BF6425633B2400942BFF /* SDL_crc32.c */; };
|
||||
F395C1932569C68F00942BFF /* SDL_iokitjoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F395C1912569C68E00942BFF /* SDL_iokitjoystick_c.h */; };
|
||||
F395C19C2569C68F00942BFF /* SDL_iokitjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F395C1922569C68E00942BFF /* SDL_iokitjoystick.c */; };
|
||||
@@ -530,6 +530,10 @@
|
||||
F3DDCC5B2AFD42B600B0842B /* SDL_video_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3DDCC522AFD42B600B0842B /* SDL_video_c.h */; };
|
||||
F3DDCC5D2AFD42B600B0842B /* SDL_rect_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = F3DDCC542AFD42B600B0842B /* SDL_rect_impl.h */; };
|
||||
F3E5A6EB2AD5E0E600293D83 /* SDL_properties.c in Sources */ = {isa = PBXBuildFile; fileRef = F3E5A6EA2AD5E0E600293D83 /* SDL_properties.c */; };
|
||||
F3E6C3932EE9F20000A6B39E /* SDL_report_descriptor.c in Sources */ = {isa = PBXBuildFile; fileRef = F3E6C3922EE9F20000A6B39E /* SDL_report_descriptor.c */; };
|
||||
F3E6C3942EE9F20000A6B39E /* SDL_hidapi_flydigi.h in Headers */ = {isa = PBXBuildFile; fileRef = F3E6C38F2EE9F20000A6B39E /* SDL_hidapi_flydigi.h */; };
|
||||
F3E6C3952EE9F20000A6B39E /* SDL_hidapi_sinput.h in Headers */ = {isa = PBXBuildFile; fileRef = F3E6C3902EE9F20000A6B39E /* SDL_hidapi_sinput.h */; };
|
||||
F3E6C3962EE9F20000A6B39E /* SDL_report_descriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = F3E6C3912EE9F20000A6B39E /* SDL_report_descriptor.h */; };
|
||||
F3EFA5ED2D5AB97300BCF22F /* SDL_stb_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3EFA5EA2D5AB97300BCF22F /* SDL_stb_c.h */; };
|
||||
F3EFA5EE2D5AB97300BCF22F /* stb_image.h in Headers */ = {isa = PBXBuildFile; fileRef = F3EFA5EC2D5AB97300BCF22F /* stb_image.h */; };
|
||||
F3EFA5EF2D5AB97300BCF22F /* SDL_surface_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3EFA5EB2D5AB97300BCF22F /* SDL_surface_c.h */; };
|
||||
@@ -998,8 +1002,8 @@
|
||||
F386F6E52884663E001840AA /* SDL_utils_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_utils_c.h; sourceTree = "<group>"; };
|
||||
F386F6E62884663E001840AA /* SDL_utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_utils.c; sourceTree = "<group>"; };
|
||||
F388C95428B5F6F600661ECF /* SDL_hidapi_ps3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_ps3.c; sourceTree = "<group>"; };
|
||||
F39344CD2E99771B0056986F /* SDL_dlopennote.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_dlopennote.h; sourceTree = "<group>"; };
|
||||
F38C72482CEEB1DE000B0A90 /* SDL_hidapi_steam_triton.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_steam_triton.c; sourceTree = "<group>"; };
|
||||
F39344CD2E99771B0056986F /* SDL_dlopennote.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_dlopennote.h; sourceTree = "<group>"; };
|
||||
F395BF6425633B2400942BFF /* SDL_crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_crc32.c; sourceTree = "<group>"; };
|
||||
F395C1912569C68E00942BFF /* SDL_iokitjoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_iokitjoystick_c.h; sourceTree = "<group>"; };
|
||||
F395C1922569C68E00942BFF /* SDL_iokitjoystick.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_iokitjoystick.c; sourceTree = "<group>"; };
|
||||
@@ -1113,6 +1117,10 @@
|
||||
F3DDCC522AFD42B600B0842B /* SDL_video_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_video_c.h; sourceTree = "<group>"; };
|
||||
F3DDCC542AFD42B600B0842B /* SDL_rect_impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_rect_impl.h; sourceTree = "<group>"; };
|
||||
F3E5A6EA2AD5E0E600293D83 /* SDL_properties.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_properties.c; sourceTree = "<group>"; };
|
||||
F3E6C38F2EE9F20000A6B39E /* SDL_hidapi_flydigi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_hidapi_flydigi.h; sourceTree = "<group>"; };
|
||||
F3E6C3902EE9F20000A6B39E /* SDL_hidapi_sinput.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_hidapi_sinput.h; sourceTree = "<group>"; };
|
||||
F3E6C3912EE9F20000A6B39E /* SDL_report_descriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_report_descriptor.h; sourceTree = "<group>"; };
|
||||
F3E6C3922EE9F20000A6B39E /* SDL_report_descriptor.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SDL_report_descriptor.c; sourceTree = "<group>"; };
|
||||
F3EFA5E92D5AB97300BCF22F /* SDL_stb.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SDL_stb.c; sourceTree = "<group>"; };
|
||||
F3EFA5EA2D5AB97300BCF22F /* SDL_stb_c.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_stb_c.h; sourceTree = "<group>"; };
|
||||
F3EFA5EB2D5AB97300BCF22F /* SDL_surface_c.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_surface_c.h; sourceTree = "<group>"; };
|
||||
@@ -1948,6 +1956,7 @@
|
||||
children = (
|
||||
F3395BA72D9A5971007246C8 /* SDL_hidapi_8bitdo.c */,
|
||||
F32305FE28939F6400E66D30 /* SDL_hidapi_combined.c */,
|
||||
F3E6C38F2EE9F20000A6B39E /* SDL_hidapi_flydigi.h */,
|
||||
F3395BA72D9A5971007246C9 /* SDL_hidapi_flydigi.c */,
|
||||
A7D8A7C923E2513E00DCD162 /* SDL_hidapi_gamecube.c */,
|
||||
F3B6B8092DC3EA54004954FD /* SDL_hidapi_gip.c */,
|
||||
@@ -1960,6 +1969,7 @@
|
||||
A75FDBC323EA380300529352 /* SDL_hidapi_rumble.h */,
|
||||
A75FDBC423EA380300529352 /* SDL_hidapi_rumble.c */,
|
||||
9846B07B287A9020000C35C8 /* SDL_hidapi_shield.c */,
|
||||
F3E6C3902EE9F20000A6B39E /* SDL_hidapi_sinput.h */,
|
||||
02D6A1C128A84B8F00A7F001 /* SDL_hidapi_sinput.c */,
|
||||
F3984CCF25BCC92800374F43 /* SDL_hidapi_stadia.c */,
|
||||
A75FDAAC23E2795C00529352 /* SDL_hidapi_steam.c */,
|
||||
@@ -1975,6 +1985,8 @@
|
||||
63124A412E5C357500A53610 /* SDL_hidapi_zuiki.c */,
|
||||
A7D8A7C423E2513E00DCD162 /* SDL_hidapijoystick.c */,
|
||||
A7D8A7C723E2513E00DCD162 /* SDL_hidapijoystick_c.h */,
|
||||
F3E6C3912EE9F20000A6B39E /* SDL_report_descriptor.h */,
|
||||
F3E6C3922EE9F20000A6B39E /* SDL_report_descriptor.c */,
|
||||
);
|
||||
path = hidapi;
|
||||
sourceTree = "<group>";
|
||||
@@ -2554,6 +2566,9 @@
|
||||
F3D46ADB2D20625800D9CBDF /* SDL_pen.h in Headers */,
|
||||
F3D46ADC2D20625800D9CBDF /* SDL_render.h in Headers */,
|
||||
F3D46ADD2D20625800D9CBDF /* SDL_assert.h in Headers */,
|
||||
F3E6C3942EE9F20000A6B39E /* SDL_hidapi_flydigi.h in Headers */,
|
||||
F3E6C3952EE9F20000A6B39E /* SDL_hidapi_sinput.h in Headers */,
|
||||
F3E6C3962EE9F20000A6B39E /* SDL_report_descriptor.h in Headers */,
|
||||
F3D46ADE2D20625800D9CBDF /* SDL_atomic.h in Headers */,
|
||||
F3D46ADF2D20625800D9CBDF /* SDL_begin_code.h in Headers */,
|
||||
F3D46AE02D20625800D9CBDF /* SDL_log.h in Headers */,
|
||||
@@ -2923,6 +2938,7 @@
|
||||
F3C1BD752D1F1A3000846529 /* SDL_tray_utils.c in Sources */,
|
||||
F382071D284F362F004DD584 /* SDL_guid.c in Sources */,
|
||||
A7D8BB8D23E2514500DCD162 /* SDL_touch.c in Sources */,
|
||||
F3E6C3932EE9F20000A6B39E /* SDL_report_descriptor.c in Sources */,
|
||||
F31A92D228D4CB39003BFD6A /* SDL_offscreenopengles.c in Sources */,
|
||||
A1626A3E2617006A003F1973 /* SDL_triangle.c in Sources */,
|
||||
A7D8B3F223E2514300DCD162 /* SDL_thread.c in Sources */,
|
||||
@@ -3145,8 +3161,8 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
DEPLOYMENT_POSTPROCESSING = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 305.0.0;
|
||||
DYLIB_CURRENT_VERSION = 305.0.0;
|
||||
DYLIB_COMPATIBILITY_VERSION = 401.0.0;
|
||||
DYLIB_CURRENT_VERSION = 401.3.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_ALTIVEC_EXTENSIONS = YES;
|
||||
@@ -3181,7 +3197,7 @@
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||
MARKETING_VERSION = 3.3.4;
|
||||
MARKETING_VERSION = 3.4.3;
|
||||
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
|
||||
PRODUCT_NAME = SDL3;
|
||||
@@ -3211,8 +3227,8 @@
|
||||
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 305.0.0;
|
||||
DYLIB_CURRENT_VERSION = 305.0.0;
|
||||
DYLIB_COMPATIBILITY_VERSION = 401.0.0;
|
||||
DYLIB_CURRENT_VERSION = 401.3.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
@@ -3244,7 +3260,7 @@
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||
MARKETING_VERSION = 3.3.4;
|
||||
MARKETING_VERSION = 3.4.3;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Title SDL 3.3.4
|
||||
Title SDL 3.4.3
|
||||
Version 1
|
||||
Description SDL Library for macOS (http://www.libsdl.org)
|
||||
DefaultLocation /Library/Frameworks
|
||||
|
||||
1
android-project/app/proguard-rules.pro
vendored
1
android-project/app/proguard-rules.pro
vendored
@@ -69,6 +69,7 @@
|
||||
|
||||
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLControllerManager {
|
||||
void pollInputDevices();
|
||||
void joystickSetLED(int, int, int, int);
|
||||
void pollHapticDevices();
|
||||
void hapticRun(int, float, int);
|
||||
void hapticRumble(int, float, float, int);
|
||||
|
||||
@@ -256,6 +256,7 @@ public class HIDDeviceManager {
|
||||
0x24c6, // PowerA
|
||||
0x2c22, // Qanba
|
||||
0x2dc8, // 8BitDo
|
||||
0x37d7, // Flydigi
|
||||
0x9886, // ASTRO Gaming
|
||||
};
|
||||
|
||||
|
||||
@@ -60,8 +60,8 @@ import java.util.Locale;
|
||||
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
|
||||
private static final String TAG = "SDL";
|
||||
private static final int SDL_MAJOR_VERSION = 3;
|
||||
private static final int SDL_MINOR_VERSION = 3;
|
||||
private static final int SDL_MICRO_VERSION = 4;
|
||||
private static final int SDL_MINOR_VERSION = 4;
|
||||
private static final int SDL_MICRO_VERSION = 3;
|
||||
/*
|
||||
// Display InputType.SOURCE/CLASS of events and devices
|
||||
//
|
||||
@@ -1270,10 +1270,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
if (Build.MANUFACTURER.equals("MINIX") && Build.MODEL.equals("NEO-U1")) {
|
||||
return true;
|
||||
}
|
||||
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.equals("X96-W")) {
|
||||
return true;
|
||||
}
|
||||
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.startsWith("TV")) {
|
||||
if (Build.MANUFACTURER.equals("Amlogic") &&
|
||||
(Build.MODEL.startsWith("TV") ||
|
||||
Build.MODEL.equals("X96-W") ||
|
||||
Build.MODEL.equals("A95X-R1"))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -6,6 +6,11 @@ import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.hardware.lights.Light;
|
||||
import android.hardware.lights.LightsRequest;
|
||||
import android.hardware.lights.LightsManager;
|
||||
import android.hardware.lights.LightState;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.VibrationEffect;
|
||||
import android.os.Vibrator;
|
||||
@@ -25,7 +30,7 @@ public class SDLControllerManager
|
||||
static native void nativeAddJoystick(int device_id, String name, String desc,
|
||||
int vendor_id, int product_id,
|
||||
int button_mask,
|
||||
int naxes, int axis_mask, int nhats, boolean can_rumble);
|
||||
int naxes, int axis_mask, int nhats, boolean can_rumble, boolean has_rgb_led);
|
||||
static native void nativeRemoveJoystick(int device_id);
|
||||
static native void nativeAddHaptic(int device_id, String name);
|
||||
static native void nativeRemoveHaptic(int device_id);
|
||||
@@ -69,6 +74,13 @@ public class SDLControllerManager
|
||||
mJoystickHandler.pollInputDevices();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
static void joystickSetLED(int device_id, int red, int green, int blue) {
|
||||
mJoystickHandler.setLED(device_id, red, green, blue);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
@@ -139,6 +151,8 @@ class SDLJoystickHandler {
|
||||
String desc;
|
||||
ArrayList<InputDevice.MotionRange> axes;
|
||||
ArrayList<InputDevice.MotionRange> hats;
|
||||
ArrayList<Light> lights;
|
||||
LightsManager.LightsSession lightsSession;
|
||||
}
|
||||
static class RangeComparator implements Comparator<InputDevice.MotionRange> {
|
||||
@Override
|
||||
@@ -197,7 +211,7 @@ class SDLJoystickHandler {
|
||||
/**
|
||||
* Handles adding and removing of input devices.
|
||||
*/
|
||||
void pollInputDevices() {
|
||||
synchronized void pollInputDevices() {
|
||||
int[] deviceIds = InputDevice.getDeviceIds();
|
||||
|
||||
for (int device_id : deviceIds) {
|
||||
@@ -211,6 +225,7 @@ class SDLJoystickHandler {
|
||||
joystick.desc = getJoystickDescriptor(joystickDevice);
|
||||
joystick.axes = new ArrayList<InputDevice.MotionRange>();
|
||||
joystick.hats = new ArrayList<InputDevice.MotionRange>();
|
||||
joystick.lights = new ArrayList<Light>();
|
||||
|
||||
List<InputDevice.MotionRange> ranges = joystickDevice.getMotionRanges();
|
||||
Collections.sort(ranges, new RangeComparator());
|
||||
@@ -225,18 +240,30 @@ class SDLJoystickHandler {
|
||||
}
|
||||
|
||||
boolean can_rumble = false;
|
||||
boolean has_rgb_led = false;
|
||||
if (Build.VERSION.SDK_INT >= 31 /* Android 12.0 (S) */) {
|
||||
VibratorManager manager = joystickDevice.getVibratorManager();
|
||||
int[] vibrators = manager.getVibratorIds();
|
||||
VibratorManager vibratorManager = joystickDevice.getVibratorManager();
|
||||
int[] vibrators = vibratorManager.getVibratorIds();
|
||||
if (vibrators.length > 0) {
|
||||
can_rumble = true;
|
||||
}
|
||||
LightsManager lightsManager = joystickDevice.getLightsManager();
|
||||
List<Light> lights = lightsManager.getLights();
|
||||
for (Light light : lights) {
|
||||
if (light.hasRgbControl()) {
|
||||
joystick.lights.add(light);
|
||||
}
|
||||
}
|
||||
if (!joystick.lights.isEmpty()) {
|
||||
joystick.lightsSession = lightsManager.openSession();
|
||||
has_rgb_led = true;
|
||||
}
|
||||
}
|
||||
|
||||
mJoysticks.add(joystick);
|
||||
SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc,
|
||||
getVendorId(joystickDevice), getProductId(joystickDevice),
|
||||
getButtonMask(joystickDevice), joystick.axes.size(), getAxisMask(joystick.axes), joystick.hats.size()/2, can_rumble);
|
||||
getButtonMask(joystickDevice), joystick.axes.size(), getAxisMask(joystick.axes), joystick.hats.size()/2, can_rumble, has_rgb_led);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -262,6 +289,16 @@ class SDLJoystickHandler {
|
||||
SDLControllerManager.nativeRemoveJoystick(device_id);
|
||||
for (int i = 0; i < mJoysticks.size(); i++) {
|
||||
if (mJoysticks.get(i).device_id == device_id) {
|
||||
if (Build.VERSION.SDK_INT >= 31 /* Android 12.0 (S) */) {
|
||||
if (mJoysticks.get(i).lightsSession != null) {
|
||||
try {
|
||||
mJoysticks.get(i).lightsSession.close();
|
||||
} catch (Exception e) {
|
||||
// Session may already be unregistered when device disconnects
|
||||
}
|
||||
mJoysticks.get(i).lightsSession = null;
|
||||
}
|
||||
}
|
||||
mJoysticks.remove(i);
|
||||
break;
|
||||
}
|
||||
@@ -270,7 +307,7 @@ class SDLJoystickHandler {
|
||||
}
|
||||
}
|
||||
|
||||
protected SDLJoystick getJoystick(int device_id) {
|
||||
synchronized protected SDLJoystick getJoystick(int device_id) {
|
||||
for (SDLJoystick joystick : mJoysticks) {
|
||||
if (joystick.device_id == device_id) {
|
||||
return joystick;
|
||||
@@ -453,6 +490,24 @@ class SDLJoystickHandler {
|
||||
}
|
||||
return button_mask;
|
||||
}
|
||||
|
||||
void setLED(int device_id, int red, int green, int blue) {
|
||||
if (Build.VERSION.SDK_INT < 31 /* Android 12.0 (S) */) {
|
||||
return;
|
||||
}
|
||||
SDLJoystick joystick = getJoystick(device_id);
|
||||
if (joystick == null || joystick.lights.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
LightsRequest.Builder lightsRequest = new LightsRequest.Builder();
|
||||
LightState lightState = new LightState.Builder().setColor(Color.rgb(red, green, blue)).build();
|
||||
for (Light light : joystick.lights) {
|
||||
if (light.hasRgbControl()) {
|
||||
lightsRequest.addLight(light, lightState);
|
||||
}
|
||||
}
|
||||
joystick.lightsSession.requestLights(lightsRequest.build());
|
||||
}
|
||||
}
|
||||
|
||||
class SDLHapticHandler_API31 extends SDLHapticHandler {
|
||||
@@ -587,7 +642,7 @@ class SDLHapticHandler {
|
||||
}
|
||||
}
|
||||
|
||||
void pollHapticDevices() {
|
||||
synchronized void pollHapticDevices() {
|
||||
|
||||
final int deviceId_VIBRATOR_SERVICE = 999999;
|
||||
boolean hasVibratorService = false;
|
||||
@@ -635,7 +690,7 @@ class SDLHapticHandler {
|
||||
}
|
||||
}
|
||||
|
||||
protected SDLHaptic getHaptic(int device_id) {
|
||||
synchronized protected SDLHaptic getHaptic(int device_id) {
|
||||
for (SDLHaptic haptic : mHaptics) {
|
||||
if (haptic.device_id == device_id) {
|
||||
return haptic;
|
||||
@@ -700,6 +755,9 @@ class SDLGenericMotionListener_API14 implements View.OnGenericMotionListener {
|
||||
|
||||
// BUTTON_STYLUS_PRIMARY is 2^5, so shift by 4, and apply SDL_PEN_INPUT_DOWN/SDL_PEN_INPUT_ERASER_TIP
|
||||
int buttons = (event.getButtonState() >> 4) | (1 << (toolType == MotionEvent.TOOL_TYPE_STYLUS ? 0 : 30));
|
||||
if ((event.getButtonState() & MotionEvent.BUTTON_TERTIARY) != 0) {
|
||||
buttons |= 0x08;
|
||||
}
|
||||
|
||||
SDLActivity.onNativePen(event.getPointerId(i), getPenDeviceType(event.getDevice()), buttons, action, x, y, p);
|
||||
consumed = true;
|
||||
|
||||
@@ -65,17 +65,15 @@ class SDLInputConnection extends BaseInputConnection
|
||||
|
||||
@Override
|
||||
public boolean deleteSurroundingText(int beforeLength, int afterLength) {
|
||||
if (Build.VERSION.SDK_INT <= 29 /* Android 10.0 (Q) */) {
|
||||
// Workaround to capture backspace key. Ref: http://stackoverflow.com/questions>/14560344/android-backspace-in-webview-baseinputconnection
|
||||
// and https://bugzilla.libsdl.org/show_bug.cgi?id=2265
|
||||
if (beforeLength > 0 && afterLength == 0) {
|
||||
// backspace(s)
|
||||
while (beforeLength-- > 0) {
|
||||
nativeGenerateScancodeForUnichar('\b');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// Workaround to capture backspace key. Ref: http://stackoverflow.com/questions>/14560344/android-backspace-in-webview-baseinputconnection
|
||||
// and https://bugzilla.libsdl.org/show_bug.cgi?id=2265
|
||||
if (beforeLength > 0 && afterLength == 0) {
|
||||
// backspace(s)
|
||||
while (beforeLength-- > 0) {
|
||||
nativeGenerateScancodeForUnichar('\b');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!super.deleteSurroundingText(beforeLength, afterLength)) {
|
||||
return false;
|
||||
|
||||
@@ -280,6 +280,9 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
|
||||
// BUTTON_STYLUS_PRIMARY is 2^5, so shift by 4, and apply SDL_PEN_INPUT_DOWN/SDL_PEN_INPUT_ERASER_TIP
|
||||
int buttonState = (event.getButtonState() >> 4) | (1 << (toolType == MotionEvent.TOOL_TYPE_STYLUS ? 0 : 30));
|
||||
if ((event.getButtonState() & MotionEvent.BUTTON_TERTIARY) != 0) {
|
||||
buttonState |= 0x08;
|
||||
}
|
||||
|
||||
SDLActivity.onNativePen(pointerId, SDLActivity.getMotionListener().getPenDeviceType(event.getDevice()), buttonState, action, x, y, p);
|
||||
} else { // MotionEvent.TOOL_TYPE_FINGER or MotionEvent.TOOL_TYPE_UNKNOWN
|
||||
|
||||
@@ -267,8 +267,12 @@ class Archiver:
|
||||
|
||||
def close(self):
|
||||
# Archiver is intentionally made invalid after this function
|
||||
for zf in self._zip_files:
|
||||
zf.close()
|
||||
del self._zip_files
|
||||
self._zip_files = None
|
||||
for tf in self._tar_files:
|
||||
tf.close()
|
||||
del self._tar_files
|
||||
self._tar_files = None
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Simple DirectMedia Layer
|
||||
# Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
# Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
#
|
||||
# This software is provided 'as-is', without any express or implied
|
||||
# warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Simple DirectMedia Layer
|
||||
# Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
# Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
#
|
||||
# This software is provided 'as-is', without any express or implied
|
||||
# warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -406,7 +406,7 @@ int main(void)
|
||||
printf(
|
||||
"/*\n"
|
||||
" Simple DirectMedia Layer\n"
|
||||
" Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
" Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
"\n"
|
||||
" This software is provided 'as-is', without any express or implied\n"
|
||||
" warranty. In no event will the authors be held liable for any damages\n"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Simple DirectMedia Layer
|
||||
# Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
# Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
#
|
||||
# This software is provided 'as-is', without any express or implied
|
||||
# warranty. In no event will the authors be held liable for any damages
|
||||
@@ -36,7 +36,7 @@ my $mem_used = 0;
|
||||
print <<__EOF__;
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken\@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken\@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
|
||||
scriptversion=2020-07-26.22; # UTC
|
||||
|
||||
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain.
|
||||
#
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
errstatus=0
|
||||
dirmode=
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
|
||||
|
||||
Create each directory DIR (with mode MODE, if specified), including all
|
||||
leading file name components.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage"
|
||||
exit $?
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--version)
|
||||
echo "$0 $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*) # unknown option
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*) # first non-opt arg
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
|
||||
# mkdir -p a/c at the same time, both will detect that a is missing,
|
||||
# one will create a, then the other will try to create a and die with
|
||||
# a "File exists" error. This is a problem when calling mkinstalldirs
|
||||
# from a parallel make. We use --version in the probe to restrict
|
||||
# ourselves to GNU mkdir, which is thread-safe.
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
else
|
||||
# On NextStep and OpenStep, the 'mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because '.' already
|
||||
# exists.
|
||||
test -d ./-p && rmdir ./-p
|
||||
test -d ./--version && rmdir ./--version
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
|
||||
test ! -d ./--version; then
|
||||
echo "umask 22"
|
||||
umask 22
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
else
|
||||
# Clean up after NextStep and OpenStep mkdir.
|
||||
for d in ./-m ./-p ./--version "./$dirmode";
|
||||
do
|
||||
test -d $d && rmdir $d
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "umask 22"
|
||||
umask 22
|
||||
|
||||
for file
|
||||
do
|
||||
case $file in
|
||||
/*) pathcomp=/ ;;
|
||||
*) pathcomp= ;;
|
||||
esac
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set fnord $file
|
||||
shift
|
||||
IFS=$oIFS
|
||||
|
||||
for d
|
||||
do
|
||||
test "x$d" = x && continue
|
||||
|
||||
pathcomp=$pathcomp$d
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $file"
|
||||
chmod "$dirmode" "$file" || errstatus=$?
|
||||
fi
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Simple DirectMedia Layer
|
||||
# Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
# Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
#
|
||||
# This software is provided 'as-is', without any express or implied
|
||||
# warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -164,6 +164,22 @@ function(get_git_head_revision _refspecvar _hashvar)
|
||||
"${GIT_DATA}/grabRef.cmake" @ONLY)
|
||||
include("${GIT_DATA}/grabRef.cmake")
|
||||
|
||||
# Fallback for reftable or other storage formats
|
||||
if(NOT HEAD_HASH OR HEAD_HASH STREQUAL "")
|
||||
find_package(Git QUIET)
|
||||
if(GIT_FOUND)
|
||||
execute_process(
|
||||
COMMAND "${GIT_EXECUTABLE}" rev-parse HEAD
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
RESULT_VARIABLE res
|
||||
OUTPUT_VARIABLE HEAD_HASH
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT res EQUAL 0)
|
||||
set(HEAD_HASH "")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(${_refspecvar}
|
||||
"${HEAD_REF}"
|
||||
PARENT_SCOPE)
|
||||
|
||||
@@ -25,19 +25,21 @@ if(HEAD_CONTENTS MATCHES "ref")
|
||||
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
|
||||
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
|
||||
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
||||
else()
|
||||
elseif(EXISTS "@GIT_DIR@/packed-refs")
|
||||
configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY)
|
||||
file(READ "@GIT_DATA@/packed-refs" PACKED_REFS)
|
||||
if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}")
|
||||
set(HEAD_HASH "${CMAKE_MATCH_1}")
|
||||
endif()
|
||||
elseif(EXISTS "@GIT_DIR@/reftable/tables.list")
|
||||
configure_file("@GIT_DIR@/reftable/tables.list" "@GIT_DATA@/reftable-tables.list" COPYONLY)
|
||||
endif()
|
||||
else()
|
||||
# detached HEAD
|
||||
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
|
||||
endif()
|
||||
|
||||
if(NOT HEAD_HASH)
|
||||
if(NOT HEAD_HASH AND EXISTS "@GIT_DATA@/head-ref")
|
||||
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
|
||||
string(STRIP "${HEAD_HASH}" HEAD_HASH)
|
||||
endif()
|
||||
|
||||
@@ -402,7 +402,7 @@ macro(CheckX11)
|
||||
endif()
|
||||
set(SDL_VIDEO_DRIVER_X11_XCURSOR 1)
|
||||
else()
|
||||
SDL_missing_dependency(XCURSOR, SDL_X11_XCURSOR)
|
||||
SDL_missing_dependency(XCURSOR SDL_X11_XCURSOR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -411,7 +411,7 @@ macro(CheckX11)
|
||||
set(HAVE_X11_XDBE TRUE)
|
||||
set(SDL_VIDEO_DRIVER_X11_XDBE 1)
|
||||
else()
|
||||
SDL_missing_dependency(XDBE, SDL_X11_XDBE)
|
||||
SDL_missing_dependency(XDBE SDL_X11_XDBE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -457,7 +457,7 @@ macro(CheckX11)
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/XInput2.h>
|
||||
int event_type = XI_GesturePinchBegin;
|
||||
XITouchClassInfo *t;
|
||||
XIGesturePinchEvent *t;
|
||||
Status XIAllowTouchEvents(Display *a,int b,unsigned int c,Window d,int f) {
|
||||
return (Status)0;
|
||||
}
|
||||
@@ -467,7 +467,7 @@ macro(CheckX11)
|
||||
endif()
|
||||
|
||||
else()
|
||||
SDL_missing_dependency(XINPUT, SDL_X11_XINPUT)
|
||||
SDL_missing_dependency(XINPUT SDL_X11_XINPUT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -491,7 +491,7 @@ macro(CheckX11)
|
||||
set(SDL_VIDEO_DRIVER_X11_XFIXES 1)
|
||||
set(HAVE_X11_XFIXES TRUE)
|
||||
else()
|
||||
SDL_missing_dependency(XFIXES, SDL_X11_XFIXES)
|
||||
SDL_missing_dependency(XFIXES SDL_X11_XFIXES)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -500,7 +500,7 @@ macro(CheckX11)
|
||||
set(SDL_VIDEO_DRIVER_X11_XSYNC 1)
|
||||
set(HAVE_X11_XSYNC TRUE)
|
||||
else()
|
||||
SDL_missing_dependency(XSYNC, SDL_X11_XSYNC)
|
||||
SDL_missing_dependency(XSYNC SDL_X11_XSYNC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -514,7 +514,7 @@ macro(CheckX11)
|
||||
set(SDL_VIDEO_DRIVER_X11_XRANDR 1)
|
||||
set(HAVE_X11_XRANDR TRUE)
|
||||
else()
|
||||
SDL_missing_dependency(XRANDR, SDL_X11_XRANDR)
|
||||
SDL_missing_dependency(XRANDR SDL_X11_XRANDR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -528,7 +528,7 @@ macro(CheckX11)
|
||||
set(SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1)
|
||||
set(HAVE_X11_XSCRNSAVER TRUE)
|
||||
else()
|
||||
SDL_missing_dependency(XSCRNSAVER, SDL_X11_XSCRNSAVER)
|
||||
SDL_missing_dependency(XSCRNSAVER SDL_X11_XSCRNSAVER)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -537,7 +537,7 @@ macro(CheckX11)
|
||||
set(SDL_VIDEO_DRIVER_X11_XSHAPE 1)
|
||||
set(HAVE_X11_XSHAPE TRUE)
|
||||
else()
|
||||
SDL_missing_dependency(XSHAPE, SDL_X11_XSHAPE)
|
||||
SDL_missing_dependency(XSHAPE SDL_X11_XSHAPE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1113,22 +1113,22 @@ macro(CheckUSBHID)
|
||||
cmake_push_check_state()
|
||||
check_library_exists(usbhid hid_init "" LIBUSBHID)
|
||||
if(LIBUSBHID)
|
||||
check_include_file(usbhid.h HAVE_USBHID_H)
|
||||
check_include_files("stdint.h;usbhid.h" HAVE_USBHID_H)
|
||||
if(HAVE_USBHID_H)
|
||||
set(USB_CFLAGS "-DHAVE_USBHID_H")
|
||||
endif()
|
||||
|
||||
check_include_file(libusbhid.h HAVE_LIBUSBHID_H)
|
||||
check_include_files("stdint.h;libusbhid.h" HAVE_LIBUSBHID_H)
|
||||
if(HAVE_LIBUSBHID_H)
|
||||
string(APPEND USB_CFLAGS " -DHAVE_LIBUSBHID_H")
|
||||
endif()
|
||||
set(USB_LIBS ${USB_LIBS} usbhid)
|
||||
else()
|
||||
check_include_file(usb.h HAVE_USB_H)
|
||||
check_include_files("stdint.h;usb.h" HAVE_USB_H)
|
||||
if(HAVE_USB_H)
|
||||
set(USB_CFLAGS "-DHAVE_USB_H")
|
||||
endif()
|
||||
check_include_file(libusb.h HAVE_LIBUSB_H)
|
||||
check_include_files("stdint.h;libusb.h" HAVE_LIBUSB_H)
|
||||
if(HAVE_LIBUSB_H)
|
||||
string(APPEND USB_CFLAGS " -DHAVE_LIBUSB_H")
|
||||
endif()
|
||||
@@ -1141,7 +1141,7 @@ macro(CheckUSBHID)
|
||||
string(APPEND CMAKE_REQUIRED_FLAGS " ${USB_CFLAGS}")
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${USB_LIBS})
|
||||
check_c_source_compiles("
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#if defined(HAVE_USB_H)
|
||||
#include <usb.h>
|
||||
#endif
|
||||
@@ -1167,7 +1167,7 @@ macro(CheckUSBHID)
|
||||
}" HAVE_USBHID)
|
||||
if(HAVE_USBHID)
|
||||
check_c_source_compiles("
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#if defined(HAVE_USB_H)
|
||||
#include <usb.h>
|
||||
#endif
|
||||
@@ -1195,7 +1195,7 @@ macro(CheckUSBHID)
|
||||
endif()
|
||||
|
||||
check_c_source_compiles("
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#if defined(HAVE_USB_H)
|
||||
#include <usb.h>
|
||||
#endif
|
||||
@@ -1270,12 +1270,15 @@ macro(CheckHIDAPI)
|
||||
cmake_pop_check_state()
|
||||
if(HAVE_LIBUSB_H)
|
||||
set(HAVE_LIBUSB TRUE)
|
||||
target_get_dynamic_library(dynamic_libusb LibUSB::LibUSB)
|
||||
if(SDL_HIDAPI_LIBUSB_SHARED AND dynamic_libusb)
|
||||
set(HAVE_HIDAPI_LIBUSB_SHARED ON)
|
||||
set(SDL_LIBUSB_DYNAMIC "\"${dynamic_libusb}\"")
|
||||
sdl_link_dependency(hidapi INCLUDES $<TARGET_PROPERTY:LibUSB::LibUSB,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
else()
|
||||
if(SDL_HIDAPI_LIBUSB_SHARED)
|
||||
target_get_dynamic_library(dynamic_libusb LibUSB::LibUSB)
|
||||
if(dynamic_libusb)
|
||||
set(HAVE_HIDAPI_LIBUSB_SHARED ON)
|
||||
set(SDL_LIBUSB_DYNAMIC "\"${dynamic_libusb}\"")
|
||||
sdl_link_dependency(hidapi INCLUDES $<TARGET_PROPERTY:LibUSB::LibUSB,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
endif()
|
||||
endif()
|
||||
if(NOT HAVE_HIDAPI_LIBUSB_SHARED)
|
||||
sdl_link_dependency(hidapi LIBS LibUSB::LibUSB PKG_CONFIG_SPECS "${LibUSB_PKG_CONFIG_SPEC}" CMAKE_MODULE LibUSB)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -30,12 +30,12 @@ SDL_LDFLAGS="$( pkg-config sdl3 --libs )"
|
||||
SDL_STATIC_LDFLAGS="$( pkg-config sdl3 --libs --static )"
|
||||
|
||||
compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_pkgconfig.c.o $SDL_CFLAGS $CFLAGS"
|
||||
link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig${EXESUFFIX} $SDL_LDFLAGS $LDFLAGS"
|
||||
static_link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig_static${EXESUFFIX} $SDL_STATIC_LDFLAGS $LDFLAGS"
|
||||
link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig${EXESUFFIX} $SDL_CFLAGS $CFLAGS $SDL_LDFLAGS $LDFLAGS"
|
||||
static_link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig_static${EXESUFFIX} $SDL_CFLAGS $CFLAGS $SDL_STATIC_LDFLAGS $LDFLAGS"
|
||||
|
||||
echo "-- CC: $CC"
|
||||
echo "-- CFLAGS: $CFLAGS"
|
||||
echo "-- LDFLASG: $LDFLAGS"
|
||||
echo "-- LDFLAGS: $LDFLAGS"
|
||||
echo "-- SDL_CFLAGS: $SDL_CFLAGS"
|
||||
echo "-- SDL_LDFLAGS: $SDL_LDFLAGS"
|
||||
echo "-- SDL_STATIC_LDFLAGS: $SDL_STATIC_LDFLAGS"
|
||||
|
||||
@@ -168,7 +168,7 @@ build-scripts/create-android-project.py --variant aar com.yourcompany.yourapp <
|
||||
Customizing your application name
|
||||
================================================================================
|
||||
|
||||
To customize your application name, edit AndroidManifest.xml and build.gradle to replace
|
||||
To customize your application name, edit build.gradle to replace
|
||||
"org.libsdl.app" with an identifier for your product package.
|
||||
|
||||
Then create a Java class extending SDLActivity and place it in a directory
|
||||
@@ -194,6 +194,8 @@ Here's an example of a minimal class file:
|
||||
Then replace "SDLActivity" in AndroidManifest.xml with the name of your
|
||||
class, .e.g. "MyGame"
|
||||
|
||||
Then edit app/src/main/res/values/strings.xml and change the name there.
|
||||
|
||||
|
||||
Customizing your application icon
|
||||
================================================================================
|
||||
|
||||
@@ -4,3 +4,4 @@ SDL is fully supported on BSD platforms, and is built using [CMake](README-cmake
|
||||
|
||||
If you want to run on the console, you can take a look at [KMSDRM support on BSD](README-kmsbsd.md)
|
||||
|
||||
SDL is [not designed to be used in setuid or setgid executables](README-platforms.md#setuid).
|
||||
|
||||
@@ -210,12 +210,15 @@ Calling SDL_RenderPresent (or SDL_GL_SwapWindow) will not actually
|
||||
present anything on the screen until your return from your mainloop
|
||||
function.
|
||||
|
||||
Note that on other platforms, SDL will default to vsync _off_ in the 2D render
|
||||
API. Since changing this will affect how the mainloop runs, the 2D render API
|
||||
will only change vsync settings if explicitly requested by the app, either
|
||||
with SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER, or calling
|
||||
SDL_SetRenderVSync(). Otherwise it will default to whatever the Emscripten
|
||||
mainloop is set to use via emscripten_set_main_loop().
|
||||
Note that SDL attempts to default to vsync _off_ on all platforms. You almost
|
||||
certainly do _not_ want this in Emscripten, however, as it will affect the
|
||||
efficiency of the mainloop. If using OpenGL directly, you should call
|
||||
SDL_GL_SetSwapInterval(1) sometime near startup; if using the 2D render API,
|
||||
either create the renderer with with the property
|
||||
SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER set to 1, or call
|
||||
SDL_SetRenderVSync(renderer, 1). If you don't explicitly set vsync, you'll get
|
||||
a higher (but perhaps unstable) framerate, and use more power, but it will
|
||||
still work. Choosing a vsync of 1 will use requestAnimationFrame if possible.
|
||||
|
||||
If you're using the SDL main callbacks, the mainloop defaults to using
|
||||
requestAnimationFrame (effectively vsync), because it calls
|
||||
@@ -374,9 +377,9 @@ If you try debugging in Firefox and it doesn't work well for no apparent
|
||||
reason, try Chrome, and vice-versa. These tools are still relatively new,
|
||||
and improving all the time.
|
||||
|
||||
SDL_Log() (or even plain old printf) will write to the Javascript console,
|
||||
and honestly I find printf-style debugging to be easier than setting up a build
|
||||
for proper debugging, so use whatever tools work best for you.
|
||||
SDL_Log() (or printf) will write to the Javascript console,
|
||||
so printf-style debugging can be easier than setting up a build
|
||||
for proper debugging. Use whatever tools work best for you.
|
||||
|
||||
|
||||
## Questions?
|
||||
|
||||
@@ -32,7 +32,8 @@ The Windows GDK port supports the full set of Win32 APIs, renderers, controllers
|
||||
|
||||
* Single-player games have some additional features available:
|
||||
* Call `SDL_GetGDKDefaultUser` to get the default XUserHandle pointer.
|
||||
* `SDL_GetPrefPath` still works, but only for single-player titles.
|
||||
* `SDL_GetPrefPath` and `SDL_Storage` still work, but only for single-player titles.
|
||||
* To enable support for these APIs, use `SDL_SetHint` to set `SDL_GDK_SERVICE_CONFIGURATION_ID` to your SCID string at startup (it should be formatted like `"00000000-0000-0000-0000-000000000000"`)
|
||||
|
||||
These functions mostly wrap around async APIs, and thus should be treated as synchronous alternatives. Also note that the single-player functions return on any OS errors, so be sure to validate the return values!
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ Embedding the SDL3 Xcode project makes SDL3.framework a target of your app, so i
|
||||
fi
|
||||
```
|
||||
3. Below the script entry uncheck the "Run Script:" options "For install builds only" and "Based on dependency analysis"
|
||||
4. Edit the Build Settings and set "User Script Sandboxing" to "No".
|
||||
|
||||
TODO: Add information regarding App Store requirements such as icons, etc.
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ system does not have the XRandR libraries installed, it will be disabled
|
||||
at runtime, and you won't get a missing library error, at least with the
|
||||
default configuration parameters.
|
||||
|
||||
SDL is [not designed to be used in setuid or setgid executables](README-platforms.md#setuid).
|
||||
|
||||
Build Dependencies
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -36,6 +37,8 @@ Fedora 35, all available features enabled:
|
||||
|
||||
Fedora 39+ can also add `liburing-devel` to that command line.
|
||||
|
||||
Fedora 40+ needs `zlib-ng-compat-static` to be added to that command line.
|
||||
|
||||
NOTES:
|
||||
- The sndio audio target is unavailable on Fedora (but probably not what you
|
||||
should want to use anyhow).
|
||||
|
||||
@@ -73,6 +73,8 @@ NSApplicationDelegate implementation:
|
||||
}
|
||||
```
|
||||
|
||||
SDL is [not designed to be used in setuid or setgid executables](README-platforms.md#setuid).
|
||||
|
||||
# Using the Simple DirectMedia Layer with a traditional Makefile
|
||||
|
||||
An existing build system for your SDL app has good chances to work almost
|
||||
|
||||
@@ -45,3 +45,18 @@ All of these still work with [SDL2](/SDL2), which is an incompatible API, but an
|
||||
- OS/2
|
||||
- WinPhone
|
||||
- WinRT/UWP
|
||||
|
||||
## General notes for Unix platforms
|
||||
|
||||
Some aspects of SDL functionality are common to all Unix-based platforms.
|
||||
|
||||
### <a name=setuid></a>Privileged processes (setuid, setgid, setcap)
|
||||
|
||||
SDL is not designed to be used in programs with elevated privileges,
|
||||
such as setuid (`chmod u+s`) or setgid (`chmod g+s`) executables,
|
||||
or executables with file-based capabilities
|
||||
(`setcap cap_sys_nice+ep` or similar).
|
||||
It does not make any attempt to avoid trusting environment variables
|
||||
or other aspects of the inherited execution environment.
|
||||
Programs running with elevated privileges in an attacker-controlled
|
||||
execution environment should not call SDL functions.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -40,14 +40,14 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
|
||||
/* Textures are pixel data that we upload to the video hardware for fast drawing. Lots of 2D
|
||||
engines refer to these as "sprites." We'll do a static texture (upload once, draw many
|
||||
times) with data from a bitmap file. */
|
||||
times) with data from a png file. */
|
||||
|
||||
/* SDL_Surface is pixel data the CPU can access. SDL_Texture is pixel data the GPU can access.
|
||||
Load a .png into a surface, move it to a texture from there. */
|
||||
SDL_asprintf(&png_path, "%ssample.png", SDL_GetBasePath()); /* allocate a string of the full file path */
|
||||
surface = SDL_LoadPNG(png_path);
|
||||
if (!surface) {
|
||||
SDL_Log("Couldn't load bitmap: %s", SDL_GetError());
|
||||
SDL_Log("Couldn't load png: %s", SDL_GetError());
|
||||
return SDL_APP_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ SDL_AppResult SDL_AppIterate(void *appstate)
|
||||
|
||||
/* To update a streaming texture, you need to lock it first. This gets you access to the pixels.
|
||||
Note that this is considered a _write-only_ operation: the buffer you get from locking
|
||||
might not acutally have the existing contents of the texture, and you have to write to every
|
||||
might not actually have the existing contents of the texture, and you have to write to every
|
||||
locked pixel! */
|
||||
|
||||
/* You can use SDL_LockTexture() to get an array of raw pixels, but we're going to use
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
#output-container:hover,
|
||||
#output-container:focus-within {
|
||||
top: 50%;
|
||||
top: 20%;
|
||||
}
|
||||
|
||||
#output-container:focus-within {
|
||||
@@ -151,7 +151,7 @@
|
||||
|
||||
#source-code:hover,
|
||||
#source-code:focus-within {
|
||||
top: 50%;
|
||||
top: 20%;
|
||||
}
|
||||
|
||||
#source-code:focus-within {
|
||||
@@ -241,7 +241,7 @@
|
||||
return function(text) {
|
||||
var elem = document.getElementById('output-container');
|
||||
if (elem.style['top'] == '') {
|
||||
elem.style['top'] = '50%';
|
||||
elem.style['top'] = '20%';
|
||||
setTimeout(function() { elem.style['top'] = ''; }, 3000);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -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.3
|
||||
*
|
||||
* It is almost always best to include just this one header instead of
|
||||
* picking out individual headers included here. There are exceptions to
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -136,7 +136,7 @@ extern "C" {
|
||||
#define SDL_TriggerBreakpoint() __builtin_debugtrap()
|
||||
#elif SDL_HAS_BUILTIN(__builtin_trap)
|
||||
#define SDL_TriggerBreakpoint() __builtin_trap()
|
||||
#elif (defined(__GNUC__) || defined(__clang__) || defined(__TINYC__)) && (defined(__i386__) || defined(__x86_64__))
|
||||
#elif (defined(__GNUC__) || defined(__clang__) || defined(__TINYC__) || defined(__slimcc__)) && (defined(__i386__) || defined(__x86_64__))
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||
#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" )
|
||||
@@ -160,7 +160,7 @@ extern "C" {
|
||||
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
||||
|
||||
/**
|
||||
* A macro that reports the current function being compiled.
|
||||
* A constant that contains the current function being compiled.
|
||||
*
|
||||
* If SDL can't figure how the compiler reports this, it will use "???".
|
||||
*
|
||||
@@ -168,13 +168,15 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_FUNCTION __FUNCTION__
|
||||
|
||||
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
|
||||
#elif !defined(SDL_FUNCTION)
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
|
||||
# define SDL_FUNCTION __func__
|
||||
#elif ((defined(__GNUC__) && (__GNUC__ >= 2)) || defined(_MSC_VER) || defined (__WATCOMC__))
|
||||
# define SDL_FUNCTION __FUNCTION__
|
||||
#else
|
||||
# define SDL_FUNCTION "???"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -213,6 +213,8 @@ typedef struct SDL_AsyncIOQueue SDL_AsyncIOQueue;
|
||||
* \returns a pointer to the SDL_AsyncIO structure that is created or NULL 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.2.0.
|
||||
*
|
||||
* \sa SDL_CloseAsyncIO
|
||||
@@ -531,6 +533,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_SignalAsyncIOQueue(SDL_AsyncIOQueue *queue)
|
||||
* \returns true on success or false 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.2.0.
|
||||
*
|
||||
* \sa SDL_LoadFile_IO
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -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.
|
||||
@@ -1340,7 +1349,7 @@ extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioStreamOutputChannelMap(SDL_AudioSt
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAudioStreamInputChannelMap
|
||||
* \sa SDL_SetAudioStreamOutputChannelMap
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamInputChannelMap(SDL_AudioStream *stream, const int *chmap, int count);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -469,7 +469,7 @@
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
#endif /* NULL */
|
||||
#endif /* ! macOS - breaks precompiled headers */
|
||||
#endif /* __MACH__ */
|
||||
|
||||
#ifndef SDL_FALLTHROUGH
|
||||
#if (defined(__cplusplus) && __cplusplus >= 201703L) || \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -48,8 +48,7 @@ extern __inline int _SDL_bsr_watcom(Uint32);
|
||||
/**
|
||||
* Get the index of the most significant (set) bit in a 32-bit number.
|
||||
*
|
||||
* Result is undefined when called with 0. This operation can also be stated
|
||||
* as "count leading zeroes" and "log base 2".
|
||||
* This operation can also be stated as "count leading zeroes" and "log base 2".
|
||||
*
|
||||
* Note that this is a forced-inline function in a header, and not a public
|
||||
* API function available in the SDL library (which is to say, the code is
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -46,7 +46,7 @@
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||
#if defined(__clang__) && !SDL_HAS_BUILTIN(_m_prefetch)
|
||||
#if defined(__clang__) && !SDL_HAS_BUILTIN(_m_prefetch)
|
||||
#ifndef __PRFCHWINTRIN_H
|
||||
#define __PRFCHWINTRIN_H
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
@@ -208,7 +208,7 @@ _m_prefetch(void *__P)
|
||||
#else
|
||||
/* By default, assume that floats words follow the memory system mode. */
|
||||
#define SDL_FLOATWORDORDER SDL_BYTEORDER
|
||||
#endif /* __FLOAT_WORD_ORDER__ */
|
||||
#endif /* SDL_WIKI_DOCUMENTATION_SECTION */
|
||||
#endif /* !SDL_FLOATWORDORDER */
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -1256,15 +1256,13 @@ extern SDL_DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType)
|
||||
* Poll for currently pending events.
|
||||
*
|
||||
* If `event` is not NULL, the next event is removed from the queue and stored
|
||||
* in the SDL_Event structure pointed to by `event`. The 1 returned refers to
|
||||
* this event, immediately stored in the SDL Event structure -- not an event
|
||||
* to follow.
|
||||
* in the SDL_Event structure pointed to by `event`.
|
||||
*
|
||||
* If `event` is NULL, it simply returns 1 if there is an event in the queue,
|
||||
* but will not remove it from the queue.
|
||||
* If `event` is NULL, it simply returns true if there is an event in the
|
||||
* queue, but will not remove it from the queue.
|
||||
*
|
||||
* As this function may implicitly call SDL_PumpEvents(), you can only call
|
||||
* this function in the thread that set the video mode.
|
||||
* this function in the thread that initialized the video subsystem.
|
||||
*
|
||||
* SDL_PollEvent() is the favored way of receiving system events since it can
|
||||
* be done from the main loop and does not suspend the main loop while waiting
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -241,9 +241,8 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetUserFolder(SDL_Folder folder);
|
||||
/**
|
||||
* Types of filesystem entries.
|
||||
*
|
||||
* Note that there may be other sorts of items on a filesystem: devices,
|
||||
* symlinks, named pipes, etc. They are currently reported as
|
||||
* SDL_PATHTYPE_OTHER.
|
||||
* Note that there may be other sorts of items on a filesystem: devices, named
|
||||
* pipes, etc. They are currently reported as SDL_PATHTYPE_OTHER.
|
||||
*
|
||||
* \since This enum is available since SDL 3.2.0.
|
||||
*
|
||||
@@ -457,6 +456,10 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CopyFile(const char *oldpath, const char *n
|
||||
/**
|
||||
* Get information about a filesystem path.
|
||||
*
|
||||
* Symlinks, on filesystems that support them, are always followed, so you
|
||||
* will always get information on what the symlink eventually points to, and
|
||||
* not the symlink itself.
|
||||
*
|
||||
* \param path the path to query.
|
||||
* \param info a pointer filled in with information about the path, or NULL to
|
||||
* check for the existence of a file.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -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.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -1398,11 +1398,12 @@ typedef struct SDL_GPUViewport
|
||||
* SDL_DownloadFromGPUTexture are used as default values respectively and data
|
||||
* is considered to be tightly packed.
|
||||
*
|
||||
* **WARNING**: Direct3D 12 requires texture data row pitch to be 256 byte
|
||||
* aligned, and offsets to be aligned to 512 bytes. If they are not, SDL will
|
||||
* make a temporary copy of the data that is properly aligned, but this adds
|
||||
* overhead to the transfer process. Apps can avoid this by aligning their
|
||||
* data appropriately, or using a different GPU backend than Direct3D 12.
|
||||
* **WARNING**: On some older/integrated hardware, Direct3D 12 requires
|
||||
* texture data row pitch to be 256 byte aligned, and offsets to be aligned to
|
||||
* 512 bytes. If they are not, SDL will make a temporary copy of the data that
|
||||
* is properly aligned, but this adds overhead to the transfer process. Apps
|
||||
* can avoid this by aligning their data appropriately, or using a different
|
||||
* GPU backend than Direct3D 12.
|
||||
*
|
||||
* \since This struct is available since SDL 3.2.0.
|
||||
*
|
||||
@@ -2306,6 +2307,21 @@ extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDevice(
|
||||
* useful for targeting Intel Haswell and Broadwell GPUs; other hardware
|
||||
* either supports Tier 2 Resource Binding or does not support D3D12 in any
|
||||
* capacity. Defaults to false.
|
||||
* - `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_VERSION_NUMBER`: Certain
|
||||
* feature checks are only possible on Windows 11 by default. By setting
|
||||
* this alongside `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_PATH_STRING`
|
||||
* and vendoring D3D12Core.dll from the D3D12 Agility SDK, you can make
|
||||
* those feature checks possible on older platforms. The version you provide
|
||||
* must match the one given in the DLL.
|
||||
* - `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_PATH_STRING`: Certain
|
||||
* feature checks are only possible on Windows 11 by default. By setting
|
||||
* this alongside
|
||||
* `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_VERSION_NUMBER` and
|
||||
* vendoring D3D12Core.dll from the D3D12 Agility SDK, you can make those
|
||||
* feature checks possible on older platforms. The path you provide must be
|
||||
* relative to the executable path of your app. Be sure not to put the DLL
|
||||
* in the same directory as the exe; Microsoft strongly advises against
|
||||
* this!
|
||||
*
|
||||
* With the Vulkan backend:
|
||||
*
|
||||
@@ -2321,6 +2337,15 @@ extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDevice(
|
||||
* increasing the API version and opting into extensions aside from the
|
||||
* minimal set SDL requires.
|
||||
*
|
||||
* With the Metal backend: -
|
||||
* `SDL_PROP_GPU_DEVICE_CREATE_METAL_ALLOW_MACFAMILY1_BOOLEAN`: By default,
|
||||
* macOS support requires what Apple calls "MTLGPUFamilyMac2" hardware or
|
||||
* newer. However, an application can set this property to true to enable
|
||||
* support for "MTLGPUFamilyMac1" hardware, if (and only if) the application
|
||||
* does not write to sRGB textures. (For history's sake: MacFamily1 also does
|
||||
* not support indirect command buffers, MSAA depth resolve, and stencil
|
||||
* resolve/feedback, but these are not exposed features in SDL_GPU.)
|
||||
*
|
||||
* \param props the properties to use.
|
||||
* \returns a GPU context on success or NULL on failure; call SDL_GetError()
|
||||
* for more information.
|
||||
@@ -2351,8 +2376,11 @@ extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDeviceWithProperties(
|
||||
#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN "SDL.gpu.device.create.shaders.metallib"
|
||||
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN "SDL.gpu.device.create.d3d12.allowtier1resourcebinding"
|
||||
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING "SDL.gpu.device.create.d3d12.semantic"
|
||||
#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN "SDL.gpu.device.create.vulkan.requirehardwareacceleration"
|
||||
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_VERSION_NUMBER "SDL.gpu.device.create.d3d12.agility_sdk_version"
|
||||
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_PATH_STRING "SDL.gpu.device.create.d3d12.agility_sdk_path"
|
||||
#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN "SDL.gpu.device.create.vulkan.requirehardwareacceleration"
|
||||
#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER "SDL.gpu.device.create.vulkan.options"
|
||||
#define SDL_PROP_GPU_DEVICE_CREATE_METAL_ALLOW_MACFAMILY1_BOOLEAN "SDL.gpu.device.create.metal.allowmacfamily1"
|
||||
|
||||
|
||||
/**
|
||||
@@ -2361,7 +2389,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 +3167,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 +3192,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 +3214,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 +3700,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 +3711,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 +3726,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 +3735,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 +3750,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 +3759,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 +3931,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.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -1392,7 +1392,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ResumeHaptic(SDL_Haptic *haptic);
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_RunHapticEffect
|
||||
* \sa SDL_StopHapticEffects
|
||||
* \sa SDL_StopHapticEffect
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_StopHapticEffects(SDL_Haptic *haptic);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -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.4.0.
|
||||
*/
|
||||
#define SDL_HINT_HIDAPI_LIBUSB_GAMECUBE "SDL_HIDAPI_LIBUSB_GAMECUBE"
|
||||
|
||||
/**
|
||||
* A variable to control whether HIDAPI uses libusb only for whitelisted
|
||||
* devices.
|
||||
@@ -1789,10 +1778,16 @@ extern "C" {
|
||||
* A variable controlling whether the HIDAPI driver for HORI licensed Steam
|
||||
* controllers should be used.
|
||||
*
|
||||
* This variable can be set to the following values: "0" - HIDAPI driver is
|
||||
* not used "1" - HIDAPI driver is used
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
* - "0": HIDAPI driver is not used.
|
||||
* - "1": HIDAPI driver is used.
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
|
||||
*
|
||||
* This hint should be set before initializing joysticks and gamepads.
|
||||
*
|
||||
* \since This hint is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_STEAM_HORI "SDL_JOYSTICK_HIDAPI_STEAM_HORI"
|
||||
|
||||
@@ -1800,12 +1795,16 @@ extern "C" {
|
||||
* A variable controlling whether the HIDAPI driver for some Logitech wheels
|
||||
* should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "0": HIDAPI driver is not used
|
||||
* - "1": HIDAPI driver is used
|
||||
* - "0": HIDAPI driver is not used.
|
||||
* - "1": HIDAPI driver is used.
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
|
||||
*
|
||||
* This hint should be set before initializing joysticks and gamepads.
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.0.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_LG4FF "SDL_JOYSTICK_HIDAPI_LG4FF"
|
||||
|
||||
@@ -1813,11 +1812,16 @@ extern "C" {
|
||||
* A variable controlling whether the HIDAPI driver for 8BitDo controllers
|
||||
* should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* "0" - HIDAPI driver is not used. "1" - HIDAPI driver is used.
|
||||
* - "0": HIDAPI driver is not used.
|
||||
* - "1": HIDAPI driver is used.
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
|
||||
*
|
||||
* This hint should be set before initializing joysticks and gamepads.
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.0.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_8BITDO "SDL_JOYSTICK_HIDAPI_8BITDO"
|
||||
|
||||
@@ -1827,11 +1831,16 @@ extern "C" {
|
||||
*
|
||||
* More info - https://github.com/HandHeldLegend/SInput-HID
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* "0" - HIDAPI driver is not used. "1" - HIDAPI driver is used.
|
||||
* - "0": HIDAPI driver is not used.
|
||||
* - "1": HIDAPI driver is used.
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
|
||||
*
|
||||
* This hint should be set before initializing joysticks and gamepads.
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.0.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_SINPUT "SDL_JOYSTICK_HIDAPI_SINPUT"
|
||||
|
||||
@@ -1839,11 +1848,16 @@ extern "C" {
|
||||
* A variable controlling whether the HIDAPI driver for ZUIKI controllers
|
||||
* should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* "0" - HIDAPI driver is not used. "1" - HIDAPI driver is used.
|
||||
* - "0": HIDAPI driver is not used.
|
||||
* - "1": HIDAPI driver is used.
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
|
||||
*
|
||||
* This hint should be set before initializing joysticks and gamepads.
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.0.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_ZUIKI "SDL_JOYSTICK_HIDAPI_ZUIKI"
|
||||
|
||||
@@ -1851,11 +1865,16 @@ extern "C" {
|
||||
* A variable controlling whether the HIDAPI driver for Flydigi controllers
|
||||
* should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* "0" - HIDAPI driver is not used. "1" - HIDAPI driver is used.
|
||||
* - "0": HIDAPI driver is not used.
|
||||
* - "1": HIDAPI driver is used.
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
|
||||
*
|
||||
* This hint should be set before initializing joysticks and gamepads.
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.0.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_FLYDIGI "SDL_JOYSTICK_HIDAPI_FLYDIGI"
|
||||
|
||||
@@ -2630,8 +2649,8 @@ extern "C" {
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "0": Holding a key will open the accents menu for that key.
|
||||
* - "1": Holding a key will repeat the pressed key. (default)
|
||||
* - "0": Holding a key will repeat the pressed key.
|
||||
* - "1": Holding a key will open the accents menu for that key. (default)
|
||||
*
|
||||
* This hint needs to be set before SDL_Init().
|
||||
*
|
||||
@@ -2718,6 +2737,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.
|
||||
@@ -2969,6 +3006,46 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
|
||||
|
||||
/**
|
||||
* A variable controlling whether to force an sRGB-capable OpenGL context.
|
||||
*
|
||||
* At OpenGL context creation time, some platforms can request an sRGB-capable
|
||||
* context. However, sometimes any form of the request can cause surprising
|
||||
* results on some drivers, platforms, and hardware. Usually the surprise is
|
||||
* in the form of rendering that is either a little darker or a little
|
||||
* brighter than intended.
|
||||
*
|
||||
* This hint allows the user to override the app's sRGB requests and either
|
||||
* force a specific value, or avoid requesting anything at all, depending on
|
||||
* what makes things work correctly for their system.
|
||||
*
|
||||
* This is meant as a fail-safe; apps should probably not explicitly set this,
|
||||
* and most users should not, either.
|
||||
*
|
||||
* Note that some platforms cannot make this request at all, and on all
|
||||
* platforms this request can be denied by the operating system.
|
||||
*
|
||||
* In addition to attempting to obtain the type of sRGB-capable OpenGL context
|
||||
* requested by this hint, SDL will try to force the state of
|
||||
* GL_FRAMEBUFFER_SRGB on the new context, if appropriate.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "0": Force a request for an OpenGL context that is _not_ sRGB-capable.
|
||||
* - "1": Force a request for an OpenGL context that _is_ sRGB-capable.
|
||||
* - "skip": Don't make any request for an sRGB-capable context (don't specify
|
||||
* the attribute at all during context creation time).
|
||||
* - any other string is undefined behavior.
|
||||
*
|
||||
* If unset, or set to an empty string, SDL will make a request using the
|
||||
* value the app specified with the SDL_GL_FRAMEBUFFER_SRGB_CAPABLE attribute.
|
||||
*
|
||||
* This hint should be set before an OpenGL context is created.
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.2.
|
||||
*/
|
||||
#define SDL_HINT_OPENGL_FORCE_SRGB_FRAMEBUFFER "SDL_OPENGL_FORCE_SRGB_FRAMEBUFFER"
|
||||
|
||||
/**
|
||||
* Mechanism to specify openvr_api library location
|
||||
*
|
||||
@@ -3293,33 +3370,45 @@ extern "C" {
|
||||
#define SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED "SDL_ROG_GAMEPAD_MICE_EXCLUDED"
|
||||
|
||||
/**
|
||||
* Variable controlling the width of the PS2's framebuffer in pixels
|
||||
* A variable controlling the width of the PS2's framebuffer in pixels.
|
||||
*
|
||||
* By default, this variable is "640"
|
||||
* By default, the variable is "640".
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.0.
|
||||
*/
|
||||
#define SDL_HINT_PS2_GS_WIDTH "SDL_PS2_GS_WIDTH"
|
||||
|
||||
/**
|
||||
* Variable controlling the height of the PS2's framebuffer in pixels
|
||||
* A variable controlling the height of the PS2's framebuffer in pixels.
|
||||
*
|
||||
* By default, this variable is "448"
|
||||
* By default, the variable is "448".
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.0.
|
||||
*/
|
||||
#define SDL_HINT_PS2_GS_HEIGHT "SDL_PS2_GS_HEIGHT"
|
||||
|
||||
/**
|
||||
* Variable controlling whether the signal is interlaced or progressive
|
||||
* A variable controlling whether the signal is interlaced or progressive.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "0": Image is interlaced. (default)
|
||||
* - "1": Image is progressive
|
||||
* - "1": Image is progressive.
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.0.
|
||||
*/
|
||||
#define SDL_HINT_PS2_GS_PROGRESSIVE "SDL_PS2_GS_PROGRESSIVE"
|
||||
|
||||
/**
|
||||
* Variable controlling the video mode of the console
|
||||
* A variable controlling the video mode of the console.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "": Console-native. (default)
|
||||
* - "NTSC": 60hz region
|
||||
* - "PAL": 50hz region
|
||||
* - "NTSC": 60hz region.
|
||||
* - "PAL": 50hz region.
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.0.
|
||||
*/
|
||||
#define SDL_HINT_PS2_GS_MODE "SDL_PS2_GS_MODE"
|
||||
|
||||
@@ -3549,10 +3638,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 +3824,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.
|
||||
*
|
||||
@@ -4425,6 +4518,23 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS "SDL_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS"
|
||||
|
||||
/**
|
||||
* A variable controlling whether the RIDEV_INPUTSINK flag is set when
|
||||
* enabling Windows raw keyboard events.
|
||||
*
|
||||
* This enables the window to still receive input even if not in foreground.
|
||||
*
|
||||
* Focused windows that receive text input will still prevent input events from triggering.
|
||||
*
|
||||
* - "0": Input is not received when not in focus or foreground. (default)
|
||||
* - "1": Input will be received even when not in focus or foreground.
|
||||
*
|
||||
* This hint can be set anytime.
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.4.
|
||||
*/
|
||||
#define SDL_HINT_WINDOWS_RAW_KEYBOARD_INPUTSINK "SDL_WINDOWS_RAW_KEYBOARD_INPUTSINK"
|
||||
|
||||
/**
|
||||
* A variable controlling whether SDL uses Kernel Semaphores on Windows.
|
||||
*
|
||||
@@ -4755,7 +4865,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetHintBoolean(const char *name, bool defau
|
||||
* A callback used to send notifications of hint value changes.
|
||||
*
|
||||
* This is called an initial time during SDL_AddHintCallback with the hint's
|
||||
* current value, and then again each time the hint's value changes.
|
||||
* current value, and then again each time the hint's value changes. In the
|
||||
* initial call, the current value is in both `oldValue` and `newValue`.
|
||||
*
|
||||
* \param userdata what was passed as `userdata` to SDL_AddHintCallback().
|
||||
* \param name what was passed as `name` to SDL_AddHintCallback().
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -224,6 +224,8 @@ 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.
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAppMetadata
|
||||
@@ -244,6 +246,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_Init(SDL_InitFlags flags);
|
||||
* \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.2.0.
|
||||
*
|
||||
* \sa SDL_Init
|
||||
@@ -260,6 +264,8 @@ 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.
|
||||
*
|
||||
* \threadsafety This function is not thread safe.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_InitSubSystem
|
||||
@@ -274,6 +280,8 @@ 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.
|
||||
*
|
||||
* \threadsafety This function is not thread safe.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_Init
|
||||
@@ -292,6 +300,8 @@ 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.
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_Init
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -217,9 +217,9 @@
|
||||
/* Need to do this here because intrin.h has C++ code in it */
|
||||
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
|
||||
#ifdef __clang__
|
||||
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||
#if defined(__clang__) && !SDL_HAS_BUILTIN(_m_prefetch)
|
||||
#ifndef __PRFCHWINTRIN_H
|
||||
#define __PRFCHWINTRIN_H
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -102,6 +102,8 @@ typedef struct SDL_Locale
|
||||
* allocation that should be freed with SDL_free() when it is no
|
||||
* longer needed.
|
||||
*
|
||||
* \threadsafety This function is not thread safe.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_Locale ** SDLCALL SDL_GetPreferredLocales(int *count);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -487,7 +487,8 @@ typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_
|
||||
/**
|
||||
* Get the default log output function.
|
||||
*
|
||||
* \returns the default log output callback.
|
||||
* \returns the default log output callback. It should be called with NULL for
|
||||
* the userdata argument.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -257,7 +257,7 @@
|
||||
#else
|
||||
/* usually this is empty */
|
||||
#define SDLMAIN_DECLSPEC
|
||||
#endif /* SDL_MAIN_EXPORTED */
|
||||
#endif /* SDL_WIKI_DOCUMENTATION_SECTION */
|
||||
|
||||
#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE) || defined(SDL_MAIN_USE_CALLBACKS)
|
||||
#define main SDL_main
|
||||
@@ -333,6 +333,9 @@ 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 called once by SDL, at startup, on a single
|
||||
* thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_AppIterate
|
||||
@@ -537,6 +540,8 @@ 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.
|
||||
*
|
||||
* \threadsafety This function is not thread safe.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_Init
|
||||
@@ -629,6 +634,8 @@ 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.
|
||||
*
|
||||
* \threadsafety This function is not thread safe.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
|
||||
@@ -646,6 +653,8 @@ 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.
|
||||
*
|
||||
* \threadsafety This function is not thread safe.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_UnregisterApp(void);
|
||||
@@ -655,10 +664,26 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnregisterApp(void);
|
||||
/**
|
||||
* Callback from the application to let the suspend continue.
|
||||
*
|
||||
* This should be called from an event watch in response to an
|
||||
* `SDL_EVENT_DID_ENTER_BACKGROUND` event.
|
||||
*
|
||||
* When using SDL_Render, your event watch should be added _after_ creating
|
||||
* the `SDL_Renderer`; this allows the timing of the D3D12 command queue
|
||||
* suspension to execute in the correct order.
|
||||
*
|
||||
* When using SDL_GPU, this should be called after calling SDL_GDKSuspendGPU.
|
||||
*
|
||||
* If you're writing your own D3D12 renderer, this should be called after
|
||||
* calling `ID3D12CommandQueue::SuspendX`.
|
||||
*
|
||||
* This function is only needed for Xbox GDK support; all other platforms will
|
||||
* do nothing and set an "unsupported" error message.
|
||||
*
|
||||
* \threadsafety This function is not thread safe.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_AddEventWatch
|
||||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -168,6 +168,8 @@ typedef struct SDL_MessageBoxData
|
||||
* \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.2.0.
|
||||
*
|
||||
* \sa SDL_ShowSimpleMessageBox
|
||||
@@ -210,6 +212,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *me
|
||||
* \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.2.0.
|
||||
*
|
||||
* \sa SDL_ShowMessageBox
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
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,6 +65,8 @@ typedef void *SDL_MetalView;
|
||||
* \param window the window.
|
||||
* \returns handle NSView or UIView.
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_Metal_DestroyView
|
||||
@@ -80,6 +82,8 @@ extern SDL_DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window *windo
|
||||
*
|
||||
* \param view the SDL_MetalView object.
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_Metal_CreateView
|
||||
@@ -92,6 +96,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
|
||||
* \param view the SDL_MetalView object.
|
||||
* \returns a pointer.
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC void * SDLCALL SDL_Metal_GetLayer(SDL_MetalView view);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
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,6 +65,8 @@ extern "C" {
|
||||
* \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.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_OpenURL(const char *url);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -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.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -308,6 +308,8 @@ typedef struct SDL_Mutex SDL_Mutex;
|
||||
* \returns the initialized and unlocked mutex or NULL 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.2.0.
|
||||
*
|
||||
* \sa SDL_DestroyMutex
|
||||
@@ -334,6 +336,8 @@ extern SDL_DECLSPEC SDL_Mutex * SDLCALL SDL_CreateMutex(void);
|
||||
*
|
||||
* \param mutex the mutex to lock.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_TryLockMutex
|
||||
@@ -355,6 +359,8 @@ 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.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_LockMutex
|
||||
@@ -374,6 +380,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TryLockMutex(SDL_Mutex *mutex) SDL_TRY_ACQU
|
||||
*
|
||||
* \param mutex the mutex to unlock.
|
||||
*
|
||||
* \threadsafety This call must be paired with a previous locking call on the
|
||||
* same thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_LockMutex
|
||||
@@ -392,6 +401,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockMutex(SDL_Mutex *mutex) SDL_RELEASE(m
|
||||
*
|
||||
* \param mutex the mutex to destroy.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CreateMutex
|
||||
@@ -457,6 +468,8 @@ typedef struct SDL_RWLock SDL_RWLock;
|
||||
* \returns the initialized and unlocked read/write lock or NULL 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.2.0.
|
||||
*
|
||||
* \sa SDL_DestroyRWLock
|
||||
@@ -497,6 +510,8 @@ extern SDL_DECLSPEC SDL_RWLock * SDLCALL SDL_CreateRWLock(void);
|
||||
*
|
||||
* \param rwlock the read/write lock to lock.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_LockRWLockForWriting
|
||||
@@ -528,6 +543,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_LockRWLockForReading(SDL_RWLock *rwlock) SD
|
||||
*
|
||||
* \param rwlock the read/write lock to lock.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_LockRWLockForReading
|
||||
@@ -553,6 +570,8 @@ 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.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_LockRWLockForReading
|
||||
@@ -583,6 +602,8 @@ 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.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_LockRWLockForWriting
|
||||
@@ -607,6 +628,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TryLockRWLockForWriting(SDL_RWLock *rwlock)
|
||||
*
|
||||
* \param rwlock the rwlock to unlock.
|
||||
*
|
||||
* \threadsafety This call must be paired with a previous locking call on the
|
||||
* same thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_LockRWLockForReading
|
||||
@@ -627,6 +651,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockRWLock(SDL_RWLock *rwlock) SDL_RELEAS
|
||||
*
|
||||
* \param rwlock the rwlock to destroy.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CreateRWLock
|
||||
@@ -670,6 +696,8 @@ typedef struct SDL_Semaphore SDL_Semaphore;
|
||||
* \returns a new semaphore or NULL 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.2.0.
|
||||
*
|
||||
* \sa SDL_DestroySemaphore
|
||||
@@ -689,6 +717,8 @@ extern SDL_DECLSPEC SDL_Semaphore * SDLCALL SDL_CreateSemaphore(Uint32 initial_v
|
||||
*
|
||||
* \param sem the semaphore to destroy.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CreateSemaphore
|
||||
@@ -707,6 +737,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_Semaphore *sem);
|
||||
*
|
||||
* \param sem the semaphore wait on.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SignalSemaphore
|
||||
@@ -726,6 +758,8 @@ 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.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SignalSemaphore
|
||||
@@ -746,6 +780,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TryWaitSemaphore(SDL_Semaphore *sem);
|
||||
* indefinitely.
|
||||
* \returns true if the wait succeeds or false if the wait times out.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SignalSemaphore
|
||||
@@ -759,6 +795,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitSemaphoreTimeout(SDL_Semaphore *sem, Si
|
||||
*
|
||||
* \param sem the semaphore to increment.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_TryWaitSemaphore
|
||||
@@ -773,6 +811,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_SignalSemaphore(SDL_Semaphore *sem);
|
||||
* \param sem the semaphore to query.
|
||||
* \returns the current value of the semaphore.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetSemaphoreValue(SDL_Semaphore *sem);
|
||||
@@ -806,6 +846,8 @@ typedef struct SDL_Condition SDL_Condition;
|
||||
* \returns a new condition variable or NULL 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.2.0.
|
||||
*
|
||||
* \sa SDL_BroadcastCondition
|
||||
@@ -821,6 +863,8 @@ extern SDL_DECLSPEC SDL_Condition * SDLCALL SDL_CreateCondition(void);
|
||||
*
|
||||
* \param cond the condition variable to destroy.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CreateCondition
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -796,6 +796,7 @@
|
||||
#define SDL_TEXTEDITING_EXT SDL_TEXTEDITING_EXT_renamed_SDL_EVENT_TEXT_EDITING_EXT
|
||||
#define SDL_TEXTINPUT SDL_TEXTINPUT_renamed_SDL_EVENT_TEXT_INPUT
|
||||
#define SDL_USEREVENT SDL_USEREVENT_renamed_SDL_EVENT_USER
|
||||
#define SDL_WINDOWEVENT SDL_WINDOWEVENT_deprecated_use_SDL_EVENT_WINDOW_NAME
|
||||
#define SDL_WINDOWEVENT_CLOSE SDL_WINDOWEVENT_CLOSE_renamed_SDL_EVENT_WINDOW_CLOSE_REQUESTED
|
||||
#define SDL_WINDOWEVENT_DISPLAY_CHANGED SDL_WINDOWEVENT_DISPLAY_CHANGED_renamed_SDL_EVENT_WINDOW_DISPLAY_CHANGED
|
||||
#define SDL_WINDOWEVENT_ENTER SDL_WINDOWEVENT_ENTER_renamed_SDL_EVENT_WINDOW_MOUSE_ENTER
|
||||
@@ -870,6 +871,7 @@
|
||||
#define SDL_GameControllerBindType SDL_GameControllerBindType_renamed_SDL_GamepadBindingType
|
||||
#define SDL_GameControllerButton SDL_GameControllerButton_renamed_SDL_GamepadButton
|
||||
#define SDL_GameControllerClose SDL_GameControllerClose_renamed_SDL_CloseGamepad
|
||||
#define SDL_GameControllerEventState SDL_GameControllerEventState_deprecated_use_SDL_SetGamepadEventsEnabled_true_false
|
||||
#define SDL_GameControllerFromInstanceID SDL_GameControllerFromInstanceID_renamed_SDL_GetGamepadFromID
|
||||
#define SDL_GameControllerFromPlayerIndex SDL_GameControllerFromPlayerIndex_renamed_SDL_GetGamepadFromPlayerIndex
|
||||
#define SDL_GameControllerGetAppleSFSymbolsNameForAxis SDL_GameControllerGetAppleSFSymbolsNameForAxis_renamed_SDL_GetGamepadAppleSFSymbolsNameForAxis
|
||||
@@ -947,6 +949,7 @@
|
||||
|
||||
/* ##SDL_hints.h */
|
||||
#define SDL_DelHintCallback SDL_DelHintCallback_renamed_SDL_RemoveHintCallback
|
||||
#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK SDL_HINT_ACCELEROMETER_AS_JOYSTICK_deprecated_use_SDL_GamepadHasSensor_and_SDL_SetGamepadSensorEnabled
|
||||
#define SDL_HINT_ALLOW_TOPMOST SDL_HINT_ALLOW_TOPMOST_renamed_SDL_HINT_WINDOW_ALLOW_TOPMOST
|
||||
#define SDL_HINT_DIRECTINPUT_ENABLED SDL_HINT_DIRECTINPUT_ENABLED_renamed_SDL_HINT_JOYSTICK_DIRECTINPUT
|
||||
#define SDL_HINT_GDK_TEXTINPUT_DEFAULT SDL_HINT_GDK_TEXTINPUT_DEFAULT_renamed_SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT
|
||||
@@ -957,6 +960,8 @@
|
||||
#define SDL_HINT_LINUX_HAT_DEADZONES SDL_HINT_LINUX_HAT_DEADZONES_renamed_SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES
|
||||
#define SDL_HINT_LINUX_JOYSTICK_CLASSIC SDL_HINT_LINUX_JOYSTICK_CLASSIC_renamed_SDL_HINT_JOYSTICK_LINUX_CLASSIC
|
||||
#define SDL_HINT_LINUX_JOYSTICK_DEADZONES SDL_HINT_LINUX_JOYSTICK_DEADZONES_renamed_SDL_HINT_JOYSTICK_LINUX_DEADZONES
|
||||
#define SDL_HINT_RENDER_SCALE_QUALITY SDL_HINT_RENDER_SCALE_QUALITY_deprecated_use_SDL_SetTextureScaleMode_with_SDL_SCALEMODE_NEAREST
|
||||
#define SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS_deprecated_remove_this_line
|
||||
|
||||
/* ##SDL_joystick.h */
|
||||
#define SDL_JOYSTICK_TYPE_GAMECONTROLLER SDL_JOYSTICK_TYPE_GAMECONTROLLER_renamed_SDL_JOYSTICK_TYPE_GAMEPAD
|
||||
@@ -999,6 +1004,7 @@
|
||||
#define SDL_JoystickSetVirtualButton SDL_JoystickSetVirtualButton_renamed_SDL_SetJoystickVirtualButton
|
||||
#define SDL_JoystickSetVirtualHat SDL_JoystickSetVirtualHat_renamed_SDL_SetJoystickVirtualHat
|
||||
#define SDL_JoystickUpdate SDL_JoystickUpdate_renamed_SDL_UpdateJoysticks
|
||||
#define SDL_NumJoysticks SDL_NumJoysticks_deprecated_use_SDL_GetJoysticks
|
||||
|
||||
/* ##SDL_keyboard.h */
|
||||
#define SDL_IsScreenKeyboardShown SDL_IsScreenKeyboardShown_renamed_SDL_ScreenKeyboardShown
|
||||
@@ -1147,6 +1153,8 @@
|
||||
|
||||
/* ##SDL_render.h */
|
||||
#define SDL_GetRendererOutputSize SDL_GetRendererOutputSize_renamed_SDL_GetCurrentRenderOutputSize
|
||||
#define SDL_RENDERER_ACCELERATED SDL_RENDERER_ACCELERATED_deprecated_remove_this_line
|
||||
#define SDL_RENDERER_PRESENTVSYNC SDL_RENDERER_PRESENTVSYNC_deprecated_use_SDL_SetRenderVSync
|
||||
#define SDL_RenderCopy SDL_RenderCopy_renamed_SDL_RenderTexture
|
||||
#define SDL_RenderCopyEx SDL_RenderCopyEx_renamed_SDL_RenderTextureRotated
|
||||
#define SDL_RenderCopyExF SDL_RenderCopyExF_renamed_SDL_RenderTextureRotated
|
||||
@@ -1291,6 +1299,7 @@
|
||||
|
||||
/* ##SDL_thread.h */
|
||||
#define SDL_SetThreadPriority SDL_SetThreadPriority_renamed_SDL_SetCurrentThreadPriority
|
||||
#define SDL_SetWindowInputFocus SDL_SetWindowInputFocus_deprecated_use_SDL_RaiseWindow
|
||||
#define SDL_TLSCleanup SDL_TLSCleanup_renamed_SDL_CleanupTLS
|
||||
#define SDL_TLSGet SDL_TLSGet_renamed_SDL_GetTLS
|
||||
#define SDL_TLSSet SDL_TLSSet_renamed_SDL_SetTLS
|
||||
@@ -1316,10 +1325,13 @@
|
||||
#define SDL_GetWindowDisplayIndex SDL_GetWindowDisplayIndex_renamed_SDL_GetDisplayForWindow
|
||||
#define SDL_GetWindowDisplayMode SDL_GetWindowDisplayMode_renamed_SDL_GetWindowFullscreenMode
|
||||
#define SDL_HasWindowSurface SDL_HasWindowSurface_renamed_SDL_WindowHasSurface
|
||||
#define SDL_INIT_EVERYTHING SDL_INIT_EVERYTHING_deprecated_list_flags_explicitly
|
||||
#define SDL_IsScreenSaverEnabled SDL_IsScreenSaverEnabled_renamed_SDL_ScreenSaverEnabled
|
||||
#define SDL_SetWindowDisplayMode SDL_SetWindowDisplayMode_renamed_SDL_SetWindowFullscreenMode
|
||||
#define SDL_WINDOW_ALLOW_HIGHDPI SDL_WINDOW_ALLOW_HIGHDPI_renamed_SDL_WINDOW_HIGH_PIXEL_DENSITY
|
||||
#define SDL_WINDOW_FULLSCREEN_DESKTOP SDL_WINDOW_FULLSCREEN_DESKTOP_deprecated_use_SDL_SetWindowFullscreen_with_bool
|
||||
#define SDL_WINDOW_INPUT_GRABBED SDL_WINDOW_INPUT_GRABBED_renamed_SDL_WINDOW_MOUSE_GRABBED
|
||||
#define SDL_WINDOW_SHOWN SDL_WINDOW_SHOWN_deprecated_windows_are_shown_by_default
|
||||
#define SDL_WINDOW_SKIP_TASKBAR SDL_WINDOW_SKIP_TASKBAR_renamed_SDL_WINDOW_UTILITY
|
||||
|
||||
#endif /* SDL_ENABLE_OLD_NAMES */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -54,11 +54,11 @@
|
||||
* example, some platforms can manage multiple devices at the same time, but
|
||||
* others will make any connected pens look like a single logical device, much
|
||||
* how all USB mice connected to a computer will move the same system cursor.
|
||||
* cursor. Other platforms might not support pen buttons, or the distance
|
||||
* axis, etc. Very few platforms can even report _what_ functionality the pen
|
||||
* supports in the first place, so best practices is to either build UI to let
|
||||
* the user configure their pens, or be prepared to handle new functionality
|
||||
* for a pen the first time an event is reported.
|
||||
* Other platforms might not support pen buttons, or the distance axis, etc.
|
||||
* Very few platforms can even report _what_ functionality the pen supports in
|
||||
* the first place, so best practices is to either build UI to let the user
|
||||
* configure their pens, or be prepared to handle new functionality for a pen
|
||||
* the first time an event is reported.
|
||||
*/
|
||||
|
||||
#ifndef SDL_pen_h_
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -51,6 +51,8 @@ extern "C" {
|
||||
* \returns the name of the platform. If the correct platform name is not
|
||||
* available, returns a string beginning with the text "Unknown".
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC const char * SDLCALL SDL_GetPlatform(void);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -93,6 +93,8 @@ typedef enum SDL_PowerState
|
||||
* \returns the current battery state or `SDL_POWERSTATE_ERROR` on failure;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* \threadsafety This function is not thread safe.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *seconds, int *percent);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -111,6 +111,8 @@ typedef enum SDL_PropertyType
|
||||
* \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.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGlobalProperties(void);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -237,6 +237,8 @@ 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.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_HasRectIntersection
|
||||
@@ -253,6 +255,8 @@ 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.
|
||||
*
|
||||
* \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_GetRectUnion(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result);
|
||||
@@ -272,6 +276,8 @@ 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.
|
||||
*
|
||||
* \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_GetRectEnclosingPoints(const SDL_Point *points, int count, const SDL_Rect *clip, SDL_Rect *result);
|
||||
@@ -292,6 +298,8 @@ 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.
|
||||
*
|
||||
* \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_GetRectAndLineIntersection(const SDL_Rect *rect, int *X1, int *Y1, int *X2, int *Y2);
|
||||
@@ -423,9 +431,11 @@ 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.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetRectIntersection
|
||||
* \sa SDL_GetRectIntersectionFloat
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_HasRectIntersectionFloat(const SDL_FRect *A, const SDL_FRect *B);
|
||||
|
||||
@@ -440,6 +450,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasRectIntersectionFloat(const SDL_FRect *A
|
||||
* rectangles `A` and `B`.
|
||||
* \returns true if there is an intersection, false otherwise.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_HasRectIntersectionFloat
|
||||
@@ -456,6 +468,8 @@ 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.
|
||||
*
|
||||
* \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_GetRectUnionFloat(const SDL_FRect *A, const SDL_FRect *B, SDL_FRect *result);
|
||||
@@ -476,6 +490,8 @@ 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.
|
||||
*
|
||||
* \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_GetRectEnclosingPointsFloat(const SDL_FPoint *points, int count, const SDL_FRect *clip, SDL_FRect *result);
|
||||
@@ -497,6 +513,8 @@ 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.
|
||||
*
|
||||
* \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_GetRectAndLineIntersectionFloat(const SDL_FRect *rect, float *X1, float *Y1, float *X2, float *Y2);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user