mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
Compare commits
351 Commits
preview-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2fa1e7258a | ||
![]() |
c922762791 | ||
![]() |
235022fe2f | ||
![]() |
dc13a6ae95 | ||
![]() |
fe6bd8e9bf | ||
![]() |
bc3264130d | ||
![]() |
69d361dee1 | ||
![]() |
70a239210e | ||
![]() |
4c6d949e6d | ||
![]() |
ab5cb707a6 | ||
![]() |
16f8122a0d | ||
![]() |
6beda34215 | ||
![]() |
0825d07a43 | ||
![]() |
8e766c9252 | ||
![]() |
43924ec873 | ||
![]() |
8c2682a219 | ||
![]() |
e4fcc7b6e7 | ||
![]() |
14edb21aec | ||
![]() |
50b8c6cdfb | ||
![]() |
943c4abcb4 | ||
![]() |
943579a545 | ||
![]() |
31364477f2 | ||
![]() |
36758d70c9 | ||
![]() |
2abc7735a4 | ||
![]() |
8298d60e4a | ||
![]() |
409f3ade88 | ||
![]() |
4176e188bf | ||
![]() |
cf249b0cb2 | ||
![]() |
11dbff246f | ||
![]() |
ccd5fcef12 | ||
![]() |
48f5550651 | ||
![]() |
2a946e91bc | ||
![]() |
44edbf7137 | ||
![]() |
1c008d8ed0 | ||
![]() |
c21bc48a70 | ||
![]() |
1c7cc60286 | ||
![]() |
8f958953f1 | ||
![]() |
3b3af7105b | ||
![]() |
725ee7665c | ||
![]() |
6f098a920e | ||
![]() |
09f900f66e | ||
![]() |
5f8e0ebf58 | ||
![]() |
913e0a5e53 | ||
![]() |
628130ec8f | ||
![]() |
fa8c0f0552 | ||
![]() |
17c4bdd754 | ||
![]() |
ad8a09000f | ||
![]() |
8df17c97d1 | ||
![]() |
303fd5ed5a | ||
![]() |
fdf33f9047 | ||
![]() |
cb3d6dc467 | ||
![]() |
84c4ff2f10 | ||
![]() |
2e381a717f | ||
![]() |
129ebc77b9 | ||
![]() |
a336b62d8b | ||
![]() |
d0ae093681 | ||
![]() |
72a3eae0da | ||
![]() |
983cfe8b1c | ||
![]() |
718034f5fa | ||
![]() |
17625e20df | ||
![]() |
c806c271c5 | ||
![]() |
74536243dd | ||
![]() |
98c447802f | ||
![]() |
a437dbc7e3 | ||
![]() |
1c21a72bda | ||
![]() |
73fc2b03a3 | ||
![]() |
6f3d0b3cdb | ||
![]() |
cb3cc28809 | ||
![]() |
df3cfbc797 | ||
![]() |
799093799a | ||
![]() |
5bf077f1f1 | ||
![]() |
5d6a780453 | ||
![]() |
77b520e93e | ||
![]() |
bb3c5b4f3a | ||
![]() |
efa6e7aece | ||
![]() |
535d80bade | ||
![]() |
ed2920afef | ||
![]() |
7a5604cf0c | ||
![]() |
7e130e27ba | ||
![]() |
b775135b4f | ||
![]() |
a52fc209bb | ||
![]() |
f16c67115d | ||
![]() |
90bda6548f | ||
![]() |
c45c4a5e51 | ||
![]() |
670a7d8126 | ||
![]() |
8a67896d9a | ||
![]() |
8526868563 | ||
![]() |
071bebf235 | ||
![]() |
c0a9d220b9 | ||
![]() |
ea9880b760 | ||
![]() |
bcf7ead6e4 | ||
![]() |
6d5815db52 | ||
![]() |
6b7dad7d82 | ||
![]() |
3e530c6db1 | ||
![]() |
7bff36e4b2 | ||
![]() |
37140aa9f7 | ||
![]() |
abe6d9db97 | ||
![]() |
10c9fbf411 | ||
![]() |
c6c7469708 | ||
![]() |
b476695e67 | ||
![]() |
b6d0bc0431 | ||
![]() |
aa10e51c74 | ||
![]() |
10a5b388df | ||
![]() |
6449339ae3 | ||
![]() |
075c0337cd | ||
![]() |
a036aeda3b | ||
![]() |
9b454a762c | ||
![]() |
dcadd23ba1 | ||
![]() |
adb91fd3db | ||
![]() |
819628c6bf | ||
![]() |
759e01bd64 | ||
![]() |
c698c61f03 | ||
![]() |
c975f77b0f | ||
![]() |
362f96a6cf | ||
![]() |
f8040b2e01 | ||
![]() |
90b2e2527e | ||
![]() |
2be749b23b | ||
![]() |
642262e30e | ||
![]() |
d5766bc4b8 | ||
![]() |
b809da52fd | ||
![]() |
c4c0bfdfb1 | ||
![]() |
7133969e3a | ||
![]() |
53a5350292 | ||
![]() |
5f2dd5f04e | ||
![]() |
dfdc120268 | ||
![]() |
d4cda51057 | ||
![]() |
a974888aad | ||
![]() |
7570ab106d | ||
![]() |
b716eeefef | ||
![]() |
3afd1e7eaa | ||
![]() |
78023500fa | ||
![]() |
34c12d0db8 | ||
![]() |
b088e89191 | ||
![]() |
0851322fb1 | ||
![]() |
43b54b3d72 | ||
![]() |
32965b4bf1 | ||
![]() |
5da9d4ecc2 | ||
![]() |
19f42094bb | ||
![]() |
721fc7de0b | ||
![]() |
cd269730eb | ||
![]() |
049a8f0e52 | ||
![]() |
354d2c390c | ||
![]() |
b79ada6aa5 | ||
![]() |
ba95c54f99 | ||
![]() |
42e0fb10f8 | ||
![]() |
cd0db8d35e | ||
![]() |
1d7a681e4d | ||
![]() |
e054f3c085 | ||
![]() |
75317dae59 | ||
![]() |
c7d1fd90ea | ||
![]() |
dbe3baeb0f | ||
![]() |
ad3c7b92f8 | ||
![]() |
0401b07eea | ||
![]() |
08e74d29be | ||
![]() |
923123a527 | ||
![]() |
c603a9c94a | ||
![]() |
90b7174a7d | ||
![]() |
6a72d32d41 | ||
![]() |
f3a39074b0 | ||
![]() |
842f6dc402 | ||
![]() |
b95989d14a | ||
![]() |
010f27dc70 | ||
![]() |
a6a8598b98 | ||
![]() |
7c6adc1ca7 | ||
![]() |
feeea6a776 | ||
![]() |
e9f7f11f1d | ||
![]() |
d2fc394a2a | ||
![]() |
d317fc9c08 | ||
![]() |
ee469c6aff | ||
![]() |
d4d22dd8de | ||
![]() |
59ea078ee2 | ||
![]() |
1848ce680b | ||
![]() |
656c519cca | ||
![]() |
9ed96f392d | ||
![]() |
ae8df1dcbd | ||
![]() |
4b429b9fa7 | ||
![]() |
616ae99069 | ||
![]() |
c2dac95f58 | ||
![]() |
dd4f5df824 | ||
![]() |
cdc5483cf9 | ||
![]() |
07a5c144c6 | ||
![]() |
eb168e410c | ||
![]() |
b96bb152c2 | ||
![]() |
5a564a718d | ||
![]() |
9f6eeb1095 | ||
![]() |
274bc95dfd | ||
![]() |
07f7c40464 | ||
![]() |
22d8e73530 | ||
![]() |
21a42d2b0d | ||
![]() |
1006236aa6 | ||
![]() |
326ce9bb8d | ||
![]() |
c95b842b30 | ||
![]() |
d8e1ad0ebc | ||
![]() |
7ee2ab3830 | ||
![]() |
1dd8fadca2 | ||
![]() |
9225a421b7 | ||
![]() |
3ffb1a8cbd | ||
![]() |
874c07f8de | ||
![]() |
67664a0427 | ||
![]() |
eb793dede7 | ||
![]() |
87e1b0eb89 | ||
![]() |
e98ee9bb04 | ||
![]() |
3424ec948c | ||
![]() |
05877f2cea | ||
![]() |
4d63a2b882 | ||
![]() |
ea642fe9ff | ||
![]() |
5f4696ce63 | ||
![]() |
2c7b7d1d33 | ||
![]() |
355f69ebfe | ||
![]() |
c9d602307c | ||
![]() |
dd0bdc2561 | ||
![]() |
84d35587ee | ||
![]() |
fc9b2478d8 | ||
![]() |
18d21b36fe | ||
![]() |
1995471927 | ||
![]() |
67382e9c83 | ||
![]() |
23410debf7 | ||
![]() |
8ce176b59a | ||
![]() |
51fa076fdc | ||
![]() |
a446381ea9 | ||
![]() |
ebb24eedc8 | ||
![]() |
dabc93a631 | ||
![]() |
169c8d5140 | ||
![]() |
8e9c44bc3b | ||
![]() |
4dd585fb62 | ||
![]() |
81e57147f8 | ||
![]() |
3bea84531d | ||
![]() |
9ed23a4b79 | ||
![]() |
e19a56f4d5 | ||
![]() |
1ab61635a9 | ||
![]() |
29c684c626 | ||
![]() |
0eaa6197c5 | ||
![]() |
ffe194c52e | ||
![]() |
a4547fe77a | ||
![]() |
49dd24e195 | ||
![]() |
191a6417d5 | ||
![]() |
bf793bf439 | ||
![]() |
9e60a8994f | ||
![]() |
b2793a2ce2 | ||
![]() |
04e3b67707 | ||
![]() |
a41f93bd10 | ||
![]() |
5ca735b40f | ||
![]() |
cdde6dd7bb | ||
![]() |
8f8af918ba | ||
![]() |
8feb21a1d1 | ||
![]() |
4294c06836 | ||
![]() |
31dd4fe81f | ||
![]() |
417ed7f35f | ||
![]() |
0aa319e4f9 | ||
![]() |
5815372206 | ||
![]() |
5d079c9a26 | ||
![]() |
d590e1f122 | ||
![]() |
7098e525d0 | ||
![]() |
fb6df93384 | ||
![]() |
a2b0ddcca6 | ||
![]() |
d28e953222 | ||
![]() |
f731741ead | ||
![]() |
0eaa8c6d81 | ||
![]() |
21b433536a | ||
![]() |
6bc7e88ca6 | ||
![]() |
e4e76ac72e | ||
![]() |
1b30a01b44 | ||
![]() |
191b9d5021 | ||
![]() |
7d2a1c5f8f | ||
![]() |
b6b9390444 | ||
![]() |
55e094f7ac | ||
![]() |
584c1d5791 | ||
![]() |
995a6a0333 | ||
![]() |
86b46c678c | ||
![]() |
96414fa56a | ||
![]() |
670db4d248 | ||
![]() |
b08d045811 | ||
![]() |
2ad0f1e1fe | ||
![]() |
41d48db4ae | ||
![]() |
922b73195c | ||
![]() |
5e4a2974aa | ||
![]() |
3766a39409 | ||
![]() |
e10e42c814 | ||
![]() |
2b8fb0bdd4 | ||
![]() |
efaf3739c6 | ||
![]() |
4bddf521dd | ||
![]() |
569de84907 | ||
![]() |
e5a4f09363 | ||
![]() |
7d7a76c077 | ||
![]() |
66408308b8 | ||
![]() |
438075a83a | ||
![]() |
b4562c0243 | ||
![]() |
611f132fd0 | ||
![]() |
03a3c19c27 | ||
![]() |
307e6f2ca6 | ||
![]() |
f79083d9bb | ||
![]() |
4ba4f0a106 | ||
![]() |
c4f2f7b352 | ||
![]() |
949ec0c501 | ||
![]() |
839227b4b0 | ||
![]() |
c04b739df6 | ||
![]() |
3df0767e34 | ||
![]() |
307dac97ac | ||
![]() |
21cc1878f1 | ||
![]() |
b524af1b43 | ||
![]() |
9a83fa026d | ||
![]() |
ea859fba3a | ||
![]() |
551510c0eb | ||
![]() |
95c1584386 | ||
![]() |
f0af6c348a | ||
![]() |
3ad9c38a46 | ||
![]() |
d42b4ed961 | ||
![]() |
9a7cfbc2d0 | ||
![]() |
82125ec1d8 | ||
![]() |
4231848791 | ||
![]() |
61f13b94d1 | ||
![]() |
d14c93c4b1 | ||
![]() |
c64197be1a | ||
![]() |
042898995c | ||
![]() |
fb0f6a1196 | ||
![]() |
38176bfe9a | ||
![]() |
0e2ca934b5 | ||
![]() |
715897aea7 | ||
![]() |
a8a65b6fca | ||
![]() |
1f3b40797d | ||
![]() |
fb94a79f89 | ||
![]() |
bda90c3cb6 | ||
![]() |
90aff306c1 | ||
![]() |
00b23a012c | ||
![]() |
6b776a9989 | ||
![]() |
e5966bbdb1 | ||
![]() |
73ee99978d | ||
![]() |
ebaa30d339 | ||
![]() |
c8f3f1b461 | ||
![]() |
a78104a47f | ||
![]() |
6cdde10edb | ||
![]() |
dd0dc64d51 | ||
![]() |
c688853a82 | ||
![]() |
507593f485 | ||
![]() |
7acf78ba92 | ||
![]() |
037cd25a22 | ||
![]() |
e8916b2608 | ||
![]() |
d2090d1c80 | ||
![]() |
3f7f632e14 | ||
![]() |
f61860fa93 | ||
![]() |
4bb3c2a1c7 | ||
![]() |
61bdbacdae | ||
![]() |
f044a3d6ca | ||
![]() |
fa7a529912 | ||
![]() |
1636009511 | ||
![]() |
bf85320947 | ||
![]() |
f2f04e825d | ||
![]() |
cbdbd66e18 | ||
![]() |
ef1fdf11bd | ||
![]() |
e6bb50a710 | ||
![]() |
6b34c9fe7f |
101
.github/workflows/create-test-plan.py
vendored
101
.github/workflows/create-test-plan.py
vendored
@@ -31,6 +31,7 @@ class JobOs(Enum):
|
||||
Ubuntu20_04 = "ubuntu-20.04"
|
||||
Ubuntu22_04 = "ubuntu-22.04"
|
||||
Ubuntu24_04 = "ubuntu-24.04"
|
||||
Ubuntu24_04_arm = "ubuntu-24.04-arm"
|
||||
Macos13 = "macos-13"
|
||||
|
||||
|
||||
@@ -101,45 +102,46 @@ class JobSpec:
|
||||
|
||||
|
||||
JOB_SPECS = {
|
||||
"msys2-mingw32": JobSpec(name="Windows (msys2, mingw32)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw32", msys2_platform=Msys2Platform.Mingw32, ),
|
||||
"msys2-mingw64": JobSpec(name="Windows (msys2, mingw64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64", msys2_platform=Msys2Platform.Mingw64, ),
|
||||
"msys2-clang32": JobSpec(name="Windows (msys2, clang32)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw32-clang", msys2_platform=Msys2Platform.Clang32, ),
|
||||
"msys2-clang64": JobSpec(name="Windows (msys2, clang64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64-clang", msys2_platform=Msys2Platform.Clang64, ),
|
||||
"msys2-ucrt64": JobSpec(name="Windows (msys2, ucrt64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64-ucrt", msys2_platform=Msys2Platform.Ucrt64, ),
|
||||
"msvc-x64": JobSpec(name="Windows (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-x64", msvc_arch=MsvcArch.X64, msvc_project="VisualC/SDL.sln", ),
|
||||
"msvc-x86": JobSpec(name="Windows (MSVC, x86)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-x86", msvc_arch=MsvcArch.X86, msvc_project="VisualC/SDL.sln", ),
|
||||
"msvc-clang-x64": JobSpec(name="Windows (MSVC, clang-cl x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-clang-cl-x64", msvc_arch=MsvcArch.X64, clang_cl=True, ),
|
||||
"msvc-clang-x86": JobSpec(name="Windows (MSVC, clang-cl x86)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-clang-cl-x86", msvc_arch=MsvcArch.X86, clang_cl=True, ),
|
||||
"msvc-arm32": JobSpec(name="Windows (MSVC, ARM)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-arm32", msvc_arch=MsvcArch.Arm32, ),
|
||||
"msvc-arm64": JobSpec(name="Windows (MSVC, ARM64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-arm64", msvc_arch=MsvcArch.Arm64, ),
|
||||
"msvc-gdk-x64": JobSpec(name="GDK (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-GDK", msvc_arch=MsvcArch.X64, msvc_project="VisualC-GDK/SDL.sln", gdk=True, no_cmake=True, ),
|
||||
"ubuntu-20.04": JobSpec(name="Ubuntu 20.04", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04", ),
|
||||
"ubuntu-22.04": JobSpec(name="Ubuntu 22.04", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04", ),
|
||||
"steamrt-sniper": JobSpec(name="Steam Linux Runtime (Sniper)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-slrsniper", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk:beta", ),
|
||||
"ubuntu-intel-icx": JobSpec(name="Ubuntu 20.04 (Intel oneAPI)", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04-oneapi", intel=IntelCompiler.Icx, ),
|
||||
"ubuntu-intel-icc": JobSpec(name="Ubuntu 20.04 (Intel Compiler)", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04-icc", intel=IntelCompiler.Icc, ),
|
||||
"macos-framework-x64": JobSpec(name="MacOS (Framework) (x64)", os=JobOs.Macos13, platform=SdlPlatform.MacOS, artifact="SDL-macos-framework", apple_framework=True, apple_archs={AppleArch.Aarch64, AppleArch.X86_64, }, xcode=True, ),
|
||||
"macos-framework-arm64": JobSpec(name="MacOS (Framework) (arm64)", os=JobOs.MacosLatest, platform=SdlPlatform.MacOS, artifact=None, apple_framework=True, apple_archs={AppleArch.Aarch64, AppleArch.X86_64, }, ),
|
||||
"macos-gnu-arm64": JobSpec(name="MacOS (GNU prefix)", os=JobOs.MacosLatest, platform=SdlPlatform.MacOS, artifact="SDL-macos-arm64-gnu", apple_framework=False, apple_archs={AppleArch.Aarch64, }, ),
|
||||
"ios": JobSpec(name="iOS (CMake & xcode)", os=JobOs.MacosLatest, platform=SdlPlatform.Ios, artifact="SDL-ios-arm64", xcode=True, ),
|
||||
"tvos": JobSpec(name="tvOS (CMake & xcode)", os=JobOs.MacosLatest, platform=SdlPlatform.Tvos, artifact="SDL-tvos-arm64", xcode=True, ),
|
||||
"android-cmake": JobSpec(name="Android (CMake)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Android, artifact="SDL-android-arm64", android_abi="arm64-v8a", android_arch="aarch64", android_platform=23, ),
|
||||
"android-cmake-lean": JobSpec(name="Android (CMake, lean)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Android, artifact="SDL-lean-android-arm64", android_abi="arm64-v8a", android_arch="aarch64", android_platform=23, lean=True, ),
|
||||
"android-mk": JobSpec(name="Android (Android.mk)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Android, artifact=None, no_cmake=True, android_mk=True, ),
|
||||
"android-gradle": JobSpec(name="Android (Gradle)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Android, artifact=None, no_cmake=True, android_gradle=True, ),
|
||||
"emscripten": JobSpec(name="Emscripten", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Emscripten, artifact="SDL-emscripten", ),
|
||||
"haiku": JobSpec(name="Haiku", os=JobOs.UbuntuLatest, platform=SdlPlatform.Haiku, artifact="SDL-haiku-x64", container="ghcr.io/haiku/cross-compiler:x86_64-r1beta5", ),
|
||||
"loongarch64": JobSpec(name="LoongArch64", os=JobOs.UbuntuLatest, platform=SdlPlatform.LoongArch64, artifact="SDL-loongarch64", ),
|
||||
"n3ds": JobSpec(name="Nintendo 3DS", os=JobOs.UbuntuLatest, platform=SdlPlatform.N3ds, artifact="SDL-n3ds", container="devkitpro/devkitarm:latest", ),
|
||||
"ppc": JobSpec(name="PowerPC", os=JobOs.UbuntuLatest, platform=SdlPlatform.PowerPC, artifact="SDL-ppc", container="dockcross/linux-ppc:latest", ),
|
||||
"ppc64": JobSpec(name="PowerPC64", os=JobOs.UbuntuLatest, platform=SdlPlatform.PowerPC64, artifact="SDL-ppc64le", container="dockcross/linux-ppc64le:latest", ),
|
||||
"ps2": JobSpec(name="Sony PlayStation 2", os=JobOs.UbuntuLatest, platform=SdlPlatform.Ps2, artifact="SDL-ps2", container="ps2dev/ps2dev:latest", ),
|
||||
"psp": JobSpec(name="Sony PlayStation Portable", os=JobOs.UbuntuLatest, platform=SdlPlatform.Psp, artifact="SDL-psp", container="pspdev/pspdev:latest", ),
|
||||
"vita-pib": JobSpec(name="Sony PlayStation Vita (GLES w/ pib)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Vita, artifact="SDL-vita-pib", container="vitasdk/vitasdk:latest", vita_gles=VitaGLES.Pib, ),
|
||||
"vita-pvr": JobSpec(name="Sony PlayStation Vita (GLES w/ PVR_PSP2)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Vita, artifact="SDL-vita-pvr", container="vitasdk/vitasdk:latest", vita_gles=VitaGLES.Pvr, ),
|
||||
"riscos": JobSpec(name="RISC OS", os=JobOs.UbuntuLatest, platform=SdlPlatform.Riscos, artifact="SDL-riscos", container="riscosdotinfo/riscos-gccsdk-4.7:latest", ),
|
||||
"netbsd": JobSpec(name="NetBSD", os=JobOs.UbuntuLatest, platform=SdlPlatform.NetBSD, artifact="SDL-netbsd-x64", ),
|
||||
"freebsd": JobSpec(name="FreeBSD", os=JobOs.UbuntuLatest, platform=SdlPlatform.FreeBSD, artifact="SDL-freebsd-x64", ),
|
||||
"msys2-mingw32": JobSpec(name="Windows (msys2, mingw32)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw32", msys2_platform=Msys2Platform.Mingw32, ),
|
||||
"msys2-mingw64": JobSpec(name="Windows (msys2, mingw64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64", msys2_platform=Msys2Platform.Mingw64, ),
|
||||
"msys2-clang32": JobSpec(name="Windows (msys2, clang32)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw32-clang", msys2_platform=Msys2Platform.Clang32, ),
|
||||
"msys2-clang64": JobSpec(name="Windows (msys2, clang64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64-clang", msys2_platform=Msys2Platform.Clang64, ),
|
||||
"msys2-ucrt64": JobSpec(name="Windows (msys2, ucrt64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64-ucrt", msys2_platform=Msys2Platform.Ucrt64, ),
|
||||
"msvc-x64": JobSpec(name="Windows (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-x64", msvc_arch=MsvcArch.X64, msvc_project="VisualC/SDL.sln", ),
|
||||
"msvc-x86": JobSpec(name="Windows (MSVC, x86)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-x86", msvc_arch=MsvcArch.X86, msvc_project="VisualC/SDL.sln", ),
|
||||
"msvc-clang-x64": JobSpec(name="Windows (MSVC, clang-cl x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-clang-cl-x64", msvc_arch=MsvcArch.X64, clang_cl=True, ),
|
||||
"msvc-clang-x86": JobSpec(name="Windows (MSVC, clang-cl x86)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-clang-cl-x86", msvc_arch=MsvcArch.X86, clang_cl=True, ),
|
||||
"msvc-arm32": JobSpec(name="Windows (MSVC, ARM)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-arm32", msvc_arch=MsvcArch.Arm32, ),
|
||||
"msvc-arm64": JobSpec(name="Windows (MSVC, ARM64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-arm64", msvc_arch=MsvcArch.Arm64, ),
|
||||
"msvc-gdk-x64": JobSpec(name="GDK (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-GDK", msvc_arch=MsvcArch.X64, msvc_project="VisualC-GDK/SDL.sln", gdk=True, no_cmake=True, ),
|
||||
"ubuntu-20.04": JobSpec(name="Ubuntu 20.04", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04", ),
|
||||
"ubuntu-22.04": JobSpec(name="Ubuntu 22.04", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04", ),
|
||||
"ubuntu-24.04-arm64": JobSpec(name="Ubuntu 24.04 (ARM64)", os=JobOs.Ubuntu24_04_arm, platform=SdlPlatform.Linux, artifact="SDL-ubuntu24.04-arm64", ),
|
||||
"steamrt-sniper": JobSpec(name="Steam Linux Runtime (Sniper)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-slrsniper", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk:beta", ),
|
||||
"ubuntu-intel-icx": JobSpec(name="Ubuntu 20.04 (Intel oneAPI)", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04-oneapi", intel=IntelCompiler.Icx, ),
|
||||
"ubuntu-intel-icc": JobSpec(name="Ubuntu 20.04 (Intel Compiler)", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04-icc", intel=IntelCompiler.Icc, ),
|
||||
"macos-framework-x64": JobSpec(name="MacOS (Framework) (x64)", os=JobOs.Macos13, platform=SdlPlatform.MacOS, artifact="SDL-macos-framework", apple_framework=True, apple_archs={AppleArch.Aarch64, AppleArch.X86_64, }, xcode=True, ),
|
||||
"macos-framework-arm64": JobSpec(name="MacOS (Framework) (arm64)", os=JobOs.MacosLatest, platform=SdlPlatform.MacOS, artifact=None, apple_framework=True, apple_archs={AppleArch.Aarch64, AppleArch.X86_64, }, ),
|
||||
"macos-gnu-arm64": JobSpec(name="MacOS (GNU prefix)", os=JobOs.MacosLatest, platform=SdlPlatform.MacOS, artifact="SDL-macos-arm64-gnu", apple_framework=False, apple_archs={AppleArch.Aarch64, }, ),
|
||||
"ios": JobSpec(name="iOS (CMake & xcode)", os=JobOs.MacosLatest, platform=SdlPlatform.Ios, artifact="SDL-ios-arm64", xcode=True, ),
|
||||
"tvos": JobSpec(name="tvOS (CMake & xcode)", os=JobOs.MacosLatest, platform=SdlPlatform.Tvos, artifact="SDL-tvos-arm64", xcode=True, ),
|
||||
"android-cmake": JobSpec(name="Android (CMake)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Android, artifact="SDL-android-arm64", android_abi="arm64-v8a", android_arch="aarch64", android_platform=23, ),
|
||||
"android-cmake-lean": JobSpec(name="Android (CMake, lean)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Android, artifact="SDL-lean-android-arm64", android_abi="arm64-v8a", android_arch="aarch64", android_platform=23, lean=True, ),
|
||||
"android-mk": JobSpec(name="Android (Android.mk)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Android, artifact=None, no_cmake=True, android_mk=True, ),
|
||||
"android-gradle": JobSpec(name="Android (Gradle)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Android, artifact=None, no_cmake=True, android_gradle=True, ),
|
||||
"emscripten": JobSpec(name="Emscripten", os=JobOs.UbuntuLatest, platform=SdlPlatform.Emscripten, artifact="SDL-emscripten", ),
|
||||
"haiku": JobSpec(name="Haiku", os=JobOs.UbuntuLatest, platform=SdlPlatform.Haiku, artifact="SDL-haiku-x64", container="ghcr.io/haiku/cross-compiler:x86_64-r1beta5", ),
|
||||
"loongarch64": JobSpec(name="LoongArch64", os=JobOs.UbuntuLatest, platform=SdlPlatform.LoongArch64, artifact="SDL-loongarch64", ),
|
||||
"n3ds": JobSpec(name="Nintendo 3DS", os=JobOs.UbuntuLatest, platform=SdlPlatform.N3ds, artifact="SDL-n3ds", container="devkitpro/devkitarm:latest", ),
|
||||
"ppc": JobSpec(name="PowerPC", os=JobOs.UbuntuLatest, platform=SdlPlatform.PowerPC, artifact="SDL-ppc", container="dockcross/linux-ppc:latest", ),
|
||||
"ppc64": JobSpec(name="PowerPC64", os=JobOs.UbuntuLatest, platform=SdlPlatform.PowerPC64, artifact="SDL-ppc64le", container="dockcross/linux-ppc64le:latest", ),
|
||||
"ps2": JobSpec(name="Sony PlayStation 2", os=JobOs.UbuntuLatest, platform=SdlPlatform.Ps2, artifact="SDL-ps2", container="ps2dev/ps2dev:latest", ),
|
||||
"psp": JobSpec(name="Sony PlayStation Portable", os=JobOs.UbuntuLatest, platform=SdlPlatform.Psp, artifact="SDL-psp", container="pspdev/pspdev:latest", ),
|
||||
"vita-pib": JobSpec(name="Sony PlayStation Vita (GLES w/ pib)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Vita, artifact="SDL-vita-pib", container="vitasdk/vitasdk:latest", vita_gles=VitaGLES.Pib, ),
|
||||
"vita-pvr": JobSpec(name="Sony PlayStation Vita (GLES w/ PVR_PSP2)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Vita, artifact="SDL-vita-pvr", container="vitasdk/vitasdk:latest", vita_gles=VitaGLES.Pvr, ),
|
||||
"riscos": JobSpec(name="RISC OS", os=JobOs.UbuntuLatest, platform=SdlPlatform.Riscos, artifact="SDL-riscos", container="riscosdotinfo/riscos-gccsdk-4.7:latest", ),
|
||||
"netbsd": JobSpec(name="NetBSD", os=JobOs.UbuntuLatest, platform=SdlPlatform.NetBSD, artifact="SDL-netbsd-x64", ),
|
||||
"freebsd": JobSpec(name="FreeBSD", os=JobOs.UbuntuLatest, platform=SdlPlatform.FreeBSD, artifact="SDL-freebsd-x64", ),
|
||||
}
|
||||
|
||||
|
||||
@@ -221,6 +223,8 @@ class JobDetails:
|
||||
cpactions_install_cmd: str = ""
|
||||
setup_vita_gles_type: str = ""
|
||||
check_sources: bool = False
|
||||
setup_python: bool = False
|
||||
pypi_packages: list[str] = dataclasses.field(default_factory=list)
|
||||
|
||||
def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
|
||||
data = {
|
||||
@@ -285,6 +289,8 @@ class JobDetails:
|
||||
"setup-vita-gles-type": self.setup_vita_gles_type,
|
||||
"setup-gdk-folder": self.setup_gdk_folder,
|
||||
"check-sources": self.check_sources,
|
||||
"setup-python": self.setup_python,
|
||||
"pypi-packages": my_shlex_join(self.pypi_packages),
|
||||
}
|
||||
return {k: v for k, v in data.items() if v != ""}
|
||||
|
||||
@@ -441,7 +447,8 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
"libudev-dev",
|
||||
"fcitx-libs-dev",
|
||||
))
|
||||
ubuntu_year, ubuntu_month = [int(v) for v in spec.os.value.removeprefix("ubuntu-").split(".", 1)]
|
||||
match = re.match(r"ubuntu-(?P<year>[0-9]+)\.(?P<month>[0-9]+).*", spec.os.value)
|
||||
ubuntu_year, ubuntu_month = [int(match["year"]), int(match["month"])]
|
||||
if ubuntu_year >= 22:
|
||||
job.apt_packages.extend(("libpipewire-0.3-dev", "libdecor-0-dev"))
|
||||
job.apt_packages.extend((
|
||||
@@ -469,7 +476,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
job.cmake_arguments.extend([
|
||||
"-DCMAKE_SYSTEM_NAME=iOS",
|
||||
"-DCMAKE_OSX_ARCHITECTURES=\"arm64\"",
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=9.0",
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0",
|
||||
])
|
||||
case SdlPlatform.Tvos:
|
||||
if spec.xcode:
|
||||
@@ -477,7 +484,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
job.cmake_arguments.extend([
|
||||
"-DCMAKE_SYSTEM_NAME=tvOS",
|
||||
"-DCMAKE_OSX_ARCHITECTURES=\"arm64\"",
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=9.0",
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0",
|
||||
])
|
||||
case SdlPlatform.MacOS:
|
||||
if spec.apple_framework:
|
||||
@@ -486,7 +493,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
job.test_pkg_config = False
|
||||
job.cmake_arguments.extend((
|
||||
"'-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64'",
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11",
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13",
|
||||
"-DSDL_FRAMEWORK=ON",
|
||||
))
|
||||
job.shared_lib = SharedLibType.FRAMEWORK
|
||||
@@ -494,7 +501,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
job.clang_tidy = True
|
||||
job.cmake_arguments.extend((
|
||||
"-DCMAKE_OSX_ARCHITECTURES=arm64",
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11",
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13",
|
||||
"-DCLANG_TIDY_BINARY=$(brew --prefix llvm)/bin/clang-tidy",
|
||||
))
|
||||
job.shared_lib = SharedLibType.DYLIB
|
||||
@@ -538,7 +545,6 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
job.cmake_config_emulator = "emcmake"
|
||||
job.cmake_build_type = "Debug"
|
||||
job.test_pkg_config = False
|
||||
job.apt_packages.append("python3-selenium")
|
||||
job.cmake_arguments.extend((
|
||||
"-DSDLTEST_BROWSER=chrome",
|
||||
"-DSDLTEST_TIMEOUT_MULTIPLIER=4",
|
||||
@@ -558,6 +564,8 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
"chromedriver --version",
|
||||
))
|
||||
job.static_lib = StaticLibType.A
|
||||
job.setup_python = True
|
||||
job.pypi_packages.append("selenium")
|
||||
case SdlPlatform.Ps2:
|
||||
build_parallel = False
|
||||
job.shared = False
|
||||
@@ -701,7 +709,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
))
|
||||
case SdlPlatform.NetBSD:
|
||||
job.cpactions_os = "netbsd"
|
||||
job.cpactions_version = "10.0"
|
||||
job.cpactions_version = "10.1"
|
||||
job.cpactions_arch = "x86-64"
|
||||
job.cpactions_setup_cmd = "export PATH=\"/usr/pkg/sbin:/usr/pkg/bin:/sbin:$PATH\"; export PKG_CONFIG_PATH=\"/usr/pkg/lib/pkgconfig\";export PKG_PATH=\"https://cdn.netBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r|cut -f \"1 2\" -d.)/All/\";echo \"PKG_PATH=$PKG_PATH\";echo \"uname -a -> \"$(uname -a)\"\";sudo -E sysctl -w security.pax.aslr.enabled=0;sudo -E sysctl -w security.pax.aslr.global=0;sudo -E pkgin clean;sudo -E pkgin update"
|
||||
job.cpactions_install_cmd = "sudo -E pkgin -y install cmake dbus pkgconf ninja-build pulseaudio libxkbcommon wayland wayland-protocols libinotify libusb1"
|
||||
@@ -710,6 +718,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
|
||||
if "ubuntu" in spec.name.lower():
|
||||
job.check_sources = True
|
||||
job.setup_python = True
|
||||
|
||||
if not build_parallel:
|
||||
job.cmake_build_arguments.append("-j1")
|
||||
|
24
.github/workflows/generic.yml
vendored
24
.github/workflows/generic.yml
vendored
@@ -133,6 +133,15 @@ jobs:
|
||||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
||||
brew update
|
||||
brew install ${{ matrix.platform.brew-packages }}
|
||||
- name: 'Setup Python'
|
||||
uses: 'actions/setup-python@main'
|
||||
if: ${{ matrix.platform.setup-python }}
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: 'Install PyPI packages'
|
||||
if: ${{ matrix.platform.pypi-packages != '' }}
|
||||
run: |
|
||||
python -m pip install --user ${{ matrix.platform.pypi-packages }}
|
||||
- name: 'Set up GLES for VITA' # Must be after apk
|
||||
if: ${{ matrix.platform.setup-vita-gles-type != '' }}
|
||||
uses: ./.github/actions/setup-vita-gles
|
||||
@@ -170,9 +179,9 @@ jobs:
|
||||
-DSDLTEST_TRACKMEM=ON \
|
||||
-DSDL_INSTALL_TESTS=${{ matrix.platform.build-tests }} \
|
||||
-DSDL_CLANG_TIDY=${{ matrix.platform.clang-tidy }} \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
-DSDL_DISABLE_INSTALL_CPACK=OFF \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
-DSDL_INSTALL_DOCS=ON \
|
||||
-DSDL_INSTALL_CPACK=ON \
|
||||
-DSDL_INSTALL_DOCS=ON \
|
||||
${{ matrix.platform.cmake-arguments }} \
|
||||
-DSDL_SHARED=${{ matrix.platform.shared }} \
|
||||
-DSDL_STATIC=${{ matrix.platform.static }} \
|
||||
@@ -281,7 +290,7 @@ jobs:
|
||||
- name: 'Build (cross-platform-actions, BSD)'
|
||||
id: cpactions
|
||||
if: ${{ matrix.platform.cpactions }}
|
||||
uses: cross-platform-actions/action@v0.26.0
|
||||
uses: cross-platform-actions/action@v0.27.0
|
||||
with:
|
||||
operating_system: '${{ matrix.platform.cpactions-os }}'
|
||||
architecture: '${{ matrix.platform.cpactions-arch }}'
|
||||
@@ -293,7 +302,7 @@ jobs:
|
||||
${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DSDL_WERROR=${{ matrix.platform.werror }} \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
-DSDL_INSTALL_DOCS=ON \
|
||||
${{ matrix.platform.cmake-arguments }} \
|
||||
-DSDL_SHARED=${{ matrix.platform.shared }} \
|
||||
-DSDL_STATIC=${{ matrix.platform.static }} \
|
||||
@@ -348,11 +357,6 @@ jobs:
|
||||
if: ${{ matrix.platform.xcode-sdk != '' }}
|
||||
run: |
|
||||
xcodebuild -project Xcode/SDL/SDL.xcodeproj -target SDL3 -configuration Release -sdk ${{ matrix.platform.xcode-sdk }} clean build
|
||||
- name: 'Setup Python'
|
||||
uses: 'actions/setup-python@main'
|
||||
if: ${{ matrix.platform.check-sources }}
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: 'Check Sources'
|
||||
if: ${{ matrix.platform.check-sources }}
|
||||
run: |
|
||||
|
35
.github/workflows/release.yml
vendored
35
.github/workflows/release.yml
vendored
@@ -47,6 +47,14 @@ jobs:
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace}}/dist'
|
||||
- name: 'Generate summary'
|
||||
run: |
|
||||
echo "Run the following commands to download all artifacts:" >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
echo "mkdir -p /tmp/${{ steps.releaser.outputs.project }}-${{ steps.releaser.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "cd /tmp/${{ steps.releaser.outputs.project }}-${{ steps.releaser.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "gh run -R ${{ github.repository }} download ${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
linux-verify:
|
||||
needs: [src]
|
||||
@@ -77,6 +85,14 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
${{ steps.tar.outputs.path }}/build-scripts/test-versioning.sh
|
||||
- name: 'Install Linux dependencies'
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y \
|
||||
gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev libjack-dev libsndio-dev \
|
||||
libusb-1.0-0-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev \
|
||||
libxss-dev libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
|
||||
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev
|
||||
- name: 'CMake (configure + build + tests + examples)'
|
||||
run: |
|
||||
cmake -S ${{ steps.tar.outputs.path }} -B /tmp/build -DSDL_TEST_LIBRARY=TRUE -DSDL_TESTS=TRUE -DSDL_EXAMPLES=TRUE
|
||||
@@ -163,7 +179,7 @@ jobs:
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
|
||||
-DCMAKE_SYSTEM_NAME=Darwin \
|
||||
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \
|
||||
-Werror=dev \
|
||||
-B build_darwin
|
||||
cmake --build build_darwin --config Release --verbose
|
||||
@@ -175,7 +191,7 @@ jobs:
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}/SDL3.xcframework/macos-arm64_x86_64" \
|
||||
-DCMAKE_SYSTEM_NAME=Darwin \
|
||||
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \
|
||||
-Werror=dev \
|
||||
-B build_darwin_2
|
||||
cmake --build build_darwin --config Release --verbose
|
||||
@@ -188,7 +204,7 @@ jobs:
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
|
||||
-DCMAKE_SYSTEM_NAME=iOS \
|
||||
-DCMAKE_OSX_ARCHITECTURES="arm64" \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=9.0 \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
|
||||
-Werror=dev \
|
||||
-B build_ios
|
||||
cmake --build build_ios --config Release --verbose
|
||||
@@ -201,7 +217,7 @@ jobs:
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
|
||||
-DCMAKE_SYSTEM_NAME=tvOS \
|
||||
-DCMAKE_OSX_ARCHITECTURES="arm64" \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=9.0 \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
|
||||
-Werror=dev \
|
||||
-B build_tvos
|
||||
cmake --build build_tvos --config Release --verbose
|
||||
@@ -217,7 +233,7 @@ jobs:
|
||||
-DCMAKE_SYSTEM_NAME=iOS \
|
||||
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
|
||||
-DCMAKE_OSX_SYSROOT="${sysroot}" \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=9.0 \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
|
||||
-Werror=dev \
|
||||
-B build_ios_simulator
|
||||
cmake --build build_ios_simulator --config Release --verbose
|
||||
@@ -233,7 +249,7 @@ jobs:
|
||||
-DCMAKE_SYSTEM_NAME=tvOS \
|
||||
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
|
||||
-DCMAKE_OSX_SYSROOT="${sysroot}" \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=9.0 \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
|
||||
-Werror=dev \
|
||||
-B build_tvos_simulator
|
||||
cmake --build build_tvos_simulator --config Release --verbose
|
||||
@@ -586,8 +602,11 @@ jobs:
|
||||
- name: 'Extract Android SDK from AAR'
|
||||
id: sdk
|
||||
run: |
|
||||
python "${{ github.workspace }}/${{ needs.android.outputs.android-aar }}" -o /tmp/SDL3-android
|
||||
cd /tmp
|
||||
unzip "${{ github.workspace }}/${{ needs.android.outputs.android-aar }}"
|
||||
python "${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}.aar" -o /tmp/SDL3-android
|
||||
echo "prefix=/tmp/SDL3-android" >>$GITHUB_OUTPUT
|
||||
echo "sdl3-aar=/tmp/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}.aar" >>$GITHUB_OUTPUT
|
||||
- name: 'CMake (configure + build) x86, x64, arm32, arm64'
|
||||
run: |
|
||||
android_abis="x86 x86_64 armeabi-v7a arm64-v8a"
|
||||
@@ -617,7 +636,7 @@ jobs:
|
||||
echo "path=/tmp/projects/org.libsdl.testspriteminimal" >>$GITHUB_OUTPUT
|
||||
- name: 'Copy SDL3 aar into Gradle project'
|
||||
run: |
|
||||
cp "${{ github.workspace }}/${{ needs.android.outputs.android-aar }}" "${{ steps.create-gradle-project.outputs.path }}/app/libs"
|
||||
cp "${{ steps.sdk.outputs.sdl3-aar }}" "${{ steps.create-gradle-project.outputs.path }}/app/libs"
|
||||
|
||||
echo ""
|
||||
echo "Project contents:"
|
||||
|
@@ -14,9 +14,11 @@ projecturl = https://libsdl.org/
|
||||
wikiurl = https://wiki.libsdl.org
|
||||
bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new
|
||||
warn_about_missing = 0
|
||||
wikipreamble = (This is the documentation for SDL3, which is the current stable version. [SDL2](https://wiki.libsdl.org/SDL2/) was the previous version!)
|
||||
#wikipreamble = (This is the documentation for SDL3, which is the current stable version. [SDL2](https://wiki.libsdl.org/SDL2/) was the previous version!)
|
||||
wikiheaderfiletext = Defined in [<SDL3/%fname%>](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/%fname%)
|
||||
|
||||
manpageheaderfiletext = Defined in SDL3/%fname%
|
||||
manpagesymbolfilterregex = \A[US]int\d+\Z
|
||||
|
||||
# All SDL_test_* headers become undefined categories, everything else just converts like SDL_audio.h -> Audio
|
||||
# A handful of others we fix up in the header itself with /* WIKI CATEGORY: x */ comments.
|
||||
|
@@ -35,8 +35,8 @@ LOCAL_SRC_FILES := \
|
||||
$(LOCAL_PATH)/src/dialog/android/SDL_androiddialog.c \
|
||||
$(wildcard $(LOCAL_PATH)/src/dynapi/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/events/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/file/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/file/generic/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/io/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/io/generic/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/gpu/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/gpu/vulkan/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
|
||||
|
7
BUGS.txt
7
BUGS.txt
@@ -11,6 +11,9 @@ You may also find help at the SDL forums/mailing list:
|
||||
|
||||
https://discourse.libsdl.org/
|
||||
|
||||
Bug reports are welcome here, but we really appreciate if you use the issue
|
||||
tracker, as bugs discussed on the mailing list may be forgotten or missed.
|
||||
or on Discord:
|
||||
|
||||
https://discord.com/invite/BwpFGBWsv8
|
||||
|
||||
Bug reports are welcome here, but we really appreciate if you use the issue tracker, as bugs discussed on the mailing list or Discord may be forgotten or missed.
|
||||
|
||||
|
@@ -5,16 +5,16 @@ if(NOT DEFINED CMAKE_BUILD_TYPE)
|
||||
endif()
|
||||
|
||||
# See docs/release_checklist.md
|
||||
project(SDL3 LANGUAGES C VERSION "3.1.8")
|
||||
project(SDL3 LANGUAGES C VERSION "3.2.2")
|
||||
|
||||
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||
set(SDL3_SUBPROJECT OFF)
|
||||
set(SDL3_MAINPROJECT ON)
|
||||
else()
|
||||
set(SDL3_SUBPROJECT ON)
|
||||
set(SDL3_MAINPROJECT OFF)
|
||||
endif()
|
||||
|
||||
# By default, configure SDL3 in RelWithDebInfo configuration
|
||||
if(NOT SDL3_SUBPROJECT)
|
||||
if(SDL3_MAINPROJECT)
|
||||
get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if(is_multi_config)
|
||||
# The first item in CMAKE_CONFIGURATION_TYPES is the default configuration
|
||||
@@ -287,14 +287,14 @@ if(SOLARIS)
|
||||
endif()
|
||||
|
||||
# Allow some projects to be built conditionally.
|
||||
set_option(SDL_DISABLE_INSTALL "Disable installation of SDL3" ${SDL3_SUBPROJECT})
|
||||
cmake_dependent_option(SDL_DISABLE_INSTALL_CPACK "Create binary SDL3 archive using CPack" ${SDL3_SUBPROJECT} "NOT SDL_DISABLE_INSTALL" ON)
|
||||
cmake_dependent_option(SDL_DISABLE_INSTALL_DOCS "Install docs for SDL3" ON "NOT SDL_DISABLE_INSTALL;NOT SDL_FRAMEWORK" ON)
|
||||
set_option(SDL_DISABLE_UNINSTALL "Disable uninstallation of SDL3" OFF)
|
||||
set_option(SDL_INSTALL "Enable installation of SDL3" ${SDL3_MAINPROJECT})
|
||||
cmake_dependent_option(SDL_INSTALL_CPACK "Create binary SDL3 archive using CPack" ${SDL3_MAINPROJECT} "SDL_INSTALL" ON)
|
||||
cmake_dependent_option(SDL_INSTALL_DOCS "Install docs for SDL3" OFF "SDL_INSTALL;NOT SDL_FRAMEWORK" ON)
|
||||
set_option(SDL_UNINSTALL "Enable uninstallation of SDL3" ${SDL3_MAINPROJECT})
|
||||
cmake_dependent_option(SDL_PRESEED "Preseed CMake cache to speed up configuration" ON "${SDL_PRESEED_AVAILABLE}" OFF)
|
||||
cmake_dependent_option(SDL_RELOCATABLE "Create relocatable SDL package" ${SDL_RELOCATABLE_DEFAULT} "NOT SDL_DISABLE_INSTALL" OFF)
|
||||
cmake_dependent_option(SDL_RELOCATABLE "Create relocatable SDL package" ${SDL_RELOCATABLE_DEFAULT} "SDL_INSTALL" OFF)
|
||||
|
||||
cmake_dependent_option(SDL_DISABLE_ANDROID_JAR "Disable creation of SDL3.jar" ${SDL3_SUBPROJECT} "ANDROID" ON)
|
||||
cmake_dependent_option(SDL_ANDROID_JAR "Enable creation of SDL3.jar" ${SDL3_MAINPROJECT} "ANDROID" ON)
|
||||
|
||||
option_string(SDL_ASSERTIONS "Enable internal sanity checks (auto/disabled/release/enabled/paranoid)" "auto")
|
||||
set_option(SDL_ASSEMBLY "Enable assembly routines" ${SDL_ASSEMBLY_DEFAULT})
|
||||
@@ -308,7 +308,6 @@ dep_option(SDL_SSE4_1 "Use SSE4.1 assembly routines" ON "SDL_ASSEMB
|
||||
dep_option(SDL_SSE4_2 "Use SSE4.2 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
|
||||
dep_option(SDL_MMX "Use MMX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
|
||||
dep_option(SDL_ALTIVEC "Use Altivec assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_POWERPC32 OR SDL_CPU_POWERPC64" OFF)
|
||||
dep_option(SDL_ARMSIMD "Use SIMD assembly blitters on ARM" OFF "SDL_ASSEMBLY;SDL_CPU_ARM32" OFF)
|
||||
dep_option(SDL_ARMNEON "Use NEON assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_ARM32 OR SDL_CPU_ARM64" OFF)
|
||||
dep_option(SDL_LSX "Use LSX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_LOONGARCH64" OFF)
|
||||
dep_option(SDL_LASX "Use LASX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_LOONGARCH64" OFF)
|
||||
@@ -394,7 +393,7 @@ cmake_dependent_option(SDL_STATIC "Build a static version of the library" ${SDL_
|
||||
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_INSTALL_TESTS "Install test-cases" OFF "NOT SDL_DISABLE_INSTALL;NOT SDL_FRAMEWORK" 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")
|
||||
|
||||
@@ -1159,8 +1158,8 @@ sdl_glob_sources(
|
||||
"${SDL3_SOURCE_DIR}/src/cpuinfo/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/dynapi/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/events/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/file/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/file/generic/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/io/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/io/generic/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/filesystem/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/gpu/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/joystick/*.c"
|
||||
@@ -1419,7 +1418,7 @@ if(ANDROID)
|
||||
set(HAVE_CLOCK_GETTIME 1)
|
||||
endif()
|
||||
|
||||
if(NOT SDL_DISABLE_ANDROID_JAR)
|
||||
if(SDL_ANDROID_JAR)
|
||||
find_package(Java)
|
||||
find_package(SdlAndroidPlatform MODULE)
|
||||
|
||||
@@ -1449,7 +1448,7 @@ if(ANDROID)
|
||||
DEPENDS ${SDL_JAVA_SOURCES}
|
||||
)
|
||||
add_custom_target(SDL3-javasources ALL DEPENDS "${javasourcesjar}")
|
||||
if(NOT SDL_DISABLE_INSTALL_DOCS)
|
||||
if(SDL_INSTALL_DOCS)
|
||||
set(javadocdir "${SDL3_BINARY_DIR}/docs/javadoc")
|
||||
set(javadocjar "${SDL3_BINARY_DIR}/SDL3-${SDL3_VERSION}-javadoc.jar")
|
||||
set(javadoc_index_html "${javadocdir}/index.html")
|
||||
@@ -1775,7 +1774,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
endif()
|
||||
|
||||
if(HAVE_LIBURING_H)
|
||||
sdl_sources("${SDL3_SOURCE_DIR}/src/file/io_uring/SDL_asyncio_liburing.c")
|
||||
sdl_sources("${SDL3_SOURCE_DIR}/src/io/io_uring/SDL_asyncio_liburing.c")
|
||||
endif()
|
||||
|
||||
# Always compiled for Linux, unconditionally:
|
||||
@@ -1890,6 +1889,7 @@ elseif(WINDOWS)
|
||||
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/core/windows/*.c")
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/main/windows/*.c")
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/io/windows/*.c")
|
||||
|
||||
if(TARGET SDL3-shared AND MSVC AND NOT SDL_LIBC)
|
||||
# Prevent codegen that would use the VC runtime libraries.
|
||||
@@ -2398,6 +2398,7 @@ elseif(APPLE)
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_COCOA)
|
||||
sdl_link_dependency(cocoa LIBS "$<LINK_LIBRARY:FRAMEWORK,Cocoa>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,Cocoa")
|
||||
# macOS 11.0+ iOS 14.0+ tvOS 14.0+
|
||||
sdl_link_dependency(uniformtypeidentifiers LIBS "$<LINK_LIBRARY:WEAK_FRAMEWORK,UniformTypeIdentifiers>" PKG_CONFIG_LINK_OPTIONS "-Wl,-weak_framework,UniformTypeIdentifiers")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_IOKIT)
|
||||
@@ -2433,25 +2434,17 @@ elseif(APPLE)
|
||||
if(SDL_FRAMEWORK_GAMECONTROLLER)
|
||||
find_library(GAMECONTROLLER GameController)
|
||||
if(GAMECONTROLLER)
|
||||
sdl_link_dependency(game_controller LIBS "$<LINK_LIBRARY:WEAK_FRAMEWORK,GameController>" PKG_CONFIG_LINK_OPTIONS "-Wl,-weak_framework,GameController")
|
||||
sdl_link_dependency(game_controller LIBS "$<LINK_LIBRARY:FRAMEWORK,GameController>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,GameController")
|
||||
endif()
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_METAL)
|
||||
if(IOS OR TVOS OR VISIONOS OR WATCHOS)
|
||||
sdl_link_dependency(metal LIBS "$<LINK_LIBRARY:FRAMEWORK,Metal>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,Metal")
|
||||
else()
|
||||
sdl_link_dependency(metal LIBS "$<LINK_LIBRARY:WEAK_FRAMEWORK,Metal>" PKG_CONFIG_LINK_OPTIONS "-Wl,-weak_framework,Metal")
|
||||
endif()
|
||||
sdl_link_dependency(metal LIBS "$<LINK_LIBRARY:FRAMEWORK,Metal>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,Metal")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_OPENGLES)
|
||||
sdl_link_dependency(opengles LIBS "$<LINK_LIBRARY:FRAMEWORK,OpenGLES>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,OpenGLES")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_QUARTZCORE)
|
||||
if(IOS OR TVOS OR VISIONOS OR WATCHOS)
|
||||
sdl_link_dependency(quartz_core LIBS "$<LINK_LIBRARY:FRAMEWORK,QuartzCore>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,QuartzCore")
|
||||
else()
|
||||
sdl_link_dependency(metal LIBS "$<LINK_LIBRARY:WEAK_FRAMEWORK,QuartzCore>" PKG_CONFIG_LINK_OPTIONS "-Wl,-weak_framework,QuartzCore")
|
||||
endif()
|
||||
sdl_link_dependency(quartz_core LIBS "$<LINK_LIBRARY:FRAMEWORK,QuartzCore>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,QuartzCore")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_UIKIT)
|
||||
sdl_link_dependency(ui_kit LIBS "$<LINK_LIBRARY:FRAMEWORK,UIKit>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,UIKit")
|
||||
@@ -2459,7 +2452,8 @@ elseif(APPLE)
|
||||
if(SDL_FRAMEWORK_COREHAPTICS)
|
||||
find_library(COREHAPTICS CoreHaptics)
|
||||
if(COREHAPTICS)
|
||||
sdl_link_dependency(core_haptics LIBS "$<LINK_LIBRARY:FRAMEWORK,CoreHaptics>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,CoreHaptics")
|
||||
# macOS 10.15+ iOS 13.0+ tvOS 14.0+
|
||||
sdl_link_dependency(core_haptics LIBS "$<LINK_LIBRARY:WEAK_FRAMEWORK,CoreHaptics>" PKG_CONFIG_LINK_OPTIONS "-Wl,-weak_framework,CoreHaptics")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -2919,7 +2913,7 @@ elseif(N3DS)
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/locale/n3ds/*.c")
|
||||
set(HAVE_SDL_LOCALE TRUE)
|
||||
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/file/n3ds/*.c")
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/io/n3ds/*.c")
|
||||
endif()
|
||||
|
||||
sdl_sources(${SDL3_SOURCE_DIR}/src/dialog/SDL_dialog.c)
|
||||
@@ -3252,7 +3246,6 @@ else()
|
||||
endif()
|
||||
|
||||
if(SDL_CLANG_TIDY)
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
find_program(CLANG_TIDY_BINARY clang-tidy)
|
||||
|
||||
if(CLANG_TIDY_BINARY)
|
||||
@@ -3337,8 +3330,8 @@ endif()
|
||||
set_source_files_properties(src/dynapi/SDL_dynapi.c PROPERTIES SKIP_PRECOMPILE_HEADERS 1)
|
||||
|
||||
set(SDL_FRAMEWORK_RESOURCES
|
||||
Xcode/SDL/pkg-support/resources/ReadMe.txt
|
||||
LICENSE.txt
|
||||
README.md
|
||||
)
|
||||
if(SDL_FRAMEWORK)
|
||||
sdl_sources(${SDL_FRAMEWORK_RESOURCES})
|
||||
@@ -3609,7 +3602,7 @@ if(sdl_cmake_modules)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${sdl_cmake_modules} "${SDL3_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
if(NOT SDL_DISABLE_INSTALL)
|
||||
if(SDL_INSTALL)
|
||||
|
||||
##### sdl3.pc #####
|
||||
configure_sdl3_pc()
|
||||
@@ -3709,7 +3702,7 @@ if(NOT SDL_DISABLE_INSTALL)
|
||||
install(FILES "LICENSE.txt" DESTINATION "${SDL_INSTALL_LICENSEDIR}")
|
||||
endif()
|
||||
|
||||
if(NOT SDL_DISABLE_INSTALL_CPACK)
|
||||
if(SDL_INSTALL_CPACK)
|
||||
if(SDL_FRAMEWORK)
|
||||
set(CPACK_GENERATOR "DragNDrop")
|
||||
elseif(MSVC)
|
||||
@@ -3750,7 +3743,7 @@ if(NOT SDL_DISABLE_INSTALL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT SDL_DISABLE_INSTALL_DOCS)
|
||||
if(SDL_INSTALL_DOCS)
|
||||
SDL_generate_manpages(
|
||||
HEADERS_DIR "${PROJECT_SOURCE_DIR}/include/SDL3"
|
||||
SYMBOL "SDL_Init"
|
||||
@@ -3767,7 +3760,7 @@ endif()
|
||||
|
||||
##### Uninstall target #####
|
||||
|
||||
if(NOT SDL_DISABLE_UNINSTALL)
|
||||
if(SDL_UNINSTALL)
|
||||
if(NOT TARGET uninstall)
|
||||
configure_file(cmake/cmake_uninstall.cmake.in cmake_uninstall.cmake IMMEDIATE @ONLY)
|
||||
|
||||
|
@@ -4,6 +4,10 @@ Thanks to everyone who made this possible, including:
|
||||
|
||||
- Cliff Matthews, for giving me a reason to start this project. :) -- Executor rocks! *grin*
|
||||
- Ryan Gordon for helping everybody out and keeping the dream alive. :)
|
||||
- Frank Praznik for his Wayland support and general windowing development.
|
||||
- Ozkan Sezer for sanity checks and make sure the i's are dotted and t's are crossed.
|
||||
- Anonymous Maarten for CMake support and build system development.
|
||||
- Evan Hemsley, Caleb Cornett, and Ethan Lee for SDL GPU development.
|
||||
- Gabriel Jacobo for his work on the Android port and generally helping out all around.
|
||||
- Philipp Wiesemann for his attention to detail reviewing the entire SDL code base and proposes patches.
|
||||
- Andreas Schiffler for his dedication to unit tests, Visual Studio projects, and managing the Google Summer of Code.
|
||||
@@ -24,7 +28,7 @@ Thanks to everyone who made this possible, including:
|
||||
- Holmes Futrell for his port of SDL to the iPhone and iPod Touch during the
|
||||
Google Summer of Code 2008.
|
||||
- Jon Atkins for SDL_image, SDL_mixer and SDL_net documentation.
|
||||
- Everybody at Loki Software, Inc. for their great contributions!
|
||||
- Everybody at Loki Software, Inc. and Valve Corporation for their great contributions!
|
||||
|
||||
And a big hand to everyone else who has contributed over the years.
|
||||
|
||||
|
77
INSTALL.md
77
INSTALL.md
@@ -1,72 +1,47 @@
|
||||
# To compile and install SDL:
|
||||
# To build and use SDL:
|
||||
|
||||
## Windows with Visual Studio:
|
||||
SDL supports a number of development environments:
|
||||
- [CMake](docs/INTRO-cmake.md)
|
||||
- [Visual Studio on Windows](docs/INTRO-visualstudio.md)
|
||||
- [Xcode on Apple platforms](docs/INTRO-xcode.md)
|
||||
- [Android Studio](docs/INTRO-androidstudio.md)
|
||||
- [Emscripten for web](docs/INTRO-emscripten.md)
|
||||
|
||||
Read ./docs/README-visualc.md
|
||||
SDL is also usable in other environments. The basic steps are to use CMake to build the library and then use the headers and library that you built in your project. You can search online to see if anyone has specific steps for your setup.
|
||||
|
||||
## Windows building with mingw-w64 for x86:
|
||||
# Documentation
|
||||
|
||||
Read [README-windows.md](docs/README-windows.md) for more information on building with MinGW64.
|
||||
An API reference, tutorials, and additional documentation is available at:
|
||||
|
||||
Run: `cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=build-scripts/cmake-toolchain-mingw64-i686.cmake && cmake --build build && cmake --install build`
|
||||
|
||||
## Windows building with mingw-w64 for x64:
|
||||
|
||||
Read [README-windows.md](docs/README-windows.md).
|
||||
|
||||
Run: `cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=build-scripts/cmake-toolchain-mingw64-x86_64.cmake && cmake --build build && cmake --install build`
|
||||
|
||||
## macOS with Xcode:
|
||||
|
||||
Read docs/README-macos.md
|
||||
|
||||
## macOS from the command line:
|
||||
|
||||
Run: `cmake -S . -B build && cmake --build build && cmake --install build`
|
||||
|
||||
### macOS for universal architecture:
|
||||
|
||||
Run: `cmake -S . -B build -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" && cmake --build build && cmake --install build`
|
||||
|
||||
## Linux and other UNIX systems:
|
||||
|
||||
Run: `cmake -S . -B build && cmake --build build --parallel $(nproc) && cmake --install build`
|
||||
|
||||
## Android:
|
||||
|
||||
Read docs/README-android.md
|
||||
|
||||
## iOS:
|
||||
|
||||
Read docs/README-ios.md
|
||||
|
||||
## Using CMake:
|
||||
|
||||
Read docs/README-cmake.md
|
||||
https://wiki.libsdl.org/SDL3
|
||||
|
||||
# Example code
|
||||
|
||||
Look at the example programs in ./test, and check out the online
|
||||
documentation at https://wiki.libsdl.org/SDL3/
|
||||
There are simple example programs in the examples directory, and you can view them online at:
|
||||
|
||||
# Discussion
|
||||
https://examples.libsdl.org/SDL3
|
||||
|
||||
More in-depth test programs are available in the tests directory and can be built by adding `-DSDL_TESTS=ON` to the CMake command line when building SDL.
|
||||
|
||||
# Discussions
|
||||
|
||||
## Discord
|
||||
|
||||
You can join the official Discord server at:
|
||||
|
||||
https://discord.com/invite/BwpFGBWsv8
|
||||
|
||||
## Forums/mailing lists
|
||||
|
||||
Join the SDL developer discussions, sign up on
|
||||
You can join SDL development discussions at:
|
||||
|
||||
https://discourse.libsdl.org/
|
||||
|
||||
and go to the development forum
|
||||
|
||||
https://discourse.libsdl.org/c/sdl-development/6
|
||||
|
||||
Once you sign up, you can use the forum through the website, or as a mailing
|
||||
list from your email client.
|
||||
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
|
||||
|
||||
## Announcement list
|
||||
|
||||
Sign up for the announcement list through the web interface:
|
||||
You can sign up for the low traffic announcement list at:
|
||||
|
||||
https://www.libsdl.org/mailing-list.php
|
||||
|
||||
|
@@ -1,13 +0,0 @@
|
||||
|
||||
Please distribute this file with the SDL runtime environment:
|
||||
|
||||
The Simple DirectMedia Layer (SDL for short) is a cross-platform library
|
||||
designed to make it easy to write multi-media software, such as games
|
||||
and emulators.
|
||||
|
||||
The Simple DirectMedia Layer library source code is available from:
|
||||
https://www.libsdl.org/
|
||||
|
||||
This library is distributed under the terms of the zlib license:
|
||||
http://www.zlib.net/zlib_license.html
|
||||
|
16
README.md
16
README.md
@@ -1,16 +1,16 @@
|
||||
|
||||
# Simple DirectMedia Layer (SDL) Version 3.0
|
||||
Simple DirectMedia Layer (SDL for short) is a cross-platform library
|
||||
designed to make it easy to write multi-media software, such as games
|
||||
and emulators.
|
||||
|
||||
You can find the latest release and additional information at:
|
||||
https://www.libsdl.org/
|
||||
|
||||
Simple DirectMedia Layer is a cross-platform development library designed
|
||||
to provide low level access to audio, keyboard, mouse, joystick, and graphics
|
||||
hardware. It is used by video playback software, emulators, and popular games
|
||||
including Valve's award winning catalog and many Humble Bundle games.
|
||||
Installation instructions and a quick introduction is available in
|
||||
[INSTALL.md](INSTALL.md)
|
||||
|
||||
More extensive documentation is available in the docs directory, starting
|
||||
with [README.md](docs/README.md). If you are migrating to SDL 3.0 from SDL 2.0,
|
||||
the changes are extensively documented in [README-migration.md](docs/README-migration.md).
|
||||
This library is distributed under the terms of the zlib license,
|
||||
available in [LICENSE.txt](LICENSE.txt).
|
||||
|
||||
Enjoy!
|
||||
|
||||
|
@@ -441,8 +441,8 @@
|
||||
<ClInclude Include="..\..\src\events\SDL_windowevents_c.h" />
|
||||
<ClInclude Include="..\..\src\filesystem\SDL_sysfilesystem.h" />
|
||||
<ClInclude Include="..\..\src\gpu\SDL_sysgpu.h" />
|
||||
<ClInclude Include="..\..\src\file\SDL_asyncio_c.h" />
|
||||
<ClInclude Include="..\..\src\file\SDL_sysasyncio.h" />
|
||||
<ClInclude Include="..\..\src\io\SDL_asyncio_c.h" />
|
||||
<ClInclude Include="..\..\src\io\SDL_sysasyncio.h" />
|
||||
<ClInclude Include="..\..\src\haptic\SDL_haptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\SDL_syshaptic.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
|
||||
@@ -529,9 +529,9 @@
|
||||
<ClCompile Include="..\..\src\dialog\SDL_dialog_utils.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\SDL_filesystem.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfsops.c" />
|
||||
<ClCompile Include="..\..\src\file\generic\SDL_asyncio_generic.c" />
|
||||
<ClCompile Include="..\..\src\file\SDL_asyncio.c" />
|
||||
<ClCompile Include="..\..\src\file\windows\SDL_asyncio_windows_ioring.c" />
|
||||
<ClCompile Include="..\..\src\io\generic\SDL_asyncio_generic.c" />
|
||||
<ClCompile Include="..\..\src\io\SDL_asyncio.c" />
|
||||
<ClCompile Include="..\..\src\io\windows\SDL_asyncio_windows_ioring.c" />
|
||||
<ClCompile Include="..\..\src\main\gdk\SDL_sysmain_runapp.cpp" />
|
||||
<ClCompile Include="..\..\src\main\generic\SDL_sysmain_callbacks.c" />
|
||||
<ClCompile Include="..\..\src\main\SDL_main_callbacks.c" />
|
||||
@@ -673,7 +673,7 @@
|
||||
<ClCompile Include="..\..\src\events\SDL_quit.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_touch.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
|
||||
<ClCompile Include="..\..\src\file\SDL_iostream.c" />
|
||||
<ClCompile Include="..\..\src\io\SDL_iostream.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\gdk\SDL_sysfilesystem.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">true</ExcludedFromBuild>
|
||||
|
@@ -45,7 +45,7 @@
|
||||
<ClCompile Include="..\..\src\events\SDL_quit.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_touch.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
|
||||
<ClCompile Include="..\..\src\file\SDL_iostream.c" />
|
||||
<ClCompile Include="..\..\src\io\SDL_iostream.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\gdk\SDL_sysfilesystem.cpp" />
|
||||
<ClCompile Include="..\..\src\gpu\SDL_gpu.c" />
|
||||
<ClCompile Include="..\..\src\gpu\d3d12\SDL_gpu_d3d12.c" />
|
||||
@@ -204,9 +204,9 @@
|
||||
<ClCompile Include="..\..\src\dialog\SDL_dialog_utils.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\SDL_filesystem.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfsops.c" />
|
||||
<ClCompile Include="..\..\src\file\generic\SDL_asyncio_generic.c" />
|
||||
<ClCompile Include="..\..\src\file\SDL_asyncio.c" />
|
||||
<ClCompile Include="..\..\src\file\windows\SDL_asyncio_windows_ioring.c" />
|
||||
<ClCompile Include="..\..\src\io\generic\SDL_asyncio_generic.c" />
|
||||
<ClCompile Include="..\..\src\io\SDL_asyncio.c" />
|
||||
<ClCompile Include="..\..\src\io\windows\SDL_asyncio_windows_ioring.c" />
|
||||
<ClCompile Include="..\..\src\dialog\dummy\SDL_dummydialog.c" />
|
||||
<ClCompile Include="..\..\src\dialog\windows\SDL_windowsdialog.c" />
|
||||
<ClCompile Include="..\..\src\render\gpu\SDL_pipeline_gpu.c" />
|
||||
@@ -466,8 +466,8 @@
|
||||
<ClInclude Include="..\..\src\camera\SDL_camera_c.h" />
|
||||
<ClInclude Include="..\..\src\camera\SDL_syscamera.h" />
|
||||
<ClInclude Include="..\..\src\filesystem\SDL_sysfilesystem.h" />
|
||||
<ClInclude Include="..\..\src\file\SDL_asyncio_c.h" />
|
||||
<ClInclude Include="..\..\src\file\SDL_sysasyncio.h" />
|
||||
<ClInclude Include="..\..\src\io\SDL_asyncio_c.h" />
|
||||
<ClInclude Include="..\..\src\io\SDL_sysasyncio.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_common.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_internal.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.h" />
|
||||
|
@@ -198,7 +198,7 @@ LoadSprite(const char *file)
|
||||
return -1;
|
||||
}
|
||||
if (!SDL_SetTextureBlendMode(sprites[i], blendMode)) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set blend mode: %s\n", SDL_GetError());
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set blend mode: %s", SDL_GetError());
|
||||
SDL_DestroyTexture(sprites[i]);
|
||||
return -1;
|
||||
}
|
||||
@@ -405,7 +405,7 @@ main(int argc, char *argv[])
|
||||
sprites =
|
||||
(SDL_Texture **) SDL_malloc(state->num_windows * sizeof(*sprites));
|
||||
if (!sprites) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!");
|
||||
quit(2);
|
||||
}
|
||||
for (i = 0; i < state->num_windows; ++i) {
|
||||
@@ -420,13 +420,13 @@ main(int argc, char *argv[])
|
||||
soundname = GetResourceFilename(argc > 1 ? argv[1] : NULL, "sample.wav");
|
||||
|
||||
if (!soundname) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "%s\n", SDL_GetError());
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "%s", SDL_GetError());
|
||||
quit(1);
|
||||
}
|
||||
|
||||
/* Load the wave file into memory */
|
||||
if (!SDL_LoadWAV(soundname, &wave.spec, &wave.sound, &wave.soundlen)) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", soundname, SDL_GetError());
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s", soundname, SDL_GetError());
|
||||
quit(1);
|
||||
}
|
||||
|
||||
@@ -436,11 +436,11 @@ main(int argc, char *argv[])
|
||||
SDL_Log("%i: %s", i, SDL_GetAudioDriver(i));
|
||||
}
|
||||
|
||||
SDL_Log("Using audio driver: %s\n", SDL_GetCurrentAudioDriver());
|
||||
SDL_Log("Using audio driver: %s", SDL_GetCurrentAudioDriver());
|
||||
|
||||
stream = SDL_OpenAudioDeviceStream(SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, &wave.spec, NULL, NULL);
|
||||
if (!stream) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create audio stream: %s\n", SDL_GetError());
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create audio stream: %s", SDL_GetError());
|
||||
return -1;
|
||||
}
|
||||
SDL_ResumeAudioDevice(SDL_GetAudioStreamDevice(stream));
|
||||
|
@@ -356,8 +356,8 @@
|
||||
<ClInclude Include="..\..\src\filesystem\SDL_sysfilesystem.h" />
|
||||
<ClInclude Include="..\..\src\gpu\SDL_sysgpu.h" />
|
||||
<ClInclude Include="..\..\src\gpu\vulkan\SDL_gpu_vulkan_vkfuncs.h" />
|
||||
<ClInclude Include="..\..\src\file\SDL_asyncio_c.h" />
|
||||
<ClInclude Include="..\..\src\file\SDL_sysasyncio.h" />
|
||||
<ClInclude Include="..\..\src\io\SDL_asyncio_c.h" />
|
||||
<ClInclude Include="..\..\src\io\SDL_sysasyncio.h" />
|
||||
<ClInclude Include="..\..\src\haptic\SDL_haptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\SDL_syshaptic.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
|
||||
@@ -419,12 +419,12 @@
|
||||
<ClCompile Include="..\..\src\dialog\SDL_dialog_utils.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\SDL_filesystem.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfsops.c" />
|
||||
<ClCompile Include="..\..\src\file\windows\SDL_asyncio_windows_ioring.c" />
|
||||
<ClCompile Include="..\..\src\io\windows\SDL_asyncio_windows_ioring.c" />
|
||||
<ClCompile Include="..\..\src\gpu\SDL_gpu.c" />
|
||||
<ClCompile Include="..\..\src\gpu\d3d12\SDL_gpu_d3d12.c" />
|
||||
<ClCompile Include="..\..\src\gpu\vulkan\SDL_gpu_vulkan.c" />
|
||||
<ClCompile Include="..\..\src\file\generic\SDL_asyncio_generic.c" />
|
||||
<ClCompile Include="..\..\src\file\SDL_asyncio.c" />
|
||||
<ClCompile Include="..\..\src\io\generic\SDL_asyncio_generic.c" />
|
||||
<ClCompile Include="..\..\src\io\SDL_asyncio.c" />
|
||||
<ClCompile Include="..\..\src\main\generic\SDL_sysmain_callbacks.c" />
|
||||
<ClCompile Include="..\..\src\main\SDL_main_callbacks.c" />
|
||||
<ClCompile Include="..\..\src\main\SDL_runapp.c" />
|
||||
@@ -557,7 +557,7 @@
|
||||
<ClCompile Include="..\..\src\events\SDL_quit.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_touch.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
|
||||
<ClCompile Include="..\..\src\file\SDL_iostream.c" />
|
||||
<ClCompile Include="..\..\src\io\SDL_iostream.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c" />
|
||||
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
|
||||
|
@@ -25,7 +25,7 @@
|
||||
<Filter Include="events">
|
||||
<UniqueIdentifier>{5e27e19f-b3f8-4e2d-b323-b00b2040ec86}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="file">
|
||||
<Filter Include="io">
|
||||
<UniqueIdentifier>{a3ab9cff-8495-4a5c-8af6-27e43199a712}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="filesystem">
|
||||
@@ -211,10 +211,10 @@
|
||||
<Filter Include="main\windows">
|
||||
<UniqueIdentifier>{00009d5ded166cc6c6680ec771a30000}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="file\generic">
|
||||
<Filter Include="io\generic">
|
||||
<UniqueIdentifier>{00004d6806b6238cae0ed62db5440000}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="file\windows">
|
||||
<Filter Include="io\windows">
|
||||
<UniqueIdentifier>{000028b2ea36d7190d13777a4dc70000}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
@@ -447,11 +447,11 @@
|
||||
<ClInclude Include="..\..\src\filesystem\SDL_sysfilesystem.h">
|
||||
<Filter>filesystem</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\file\SDL_asyncio_c.h">
|
||||
<Filter>file</Filter>
|
||||
<ClInclude Include="..\..\src\io\SDL_asyncio_c.h">
|
||||
<Filter>io</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\file\SDL_sysasyncio.h">
|
||||
<Filter>file</Filter>
|
||||
<ClInclude Include="..\..\src\io\SDL_sysasyncio.h">
|
||||
<Filter>io</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\main\SDL_main_callbacks.h">
|
||||
<Filter>main</Filter>
|
||||
@@ -965,14 +965,14 @@
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfsops.c">
|
||||
<Filter>filesystem\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\file\generic\SDL_asyncio_generic.c">
|
||||
<Filter>file\generic</Filter>
|
||||
<ClCompile Include="..\..\src\io\generic\SDL_asyncio_generic.c">
|
||||
<Filter>io\generic</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\file\SDL_asyncio.c">
|
||||
<Filter>file</Filter>
|
||||
<ClCompile Include="..\..\src\io\SDL_asyncio.c">
|
||||
<Filter>io</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\file\windows\SDL_asyncio_windows_ioring.c">
|
||||
<Filter>file\windows</Filter>
|
||||
<ClCompile Include="..\..\src\io\windows\SDL_asyncio_windows_ioring.c">
|
||||
<Filter>io\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\main\generic\SDL_sysmain_callbacks.c">
|
||||
<Filter>main\generic</Filter>
|
||||
@@ -1085,8 +1085,8 @@
|
||||
<ClCompile Include="..\..\src\events\SDL_windowevents.c">
|
||||
<Filter>events</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\file\SDL_iostream.c">
|
||||
<Filter>file</Filter>
|
||||
<ClCompile Include="..\..\src\io\SDL_iostream.c">
|
||||
<Filter>io</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c">
|
||||
<Filter>filesystem\windows</Filter>
|
||||
|
25
WhatsNew.txt
25
WhatsNew.txt
@@ -2,32 +2,13 @@
|
||||
This is a list of major changes in SDL's version history.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
3.1.0:
|
||||
3.2.0:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
This is a preview release of the new SDL 3.0 API.
|
||||
|
||||
The ABI hasn't been locked down yet, but it's fairly stable and feedback is welcome!
|
||||
|
||||
Check out [migration guide](docs/README-migration.md) for details on API changes since SDL 2.0, and tips on transitioning your code from SDL2 code to SDL3.
|
||||
|
||||
There have been too many changes to list them all, but here are some of the highlights:
|
||||
* The API has been significantly reworked to be easier to use and more consistent
|
||||
* The 2D rendering API now has support for more advanced colorspaces and HDR rendering
|
||||
* The 2D rendering API now has a Vulkan backend
|
||||
* An example of hardware accelerated video playback using ffmpeg has been added in test/testffmpeg.c
|
||||
* The shaped window API has been replaced with transparent windows
|
||||
* Time and date functions have been added in SDL_time.h
|
||||
* Support for webcam video recording has been added in SDL_camera.h
|
||||
* Support for handling pens and tablets has been added in SDL_pen.h
|
||||
* Support for file open and save dialogs has been added in SDL_dialog.h
|
||||
* Cross-platform functions for working with files and directories are available in SDL_filesystem.h
|
||||
* A cross-platform abstraction for working with user and game data has been added in SDL_storage.h
|
||||
* Handling of main() has been moved to a header library and an optional callback-based program flow is available
|
||||
* Support for simple object properties has been added in SDL_properties.h. These properties are available on many SDL objects, and can be used for more advanced functionality.
|
||||
|
||||
Please let us know about issues and feedback at: https://github.com/libsdl-org/SDL/issues
|
||||
https://wiki.libsdl.org/SDL3/NewFeatures
|
||||
|
||||
The development team is focused on code, moving towards the final release, and we would love volunteers to help improve the documentation. Please send e-mail to slouken@libsdl.org if you'd like to help out!
|
||||
|
||||
Finally, a giant thank you to all the people who have contributed code and feedback to the SDL 3.0 improvements!
|
||||
Thank you to all the people who have contributed code and feedback to the SDL 3.0 release!
|
||||
|
@@ -19,10 +19,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.1.8</string>
|
||||
<string>3.2.2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>3.1.8</string>
|
||||
<string>3.2.2</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@@ -46,21 +46,22 @@
|
||||
000098E9DAA43EF6FF7F0000 /* SDL_camera.c in Sources */ = {isa = PBXBuildFile; fileRef = 0000035D38C3899C7EFD0000 /* SDL_camera.c */; };
|
||||
0000A03C0F32C43816F40000 /* SDL_asyncio_windows_ioring.c in Sources */ = {isa = PBXBuildFile; fileRef = 000030DD21496B5C0F210000 /* SDL_asyncio_windows_ioring.c */; };
|
||||
0000A4DA2F45A31DC4F00000 /* SDL_sysmain_callbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 0000BB287BA0A0178C1A0000 /* SDL_sysmain_callbacks.m */; };
|
||||
0000A877C7DB9FA935FC0000 /* SDL_uikitpen.m in Sources */ = {isa = PBXBuildFile; fileRef = 000053D344416737F6050000 /* SDL_uikitpen.m */; };
|
||||
0000AEB9AE90228CA2D60000 /* SDL_asyncio.c in Sources */ = {isa = PBXBuildFile; fileRef = 00003928A612EC33D42C0000 /* SDL_asyncio.c */; };
|
||||
0000D5B526B85DE7AB1C0000 /* SDL_cocoapen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0000CCA310B73A7B59910000 /* SDL_cocoapen.m */; };
|
||||
007317A40858DECD00B2BC32 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179D0858DECD00B2BC32 /* Cocoa.framework */; platformFilters = (macos, ); };
|
||||
007317A60858DECD00B2BC32 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179F0858DECD00B2BC32 /* IOKit.framework */; platformFilters = (ios, maccatalyst, macos, ); };
|
||||
00CFA89D106B4BA100758660 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFA89C106B4BA100758660 /* ForceFeedback.framework */; platformFilters = (macos, ); };
|
||||
00D0D08410675DD9004B05EF /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00D0D08310675DD9004B05EF /* CoreFoundation.framework */; platformFilters = (ios, maccatalyst, macos, tvos, watchos, ); };
|
||||
00D0D08410675DD9004B05EF /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00D0D08310675DD9004B05EF /* CoreFoundation.framework */; platformFilters = (ios, maccatalyst, macos, tvos, ); settings = {ATTRIBUTES = (Required, ); }; };
|
||||
00D0D0D810675E46004B05EF /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007317C10858E15000B2BC32 /* Carbon.framework */; platformFilters = (macos, ); };
|
||||
1485C3312BBA4AF30063985B /* UniformTypeIdentifiers.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1485C32F2BBA4A0C0063985B /* UniformTypeIdentifiers.framework */; platformFilters = (maccatalyst, macos, ); settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
557D0CFA254586CA003913E3 /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F37DC5F225350EBC0002E6F7 /* CoreHaptics.framework */; platformFilters = (ios, maccatalyst, macos, tvos, ); };
|
||||
557D0CFB254586D7003913E3 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A75FDABD23E28B6200529352 /* GameController.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
557D0CFA254586CA003913E3 /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F37DC5F225350EBC0002E6F7 /* CoreHaptics.framework */; platformFilters = (ios, maccatalyst, macos, tvos, ); settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
557D0CFB254586D7003913E3 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A75FDABD23E28B6200529352 /* GameController.framework */; settings = {ATTRIBUTES = (Required, ); }; };
|
||||
5616CA4C252BB2A6005D5928 /* SDL_url.c in Sources */ = {isa = PBXBuildFile; fileRef = 5616CA49252BB2A5005D5928 /* SDL_url.c */; };
|
||||
5616CA4D252BB2A6005D5928 /* SDL_sysurl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5616CA4A252BB2A6005D5928 /* SDL_sysurl.h */; };
|
||||
5616CA4E252BB2A6005D5928 /* SDL_sysurl.m in Sources */ = {isa = PBXBuildFile; fileRef = 5616CA4B252BB2A6005D5928 /* SDL_sysurl.m */; };
|
||||
564624361FF821C20074AC87 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 564624351FF821B80074AC87 /* QuartzCore.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
564624381FF821DA0074AC87 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 564624371FF821CB0074AC87 /* Metal.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
564624361FF821C20074AC87 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 564624351FF821B80074AC87 /* QuartzCore.framework */; settings = {ATTRIBUTES = (Required, ); }; };
|
||||
564624381FF821DA0074AC87 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 564624371FF821CB0074AC87 /* Metal.framework */; settings = {ATTRIBUTES = (Required, ); }; };
|
||||
566E26CF246274CC00718109 /* SDL_syslocale.m in Sources */ = {isa = PBXBuildFile; fileRef = 566E26CC246274CB00718109 /* SDL_syslocale.m */; };
|
||||
566E26D8246274CC00718109 /* SDL_locale.c in Sources */ = {isa = PBXBuildFile; fileRef = 566E26CD246274CB00718109 /* SDL_locale.c */; };
|
||||
566E26E1246274CC00718109 /* SDL_syslocale.h in Headers */ = {isa = PBXBuildFile; fileRef = 566E26CE246274CC00718109 /* SDL_syslocale.h */; };
|
||||
@@ -75,11 +76,9 @@
|
||||
A1626A522617008D003F1973 /* SDL_triangle.h in Headers */ = {isa = PBXBuildFile; fileRef = A1626A512617008C003F1973 /* SDL_triangle.h */; };
|
||||
A1BB8B6327F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
|
||||
A1BB8B6C27F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
|
||||
A7381E961D8B69D600B177DD /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E951D8B69D600B177DD /* CoreAudio.framework */; platformFilters = (ios, maccatalyst, macos, tvos, watchos, ); };
|
||||
A7381E961D8B69D600B177DD /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E951D8B69D600B177DD /* CoreAudio.framework */; platformFilters = (ios, maccatalyst, macos, tvos, ); settings = {ATTRIBUTES = (Required, ); }; };
|
||||
A7381E971D8B6A0300B177DD /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E931D8B69C300B177DD /* AudioToolbox.framework */; platformFilters = (ios, maccatalyst, macos, tvos, ); };
|
||||
A75FDB5823E39E6100529352 /* hidapi.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDB5723E39E6100529352 /* hidapi.h */; };
|
||||
A75FDBB723E4CBC700529352 /* License.txt in Resources */ = {isa = PBXBuildFile; fileRef = 00794D3F09D0C461003FC8A1 /* License.txt */; };
|
||||
A75FDBB823E4CBC700529352 /* ReadMe.txt in Resources */ = {isa = PBXBuildFile; fileRef = F59C710300D5CB5801000001 /* ReadMe.txt */; };
|
||||
A75FDBC523EA380300529352 /* SDL_hidapi_rumble.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDBC323EA380300529352 /* SDL_hidapi_rumble.h */; };
|
||||
A75FDBCE23EA380300529352 /* SDL_hidapi_rumble.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDBC423EA380300529352 /* SDL_hidapi_rumble.c */; };
|
||||
A79745702B2E9D39009D224A /* SDL_hidapi_steamdeck.c in Sources */ = {isa = PBXBuildFile; fileRef = A797456F2B2E9D39009D224A /* SDL_hidapi_steamdeck.c */; };
|
||||
@@ -385,6 +384,9 @@
|
||||
F32DDAD42AB795A30041EAA5 /* SDL_audioresample.c in Sources */ = {isa = PBXBuildFile; fileRef = F32DDACE2AB795A30041EAA5 /* SDL_audioresample.c */; };
|
||||
F338A1182D1B37D8007CDFDF /* SDL_tray.m in Sources */ = {isa = PBXBuildFile; fileRef = F338A1172D1B37D8007CDFDF /* SDL_tray.m */; };
|
||||
F338A11A2D1B37E4007CDFDF /* SDL_tray.c in Sources */ = {isa = PBXBuildFile; fileRef = F338A1192D1B37E4007CDFDF /* SDL_tray.c */; };
|
||||
F34400342D40217A003F26D7 /* LICENSE.txt in Resources */ = {isa = PBXBuildFile; fileRef = F373DA182D388A1E002158FA /* LICENSE.txt */; };
|
||||
F34400362D40217A003F26D7 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = F373DA192D388A1E002158FA /* README.md */; };
|
||||
F344003D2D4022E1003F26D7 /* INSTALL.md in Resources */ = {isa = PBXBuildFile; fileRef = F344003C2D4022E1003F26D7 /* INSTALL.md */; };
|
||||
F34B9895291DEFF500AAC96E /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDAAC23E2795C00529352 /* SDL_hidapi_steam.c */; };
|
||||
F362B9192B3349E200D30B94 /* controller_list.h in Headers */ = {isa = PBXBuildFile; fileRef = F362B9152B3349E200D30B94 /* controller_list.h */; };
|
||||
F362B91A2B3349E200D30B94 /* SDL_gamepad_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F362B9162B3349E200D30B94 /* SDL_gamepad_c.h */; };
|
||||
@@ -529,9 +531,7 @@
|
||||
F3FA5A252B59ACE000FEAD97 /* yuv_rgb_common.h in Headers */ = {isa = PBXBuildFile; fileRef = F3FA5A1C2B59ACE000FEAD97 /* yuv_rgb_common.h */; };
|
||||
F3FD042E2C9B755700824C4C /* SDL_hidapi_nintendo.h in Headers */ = {isa = PBXBuildFile; fileRef = F3FD042C2C9B755700824C4C /* SDL_hidapi_nintendo.h */; };
|
||||
F3FD042F2C9B755700824C4C /* SDL_hidapi_steam_hori.c in Sources */ = {isa = PBXBuildFile; fileRef = F3FD042D2C9B755700824C4C /* SDL_hidapi_steam_hori.c */; };
|
||||
FA73671D19A540EF004122E4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA73671C19A540EF004122E4 /* CoreVideo.framework */; platformFilters = (ios, maccatalyst, macos, tvos, watchos, ); };
|
||||
000012E88BE7D71B274A0000 /* SDL_uikitpen.h in Headers */ = {isa = PBXBuildFile; fileRef = 000063D3D80F97ADC7770000 /* SDL_uikitpen.h */; };
|
||||
0000A877C7DB9FA935FC0000 /* SDL_uikitpen.m in Sources */ = {isa = PBXBuildFile; fileRef = 000053D344416737F6050000 /* SDL_uikitpen.m */; };
|
||||
FA73671D19A540EF004122E4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA73671C19A540EF004122E4 /* CoreVideo.framework */; platformFilters = (ios, maccatalyst, macos, tvos, ); settings = {ATTRIBUTES = (Required, ); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@@ -565,9 +565,11 @@
|
||||
00003260407E1002EAC10000 /* SDL_main_callbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_main_callbacks.h; sourceTree = "<group>"; };
|
||||
00003928A612EC33D42C0000 /* SDL_asyncio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_asyncio.c; sourceTree = "<group>"; };
|
||||
00003F472C51CE7DF6160000 /* SDL_systime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systime.c; sourceTree = "<group>"; };
|
||||
000053D344416737F6050000 /* SDL_uikitpen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_uikitpen.m; sourceTree = "<group>"; };
|
||||
0000585B2CAB450B40540000 /* SDL_sysasyncio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sysasyncio.h; sourceTree = "<group>"; };
|
||||
00005BD74B46358B33A20000 /* SDL_camera_dummy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_camera_dummy.c; sourceTree = "<group>"; };
|
||||
00005D3EB902478835E20000 /* SDL_syscamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_syscamera.h; sourceTree = "<group>"; };
|
||||
000063D3D80F97ADC7770000 /* SDL_uikitpen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitpen.h; sourceTree = "<group>"; };
|
||||
0000641A9BAC11AB3FBE0000 /* SDL_time.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_time.c; sourceTree = "<group>"; };
|
||||
000078E1881E857EBB6C0000 /* SDL_hashtable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hashtable.c; sourceTree = "<group>"; };
|
||||
00008B79BF08CBCEAC460000 /* SDL_camera_coremedia.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_camera_coremedia.m; sourceTree = "<group>"; };
|
||||
@@ -583,7 +585,6 @@
|
||||
0073179D0858DECD00B2BC32 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
0073179F0858DECD00B2BC32 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
|
||||
007317C10858E15000B2BC32 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
|
||||
00794D3F09D0C461003FC8A1 /* License.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = License.txt; sourceTree = "<group>"; };
|
||||
00CFA89C106B4BA100758660 /* ForceFeedback.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ForceFeedback.framework; path = System/Library/Frameworks/ForceFeedback.framework; sourceTree = SDKROOT; };
|
||||
00D0D08310675DD9004B05EF /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
|
||||
1485C32F2BBA4A0C0063985B /* UniformTypeIdentifiers.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UniformTypeIdentifiers.framework; path = System/Library/Frameworks/UniformTypeIdentifiers.framework; sourceTree = SDKROOT; };
|
||||
@@ -931,6 +932,7 @@
|
||||
F32DDACE2AB795A30041EAA5 /* SDL_audioresample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_audioresample.c; sourceTree = "<group>"; };
|
||||
F338A1172D1B37D8007CDFDF /* SDL_tray.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDL_tray.m; sourceTree = "<group>"; };
|
||||
F338A1192D1B37E4007CDFDF /* SDL_tray.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SDL_tray.c; sourceTree = "<group>"; };
|
||||
F344003C2D4022E1003F26D7 /* INSTALL.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = INSTALL.md; sourceTree = "<group>"; };
|
||||
F362B9152B3349E200D30B94 /* controller_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = controller_list.h; sourceTree = "<group>"; };
|
||||
F362B9162B3349E200D30B94 /* SDL_gamepad_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamepad_c.h; sourceTree = "<group>"; };
|
||||
F362B9172B3349E200D30B94 /* SDL_steam_virtual_gamepad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_steam_virtual_gamepad.h; sourceTree = "<group>"; };
|
||||
@@ -940,6 +942,9 @@
|
||||
F36C342F2C0F876500991150 /* SDL_offscreenvulkan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_offscreenvulkan.h; sourceTree = "<group>"; };
|
||||
F36C34302C0F876500991150 /* SDL_offscreenvulkan.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_offscreenvulkan.c; sourceTree = "<group>"; };
|
||||
F36C7AD0294BA009004D61C3 /* SDL_runapp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_runapp.c; sourceTree = "<group>"; };
|
||||
F373DA172D3889EE002158FA /* INSTALL.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = INSTALL.md; sourceTree = "<group>"; };
|
||||
F373DA182D388A1E002158FA /* LICENSE.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = LICENSE.txt; path = ../../../../LICENSE.txt; sourceTree = "<group>"; };
|
||||
F373DA192D388A1E002158FA /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../../../../README.md; sourceTree = "<group>"; };
|
||||
F376F6182559B29300CFC0BC /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.1.sdk/System/Library/Frameworks/OpenGLES.framework; sourceTree = DEVELOPER_DIR; };
|
||||
F376F61A2559B2AF00CFC0BC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/iOSSupport/System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
F376F6312559B31D00CFC0BC /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/iOSSupport/System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; };
|
||||
@@ -1090,12 +1095,9 @@
|
||||
F3FA5A1C2B59ACE000FEAD97 /* yuv_rgb_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yuv_rgb_common.h; sourceTree = "<group>"; };
|
||||
F3FD042C2C9B755700824C4C /* SDL_hidapi_nintendo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_hidapi_nintendo.h; sourceTree = "<group>"; };
|
||||
F3FD042D2C9B755700824C4C /* SDL_hidapi_steam_hori.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_steam_hori.c; sourceTree = "<group>"; };
|
||||
F59C710300D5CB5801000001 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ReadMe.txt; sourceTree = "<group>"; };
|
||||
F59C710600D5CB5801000001 /* SDL.info */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SDL.info; sourceTree = "<group>"; };
|
||||
F5A2EF3900C6A39A01000001 /* BUGS.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = BUGS.txt; path = ../../BUGS.txt; sourceTree = SOURCE_ROOT; };
|
||||
FA73671C19A540EF004122E4 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
|
||||
000063D3D80F97ADC7770000 /* SDL_uikitpen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_uikitpen.h; path = SDL_uikitpen.h; sourceTree = "<group>"; };
|
||||
000053D344416737F6050000 /* SDL_uikitpen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_uikitpen.m; path = SDL_uikitpen.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -1333,7 +1335,7 @@
|
||||
F37E18542BA50EB40098C111 /* dialog */,
|
||||
A7D8A5D723E2513D00DCD162 /* dynapi */,
|
||||
A7D8A92923E2514000DCD162 /* events */,
|
||||
A7D8A7DA23E2513E00DCD162 /* file */,
|
||||
A7D8A7DA23E2513E00DCD162 /* io */,
|
||||
A7D8A7F623E2513F00DCD162 /* filesystem */,
|
||||
E4F257872C81903800FCEAFC /* gpu */,
|
||||
A7D8A5C223E2513D00DCD162 /* haptic */,
|
||||
@@ -1920,7 +1922,7 @@
|
||||
path = darwin;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A7D8A7DA23E2513E00DCD162 /* file */ = {
|
||||
A7D8A7DA23E2513E00DCD162 /* io */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A7D8A7DB23E2513F00DCD162 /* SDL_iostream.c */,
|
||||
@@ -1930,7 +1932,7 @@
|
||||
000013C0F2EADC24ADC10000 /* generic */,
|
||||
000064F9A2AAE947C1CD0000 /* windows */,
|
||||
);
|
||||
path = file;
|
||||
path = io;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A7D8A7DF23E2513F00DCD162 /* power */ = {
|
||||
@@ -2313,6 +2315,14 @@
|
||||
path = cocoa;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F344003B2D40229E003F26D7 /* framework */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F344003C2D4022E1003F26D7 /* INSTALL.md */,
|
||||
);
|
||||
path = framework;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F36C7ACF294B9F5E004D61C3 /* core */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -2410,9 +2420,11 @@
|
||||
F59C710100D5CB5801000001 /* resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F344003B2D40229E003F26D7 /* framework */,
|
||||
F37A8E1928405AA100C38E95 /* CMake */,
|
||||
00794D3F09D0C461003FC8A1 /* License.txt */,
|
||||
F59C710300D5CB5801000001 /* ReadMe.txt */,
|
||||
F373DA182D388A1E002158FA /* LICENSE.txt */,
|
||||
F373DA192D388A1E002158FA /* README.md */,
|
||||
F373DA172D3889EE002158FA /* INSTALL.md */,
|
||||
);
|
||||
path = resources;
|
||||
sourceTree = "<group>";
|
||||
@@ -2755,9 +2767,10 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F344003D2D4022E1003F26D7 /* INSTALL.md in Resources */,
|
||||
F34400342D40217A003F26D7 /* LICENSE.txt in Resources */,
|
||||
F34400362D40217A003F26D7 /* README.md in Resources */,
|
||||
F37A8E1A28405AA100C38E95 /* CMake in Resources */,
|
||||
A75FDBB823E4CBC700529352 /* ReadMe.txt in Resources */,
|
||||
A75FDBB723E4CBC700529352 /* License.txt in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -2780,7 +2793,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "set -ex\n\nmkdir -p build/dmg-tmp/share/cmake/SDL3\ncp -a build/SDL3.xcframework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\ncp pkg-support/share/cmake/SDL3/SDL3Config.cmake build/dmg-tmp/share/cmake/SDL3\ncp pkg-support/share/cmake/SDL3/SDL3ConfigVersion.cmake build/dmg-tmp/share/cmake/SDL3\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL3 -srcfolder build/dmg-tmp build/SDL3.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
|
||||
shellScript = "set -ex\n\nmkdir -p build/dmg-tmp/share/cmake/SDL3\ncp -a build/SDL3.xcframework build/dmg-tmp/\n\ncp ../../LICENSE.txt build/dmg-tmp\ncp ../../README.md build/dmg-tmp\ncp pkg-support/resources/INSTALL.md build/dmg-tmp\ncp pkg-support/share/cmake/SDL3/SDL3Config.cmake build/dmg-tmp/share/cmake/SDL3\ncp pkg-support/share/cmake/SDL3/SDL3ConfigVersion.cmake build/dmg-tmp/share/cmake/SDL3\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL3 -srcfolder build/dmg-tmp build/SDL3.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
|
||||
};
|
||||
F3B38CF0296F63D1005DA6D3 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
@@ -3048,8 +3061,8 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
DEPLOYMENT_POSTPROCESSING = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 109.0.0;
|
||||
DYLIB_CURRENT_VERSION = 109.0.0;
|
||||
DYLIB_COMPATIBILITY_VERSION = 201.0.0;
|
||||
DYLIB_CURRENT_VERSION = 201.2.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_ALTIVEC_EXTENSIONS = YES;
|
||||
@@ -3073,7 +3086,7 @@
|
||||
/usr/X11R6/include,
|
||||
);
|
||||
INFOPLIST_FILE = "Info-Framework.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
@@ -3083,15 +3096,15 @@
|
||||
"@executable_path/../Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
MARKETING_VERSION = 3.1.8;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||
MARKETING_VERSION = 3.2.2;
|
||||
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
|
||||
PRODUCT_NAME = SDL3;
|
||||
STRIP_STYLE = "non-global";
|
||||
SUPPORTED_PLATFORMS = "xrsimulator xros macosx iphonesimulator iphoneos appletvsimulator appletvos";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 11.0;
|
||||
XROS_DEPLOYMENT_TARGET = 1.0;
|
||||
};
|
||||
name = Release;
|
||||
@@ -3112,8 +3125,8 @@
|
||||
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 109.0.0;
|
||||
DYLIB_CURRENT_VERSION = 109.0.0;
|
||||
DYLIB_COMPATIBILITY_VERSION = 201.0.0;
|
||||
DYLIB_CURRENT_VERSION = 201.2.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
@@ -3134,7 +3147,7 @@
|
||||
/usr/X11R6/include,
|
||||
);
|
||||
INFOPLIST_FILE = "Info-Framework.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
@@ -3144,8 +3157,8 @@
|
||||
"@executable_path/../Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
MARKETING_VERSION = 3.1.8;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||
MARKETING_VERSION = 3.2.2;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
|
||||
@@ -3153,7 +3166,7 @@
|
||||
STRIP_INSTALLED_PRODUCT = NO;
|
||||
SUPPORTED_PLATFORMS = "xrsimulator xros macosx iphonesimulator iphoneos appletvsimulator appletvos";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 11.0;
|
||||
XROS_DEPLOYMENT_TARGET = 1.0;
|
||||
};
|
||||
name = Debug;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Title SDL 3.1.8
|
||||
Title SDL 3.2.2
|
||||
Version 1
|
||||
Description SDL Library for macOS (http://www.libsdl.org)
|
||||
DefaultLocation /Library/Frameworks
|
||||
|
43
Xcode/SDL/pkg-support/resources/INSTALL.md
Normal file
43
Xcode/SDL/pkg-support/resources/INSTALL.md
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
# Using this package
|
||||
|
||||
This package contains SDL built for Xcode, and includes support for macOS, iOS and tvOS.
|
||||
|
||||
To use this package in Xcode, drag `SDL3.xcframework` into your project.
|
||||
|
||||
To use this package in a CMake project, copy both `SDL3.xcframework` and `share` to `~/Library/Frameworks`.
|
||||
|
||||
# Documentation
|
||||
|
||||
An API reference, tutorials, and additional documentation is available at:
|
||||
|
||||
https://wiki.libsdl.org/SDL3
|
||||
|
||||
# Example code
|
||||
|
||||
There are simple example programs available at:
|
||||
|
||||
https://examples.libsdl.org/SDL3
|
||||
|
||||
# Discussions
|
||||
|
||||
## Discord
|
||||
|
||||
You can join the official Discord server at:
|
||||
|
||||
https://discord.com/invite/BwpFGBWsv8
|
||||
|
||||
## Forums/mailing lists
|
||||
|
||||
You can join SDL development discussions at:
|
||||
|
||||
https://discourse.libsdl.org/
|
||||
|
||||
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
|
||||
|
||||
## Announcement list
|
||||
|
||||
You can sign up for the low traffic announcement list at:
|
||||
|
||||
https://www.libsdl.org/mailing-list.php
|
||||
|
@@ -1,19 +0,0 @@
|
||||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 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
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
@@ -1,44 +0,0 @@
|
||||
The Simple DirectMedia Layer (SDL for short) is a cross-platform
|
||||
library designed to make it easy to write multi-media software,
|
||||
such as games and emulators.
|
||||
|
||||
The Simple DirectMedia Layer library source code is available from:
|
||||
http://www.libsdl.org/
|
||||
|
||||
This library is distributed under the terms of the zlib license:
|
||||
http://zlib.net/zlib_license.html
|
||||
|
||||
|
||||
This packages contains the SDL framework for macOS.
|
||||
Conforming with Apple guidelines, this framework
|
||||
contains both the SDL runtime component and development header files.
|
||||
|
||||
|
||||
To Install:
|
||||
Copy "SDL3.xcframework" and "share" to /Library/Frameworks
|
||||
|
||||
You may alternatively install it in <Your home directory>/Library/Frameworks
|
||||
if your access privileges are not high enough.
|
||||
|
||||
|
||||
Use in CMake projects:
|
||||
SDL3.xcframework can be used in CMake projects using the following pattern:
|
||||
```cmake
|
||||
find_package(SDL3 REQUIRED COMPONENTS SDL3)
|
||||
add_executable(my_game ${MY_SOURCES})
|
||||
target_link_libraries(my_game PRIVATE SDL3::SDL3)
|
||||
```
|
||||
If SDL3.framework is installed in a non-standard location,
|
||||
please refer to the following link for ways to configure CMake:
|
||||
https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure
|
||||
|
||||
|
||||
Additional References:
|
||||
|
||||
- Screencast tutorials for getting started with OpenSceneGraph/macOS are
|
||||
available at:
|
||||
http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/MacOSXTips
|
||||
Though these are OpenSceneGraph centric, the same exact concepts apply to
|
||||
SDL, thus the videos are recommended for everybody getting started with
|
||||
developing on macOS. (You can skim over the PlugIns stuff since SDL
|
||||
doesn't have any PlugIns to worry about.)
|
Binary file not shown.
41
Xcode/SDL/pkg-support/resources/framework/INSTALL.md
Normal file
41
Xcode/SDL/pkg-support/resources/framework/INSTALL.md
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
# Using this package
|
||||
|
||||
This package contains SDL built for Xcode.
|
||||
|
||||
To use this package in Xcode, drag `SDL3.framework` into your project.
|
||||
|
||||
# Documentation
|
||||
|
||||
An API reference, tutorials, and additional documentation is available at:
|
||||
|
||||
https://wiki.libsdl.org/SDL3
|
||||
|
||||
# Example code
|
||||
|
||||
There are simple example programs available at:
|
||||
|
||||
https://examples.libsdl.org/SDL3
|
||||
|
||||
# Discussions
|
||||
|
||||
## Discord
|
||||
|
||||
You can join the official Discord server at:
|
||||
|
||||
https://discord.com/invite/BwpFGBWsv8
|
||||
|
||||
## Forums/mailing lists
|
||||
|
||||
You can join SDL development discussions at:
|
||||
|
||||
https://discourse.libsdl.org/
|
||||
|
||||
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
|
||||
|
||||
## Announcement list
|
||||
|
||||
You can sign up for the low traffic announcement list at:
|
||||
|
||||
https://www.libsdl.org/mailing-list.php
|
||||
|
@@ -112,7 +112,7 @@ if(NOT TARGET SDL3::SDL3-shared)
|
||||
set_target_properties(SDL3::SDL3-shared
|
||||
PROPERTIES
|
||||
FRAMEWORK "TRUE"
|
||||
IMPORTED_LOCATION "${_sdl3_framework_path}"
|
||||
IMPORTED_LOCATION "${_sdl3_framework_path}/SDL3"
|
||||
INTERFACE_LINK_LIBRARIES "SDL3::Headers"
|
||||
)
|
||||
endif()
|
||||
|
1
android-project/app/proguard-rules.pro
vendored
1
android-project/app/proguard-rules.pro
vendored
@@ -36,6 +36,7 @@
|
||||
int messageboxShowMessageBox(int, java.lang.String, java.lang.String, int[], int[], java.lang.String[], int[]);
|
||||
void minimizeWindow();
|
||||
boolean openURL(java.lang.String);
|
||||
void onNativePen(int, int, int , float , float , float);
|
||||
void requestPermission(java.lang.String, int);
|
||||
boolean showToast(java.lang.String, int, int, int, int);
|
||||
boolean sendMessage(int, int);
|
||||
|
@@ -59,8 +59,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 = 1;
|
||||
private static final int SDL_MICRO_VERSION = 8;
|
||||
private static final int SDL_MINOR_VERSION = 2;
|
||||
private static final int SDL_MICRO_VERSION = 2;
|
||||
/*
|
||||
// Display InputType.SOURCE/CLASS of events and devices
|
||||
//
|
||||
@@ -231,6 +231,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
protected static boolean mSDLMainFinished = false;
|
||||
protected static boolean mActivityCreated = false;
|
||||
private static SDLFileDialogState mFileDialogState = null;
|
||||
protected static boolean mDispatchingKeyEvent = false;
|
||||
|
||||
protected static SDLGenericMotionListener_API14 getMotionListener() {
|
||||
if (mMotionListener == null) {
|
||||
@@ -807,7 +808,14 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return super.dispatchKeyEvent(event);
|
||||
mDispatchingKeyEvent = true;
|
||||
boolean result = super.dispatchKeyEvent(event);
|
||||
mDispatchingKeyEvent = false;
|
||||
return result;
|
||||
}
|
||||
|
||||
public static boolean dispatchingKeyEvent() {
|
||||
return mDispatchingKeyEvent;
|
||||
}
|
||||
|
||||
/* Transition to next state */
|
||||
@@ -1495,7 +1503,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
// on some devices key events are sent for mouse BUTTON_BACK/FORWARD presses
|
||||
// they are ignored here because sending them as mouse input to SDL is messy
|
||||
if ((keyCode == KeyEvent.KEYCODE_BACK) || (keyCode == KeyEvent.KEYCODE_FORWARD)) {
|
||||
Log.v("SDL", "keycode is back or forward");
|
||||
switch (event.getAction()) {
|
||||
case KeyEvent.ACTION_DOWN:
|
||||
case KeyEvent.ACTION_UP:
|
||||
@@ -1508,6 +1515,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
}
|
||||
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
onNativeKeyDown(keyCode);
|
||||
|
||||
if (isTextInputEvent(event)) {
|
||||
if (ic != null) {
|
||||
ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||
@@ -1515,7 +1524,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||
}
|
||||
}
|
||||
onNativeKeyDown(keyCode);
|
||||
return true;
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
onNativeKeyUp(keyCode);
|
||||
|
@@ -705,9 +705,14 @@ class SDLGenericMotionListener_API14 implements View.OnGenericMotionListener {
|
||||
x = event.getX(i);
|
||||
y = event.getY(i);
|
||||
float p = event.getPressure(i);
|
||||
if (p > 1.0f) {
|
||||
// may be larger than 1.0f on some devices
|
||||
// see the documentation of getPressure(i)
|
||||
p = 1.0f;
|
||||
}
|
||||
|
||||
// BUTTON_STYLUS_PRIMARY is 2^5, so shift by 4
|
||||
int buttons = event.getButtonState() >> 4;
|
||||
// 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));
|
||||
|
||||
SDLActivity.onNativePen(event.getPointerId(i), buttons, action, x, y, p);
|
||||
consumed = true;
|
||||
|
@@ -111,18 +111,20 @@ public class SDLInputConnection extends BaseInputConnection
|
||||
|
||||
if (matchLength < text.length()) {
|
||||
String pendingText = text.subSequence(matchLength, text.length()).toString();
|
||||
for (offset = 0; offset < pendingText.length(); ) {
|
||||
int codePoint = pendingText.codePointAt(offset);
|
||||
if (codePoint == '\n') {
|
||||
if (SDLActivity.onNativeSoftReturnKey()) {
|
||||
return;
|
||||
if (!SDLActivity.dispatchingKeyEvent()) {
|
||||
for (offset = 0; offset < pendingText.length(); ) {
|
||||
int codePoint = pendingText.codePointAt(offset);
|
||||
if (codePoint == '\n') {
|
||||
if (SDLActivity.onNativeSoftReturnKey()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* Higher code points don't generate simulated scancodes */
|
||||
if (codePoint > 0 && codePoint < 128) {
|
||||
nativeGenerateScancodeForUnichar((char)codePoint);
|
||||
}
|
||||
offset += Character.charCount(codePoint);
|
||||
}
|
||||
/* Higher code points don't generate simulated scancodes */
|
||||
if (codePoint < 128) {
|
||||
nativeGenerateScancodeForUnichar((char)codePoint);
|
||||
}
|
||||
offset += Character.charCount(codePoint);
|
||||
}
|
||||
SDLInputConnection.nativeCommitText(pendingText, 0);
|
||||
}
|
||||
|
@@ -1136,12 +1136,12 @@ typedef SDL_GameControllerButton, SDL_GamepadButton;
|
||||
@@
|
||||
@@
|
||||
- SDL_GameControllerGetNumTouchpadFingers
|
||||
+ SDL_GetGamepadNumTouchpadFingers
|
||||
+ SDL_GetNumGamepadTouchpadFingers
|
||||
(...)
|
||||
@@
|
||||
@@
|
||||
- SDL_GameControllerGetNumTouchpads
|
||||
+ SDL_GetGamepadNumTouchpads
|
||||
+ SDL_GetNumGamepadTouchpads
|
||||
(...)
|
||||
@@
|
||||
@@
|
||||
@@ -1491,6 +1491,51 @@ typedef SDL_GameControllerButton, SDL_GamepadButton;
|
||||
+ SDL_TextInputShown
|
||||
(...)
|
||||
@@
|
||||
SDL_Event e1;
|
||||
@@
|
||||
- e1.key.keysym.mod
|
||||
+ e1.key.mod
|
||||
@@
|
||||
SDL_Event *e1;
|
||||
@@
|
||||
- e1->key.keysym.mod
|
||||
+ e1->key.mod
|
||||
@@
|
||||
SDL_KeyboardEvent *e1;
|
||||
@@
|
||||
- e1->keysym.mod
|
||||
+ e1->mod
|
||||
@@
|
||||
SDL_Event e1;
|
||||
@@
|
||||
- e1.key.keysym.sym
|
||||
+ e1.key.key
|
||||
@@
|
||||
SDL_Event *e1;
|
||||
@@
|
||||
- e1->key.keysym.sym
|
||||
+ e1->key.key
|
||||
@@
|
||||
SDL_KeyboardEvent *e1;
|
||||
@@
|
||||
- e1->keysym.sym
|
||||
+ e1->key
|
||||
@@
|
||||
SDL_Event e1;
|
||||
@@
|
||||
- e1.key.keysym.scancode
|
||||
+ e1.key.scancode
|
||||
@@
|
||||
SDL_Event *e1;
|
||||
@@
|
||||
- e1->key.keysym.scancode
|
||||
+ e1->key.scancode
|
||||
@@
|
||||
SDL_KeyboardEvent *e1;
|
||||
@@
|
||||
- e1->keysym.scancode
|
||||
+ e1->scancode
|
||||
@@
|
||||
@@
|
||||
- KMOD_ALT
|
||||
+ SDL_KMOD_ALT
|
||||
@@ -2443,6 +2488,11 @@ SDL_Event *e1;
|
||||
- e1->wheel.mouseX
|
||||
+ e1->wheel.mouse_x
|
||||
@@
|
||||
SDL_MouseWheelEvent *e1;
|
||||
@@
|
||||
- e1->mouseX
|
||||
+ e1->mouse_x
|
||||
@@
|
||||
SDL_Event e1;
|
||||
@@
|
||||
- e1.wheel.mouseY
|
||||
@@ -2453,6 +2503,41 @@ SDL_Event *e1;
|
||||
- e1->wheel.mouseY
|
||||
+ e1->wheel.mouse_y
|
||||
@@
|
||||
SDL_MouseWheelEvent *e1;
|
||||
@@
|
||||
- e1->mouseY
|
||||
+ e1->mouse_y
|
||||
@@
|
||||
SDL_Event e1;
|
||||
@@
|
||||
- e1.wheel.preciseX
|
||||
+ e1.wheel.x
|
||||
@@
|
||||
SDL_Event *e1;
|
||||
@@
|
||||
- e1->wheel.preciseX
|
||||
+ e1->wheel.x
|
||||
@@
|
||||
SDL_MouseWheelEvent *e1;
|
||||
@@
|
||||
- e1->preciseX
|
||||
+ e1->x
|
||||
@@
|
||||
SDL_Event e1;
|
||||
@@
|
||||
- e1.wheel.preciseY
|
||||
+ e1.wheel.y
|
||||
@@
|
||||
SDL_Event *e1;
|
||||
@@
|
||||
- e1->wheel.preciseY
|
||||
+ e1->wheel.y
|
||||
@@
|
||||
SDL_MouseWheelEvent *e1;
|
||||
@@
|
||||
- e1->preciseY
|
||||
+ e1->y
|
||||
@@
|
||||
SDL_Event e1;
|
||||
@@
|
||||
- e1.tfinger.touchId
|
||||
@@ -2463,6 +2548,11 @@ SDL_Event *e1;
|
||||
- e1->tfinger.touchId
|
||||
+ e1->tfinger.touchID
|
||||
@@
|
||||
SDL_TouchFingerEvent *e1;
|
||||
@@
|
||||
- e1->touchId
|
||||
+ e1->touchID
|
||||
@@
|
||||
SDL_Event e1;
|
||||
@@
|
||||
- e1.tfinger.fingerId
|
||||
@@ -2473,6 +2563,11 @@ SDL_Event *e1;
|
||||
- e1->tfinger.fingerId
|
||||
+ e1->tfinger.fingerID
|
||||
@@
|
||||
SDL_TouchFingerEvent *e1;
|
||||
@@
|
||||
- e1->fingerId
|
||||
+ e1->fingerID
|
||||
@@
|
||||
expression e1, e2, e3, e4;
|
||||
@@
|
||||
- SDL_CreateWindow(e1, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, e2, e3, e4)
|
||||
|
@@ -534,6 +534,15 @@ class SourceCollector:
|
||||
return path_times
|
||||
|
||||
|
||||
class AndroidApiVersion:
|
||||
def __init__(self, name: str, ints: tuple[int, ...]):
|
||||
self.name = name
|
||||
self.ints = ints
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"<{self.name} ({'.'.join(str(v) for v in self.ints)})>"
|
||||
|
||||
|
||||
class Releaser:
|
||||
def __init__(self, release_info: dict, commit: str, revision: str, root: Path, dist_path: Path, section_printer: SectionPrinter, executer: Executer, cmake_generator: str, deps_path: Path, overwrite: bool, github: bool, fast: bool):
|
||||
self.release_info = release_info
|
||||
@@ -885,22 +894,25 @@ class Releaser:
|
||||
self.artifacts["mingw-devel-tar-gz"] = tgz_path
|
||||
self.artifacts["mingw-devel-tar-xz"] = txz_path
|
||||
|
||||
def _detect_android_api(self, android_home: str) -> typing.Optional[int]:
|
||||
def _detect_android_api(self, android_home: str) -> typing.Optional[AndroidApiVersion]:
|
||||
platform_dirs = list(Path(p) for p in glob.glob(f"{android_home}/platforms/android-*"))
|
||||
re_platform = re.compile("android-([0-9]+)")
|
||||
platform_versions = []
|
||||
re_platform = re.compile("^android-([0-9]+)(?:-ext([0-9]+))?$")
|
||||
platform_versions: list[AndroidApiVersion] = []
|
||||
for platform_dir in platform_dirs:
|
||||
logger.debug("Found Android Platform SDK: %s", platform_dir)
|
||||
if not (platform_dir / "android.jar").is_file():
|
||||
logger.debug("Skipping SDK, missing android.jar")
|
||||
continue
|
||||
if m:= re_platform.match(platform_dir.name):
|
||||
platform_versions.append(int(m.group(1)))
|
||||
platform_versions.sort()
|
||||
platform_versions.append(AndroidApiVersion(name=platform_dir.name, ints=(int(m.group(1)), int(m.group(2) or 0))))
|
||||
platform_versions.sort(key=lambda v: v.ints)
|
||||
logger.info("Available platform versions: %s", platform_versions)
|
||||
platform_versions = list(filter(lambda v: v >= self._android_api_minimum, platform_versions))
|
||||
logger.info("Valid platform versions (>=%d): %s", self._android_api_minimum, platform_versions)
|
||||
platform_versions = list(filter(lambda v: v.ints >= self._android_api_minimum.ints, platform_versions))
|
||||
logger.info("Valid platform versions (>=%s): %s", self._android_api_minimum.ints, platform_versions)
|
||||
if not platform_versions:
|
||||
return None
|
||||
android_api = platform_versions[0]
|
||||
logger.info("Selected API version %d", android_api)
|
||||
logger.info("Selected API version %s", android_api)
|
||||
return android_api
|
||||
|
||||
def _get_prefab_json_text(self) -> str:
|
||||
@@ -924,8 +936,19 @@ class Releaser:
|
||||
return json.dumps(module_json_dict, indent=4)
|
||||
|
||||
@property
|
||||
def _android_api_minimum(self):
|
||||
return self.release_info["android"]["api-minimum"]
|
||||
def _android_api_minimum(self) -> AndroidApiVersion:
|
||||
value = self.release_info["android"]["api-minimum"]
|
||||
if isinstance(value, int):
|
||||
ints = (value, )
|
||||
elif isinstance(value, str):
|
||||
ints = tuple(split("."))
|
||||
else:
|
||||
raise ValueError("Invalid android.api-minimum: must be X or X.Y")
|
||||
match len(ints):
|
||||
case 1: name = f"android-{ints[0]}"
|
||||
case 2: name = f"android-{ints[0]}-ext-{ints[1]}"
|
||||
case _: raise ValueError("Invalid android.api-minimum: must be X or X.Y")
|
||||
return AndroidApiVersion(name=name, ints=ints)
|
||||
|
||||
@property
|
||||
def _android_api_target(self):
|
||||
@@ -938,7 +961,7 @@ class Releaser:
|
||||
def _get_prefab_abi_json_text(self, abi: str, cpp: bool, shared: bool) -> str:
|
||||
abi_json_dict = {
|
||||
"abi": abi,
|
||||
"api": self._android_api_minimum,
|
||||
"api": self._android_api_minimum.ints[0],
|
||||
"ndk": self._android_ndk_minimum,
|
||||
"stl": "c++_shared" if cpp else "none",
|
||||
"static": not shared,
|
||||
@@ -951,7 +974,7 @@ class Releaser:
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.libsdl.android.{self.project}" android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
<uses-sdk android:minSdkVersion="{self._android_api_minimum}"
|
||||
<uses-sdk android:minSdkVersion="{self._android_api_minimum.ints[0]}"
|
||||
android:targetSdkVersion="{self._android_api_target}" />
|
||||
</manifest>
|
||||
""")
|
||||
@@ -961,7 +984,8 @@ class Releaser:
|
||||
if not cmake_toolchain_file.exists():
|
||||
logger.error("CMake toolchain file does not exist (%s)", cmake_toolchain_file)
|
||||
raise SystemExit(1)
|
||||
aar_path = self.dist_path / f"{self.project}-{self.version}.aar"
|
||||
aar_path = self.root / "build-android" / f"{self.project}-{self.version}.aar"
|
||||
android_dist_path = self.dist_path / f"{self.project}-devel-{self.version}-android.zip"
|
||||
android_abis = self.release_info["android"]["abis"]
|
||||
java_jars_added = False
|
||||
module_data_added = False
|
||||
@@ -969,14 +993,24 @@ class Releaser:
|
||||
shutil.rmtree(android_deps_path, ignore_errors=True)
|
||||
|
||||
for dep, depinfo in self.release_info["android"].get("dependencies", {}).items():
|
||||
android_aar = self.deps_path / glob.glob(depinfo["artifact"], root_dir=self.deps_path)[0]
|
||||
with self.section_printer.group(f"Extracting Android dependency {dep} ({android_aar.name})"):
|
||||
self.executer.run([sys.executable, str(android_aar), "-o", str(android_deps_path)])
|
||||
dep_devel_zip = self.deps_path / glob.glob(depinfo["artifact"], root_dir=self.deps_path)[0]
|
||||
|
||||
dep_extract_path = self.deps_path / f"extract/android/{dep}"
|
||||
shutil.rmtree(dep_extract_path, ignore_errors=True)
|
||||
dep_extract_path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
with self.section_printer.group(f"Extracting Android dependency {dep} ({dep_devel_zip})"):
|
||||
with zipfile.ZipFile(dep_devel_zip, "r") as zf:
|
||||
zf.extractall(dep_extract_path)
|
||||
|
||||
dep_devel_aar = dep_extract_path / glob.glob("*.aar", root_dir=dep_extract_path)[0]
|
||||
self.executer.run([sys.executable, str(dep_devel_aar), "-o", str(android_deps_path)])
|
||||
|
||||
for module_name, module_info in self.release_info["android"]["modules"].items():
|
||||
assert "type" in module_info and module_info["type"] in ("interface", "library"), f"module {module_name} must have a valid type"
|
||||
|
||||
archive_file_tree = ArchiveFileTree()
|
||||
aar_file_tree = ArchiveFileTree()
|
||||
android_devel_file_tree = ArchiveFileTree()
|
||||
|
||||
for android_abi in android_abis:
|
||||
with self.section_printer.group(f"Building for Android {android_api} {android_abi}"):
|
||||
@@ -1027,20 +1061,20 @@ class Releaser:
|
||||
assert library.suffix in (".so", ".a")
|
||||
assert library.is_file(), f"CMake should have built library '{library}' for module {module_name}"
|
||||
arcdir_prefab_libs = f"{arcdir_prefab_module}/libs/android.{android_abi}"
|
||||
archive_file_tree.add_file(NodeInArchive.from_fs(arcpath=f"{arcdir_prefab_libs}/{library.name}", path=library, time=self.arc_time))
|
||||
archive_file_tree.add_file(NodeInArchive.from_text(arcpath=f"{arcdir_prefab_libs}/abi.json", text=self._get_prefab_abi_json_text(abi=android_abi, cpp=False, shared=library.suffix == ".so"), time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_fs(arcpath=f"{arcdir_prefab_libs}/{library.name}", path=library, time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_text(arcpath=f"{arcdir_prefab_libs}/abi.json", text=self._get_prefab_abi_json_text(abi=android_abi, cpp=False, shared=library.suffix == ".so"), time=self.arc_time))
|
||||
|
||||
if not module_data_added:
|
||||
library_name = None
|
||||
if module_info["type"] == "library":
|
||||
library_name = Path(module_info["library"]).stem.removeprefix("lib")
|
||||
export_libraries = module_info.get("export-libraries", [])
|
||||
archive_file_tree.add_file(NodeInArchive.from_text(arcpath=arc_join(arcdir_prefab_module, "module.json"), text=self._get_prefab_module_json_text(library_name=library_name, export_libraries=export_libraries), time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_text(arcpath=arc_join(arcdir_prefab_module, "module.json"), text=self._get_prefab_module_json_text(library_name=library_name, export_libraries=export_libraries), time=self.arc_time))
|
||||
arcdir_prefab_include = f"prefab/modules/{module_name}/include"
|
||||
if "includes" in module_info:
|
||||
archive_file_tree.add_file_mapping(arc_dir=arcdir_prefab_include, file_mapping=module_info["includes"], file_mapping_root=install_dir, context=self.get_context(), time=self.arc_time)
|
||||
aar_file_tree.add_file_mapping(arc_dir=arcdir_prefab_include, file_mapping=module_info["includes"], file_mapping_root=install_dir, context=self.get_context(), time=self.arc_time)
|
||||
else:
|
||||
archive_file_tree.add_file(NodeInArchive.from_text(arcpath=arc_join(arcdir_prefab_include, ".keep"), text="\n", time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_text(arcpath=arc_join(arcdir_prefab_include, ".keep"), text="\n", time=self.arc_time))
|
||||
module_data_added = True
|
||||
|
||||
if not java_jars_added:
|
||||
@@ -1053,21 +1087,28 @@ class Releaser:
|
||||
assert sources_jar_path.is_file(), f"CMake should have archived the java sources into a JAR ({sources_jar_path})"
|
||||
assert doc_jar_path.is_file(), f"CMake should have archived javadoc into a JAR ({doc_jar_path})"
|
||||
|
||||
archive_file_tree.add_file(NodeInArchive.from_fs(arcpath="classes.jar", path=classes_jar_path, time=self.arc_time))
|
||||
archive_file_tree.add_file(NodeInArchive.from_fs(arcpath="classes-sources.jar", path=sources_jar_path, time=self.arc_time))
|
||||
archive_file_tree.add_file(NodeInArchive.from_fs(arcpath="classes-doc.jar", path=doc_jar_path, time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_fs(arcpath="classes.jar", path=classes_jar_path, time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_fs(arcpath="classes-sources.jar", path=sources_jar_path, time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_fs(arcpath="classes-doc.jar", path=doc_jar_path, time=self.arc_time))
|
||||
|
||||
assert ("jars" in self.release_info["android"] and java_jars_added) or "jars" not in self.release_info["android"], "Must have archived java JAR archives"
|
||||
|
||||
archive_file_tree.add_file_mapping(arc_dir="", file_mapping=self.release_info["android"].get("files", {}), file_mapping_root=self.root, context=self.get_context(), time=self.arc_time)
|
||||
aar_file_tree.add_file_mapping(arc_dir="", file_mapping=self.release_info["android"]["aar-files"], file_mapping_root=self.root, context=self.get_context(), time=self.arc_time)
|
||||
|
||||
archive_file_tree.add_file(NodeInArchive.from_text(arcpath="prefab/prefab.json", text=self._get_prefab_json_text(), time=self.arc_time))
|
||||
archive_file_tree.add_file(NodeInArchive.from_text(arcpath="AndroidManifest.xml", text=self._get_android_manifest_text(), time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_text(arcpath="prefab/prefab.json", text=self._get_prefab_json_text(), time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_text(arcpath="AndroidManifest.xml", text=self._get_android_manifest_text(), time=self.arc_time))
|
||||
|
||||
with Archiver(zip_path=aar_path) as archiver:
|
||||
archive_file_tree.add_to_archiver(archive_base="", archiver=archiver)
|
||||
aar_file_tree.add_to_archiver(archive_base="", archiver=archiver)
|
||||
archiver.add_git_hash(arcdir="", commit=self.commit, time=self.arc_time)
|
||||
self.artifacts[f"android-aar"] = aar_path
|
||||
|
||||
android_devel_file_tree.add_file(NodeInArchive.from_fs(arcpath=aar_path.name, path=aar_path))
|
||||
android_devel_file_tree.add_file_mapping(arc_dir="", file_mapping=self.release_info["android"]["files"], file_mapping_root=self.root, context=self.get_context(), time=self.arc_time)
|
||||
with Archiver(zip_path=android_dist_path) as archiver:
|
||||
android_devel_file_tree.add_to_archiver(archive_base="", archiver=archiver)
|
||||
archiver.add_git_hash(arcdir="", commit=self.commit, time=self.arc_time)
|
||||
|
||||
self.artifacts[f"android-aar"] = android_dist_path
|
||||
|
||||
def download_dependencies(self):
|
||||
shutil.rmtree(self.deps_path, ignore_errors=True)
|
||||
@@ -1104,7 +1145,7 @@ class Releaser:
|
||||
assert len(msvc_matches) == 1, f"Exactly one archive matches msvc {dep} dependency: {msvc_matches}"
|
||||
if "android" in self.release_info:
|
||||
android_matches = glob.glob(self.release_info["android"]["dependencies"][dep]["artifact"], root_dir=self.deps_path)
|
||||
assert len(android_matches) == 1, f"Exactly one archive matches msvc {dep} dependency: {msvc_matches}"
|
||||
assert len(android_matches) == 1, f"Exactly one archive matches msvc {dep} dependency: {android_matches}"
|
||||
|
||||
@staticmethod
|
||||
def _arch_to_vs_platform(arch: str, configuration: str="Release") -> VsArchPlatformConfig:
|
||||
@@ -1230,6 +1271,10 @@ class Releaser:
|
||||
platform_context = self.get_context(extra_context=arch_platform.extra_context())
|
||||
|
||||
build_type = "Release"
|
||||
extra_context = {
|
||||
"ARCH": arch_platform.arch,
|
||||
"PLATFORM": arch_platform.platform,
|
||||
}
|
||||
|
||||
built_paths = set(install_path / configure_text(f, context=platform_context) for file_mapping in (self.release_info["msvc"]["cmake"]["files-lib"], self.release_info["msvc"]["cmake"]["files-devel"]) for files_list in file_mapping.values() for f in files_list)
|
||||
logger.info("CMake builds these files, to be included in the package: %s", built_paths)
|
||||
@@ -1280,7 +1325,7 @@ class Releaser:
|
||||
logger.info("Collecting files...")
|
||||
archive_file_tree = ArchiveFileTree()
|
||||
archive_file_tree.add_file_mapping(arc_dir="", file_mapping=self.release_info["msvc"]["cmake"]["files-lib"], file_mapping_root=install_path, context=platform_context, time=self.arc_time)
|
||||
archive_file_tree.add_file_mapping(arc_dir="", file_mapping=self.release_info["msvc"]["files-lib"], file_mapping_root=self.root, context=self.get_context(), time=self.arc_time)
|
||||
archive_file_tree.add_file_mapping(arc_dir="", file_mapping=self.release_info["msvc"]["files-lib"], file_mapping_root=self.root, context=self.get_context(extra_context=extra_context), time=self.arc_time)
|
||||
|
||||
logger.info("Creating %s", zip_path)
|
||||
with Archiver(zip_path=zip_path) as archiver:
|
||||
@@ -1344,7 +1389,7 @@ def main(argv=None) -> int:
|
||||
parser.add_argument("--actions", choices=["download", "source", "android", "mingw", "msvc", "dmg"], required=True, nargs="+", dest="actions", help="What to do?")
|
||||
parser.set_defaults(loglevel=logging.INFO)
|
||||
parser.add_argument('--vs-year', dest="vs_year", help="Visual Studio year")
|
||||
parser.add_argument('--android-api', type=int, dest="android_api", help="Android API version")
|
||||
parser.add_argument('--android-api', dest="android_api", help="Android API version")
|
||||
parser.add_argument('--android-home', dest="android_home", default=os.environ.get("ANDROID_HOME"), help="Android Home folder")
|
||||
parser.add_argument('--android-ndk-home', dest="android_ndk_home", default=os.environ.get("ANDROID_NDK_HOME"), help="Android NDK Home folder")
|
||||
parser.add_argument('--cmake-generator', dest="cmake_generator", default="Ninja", help="CMake Generator")
|
||||
@@ -1471,14 +1516,27 @@ def main(argv=None) -> int:
|
||||
if args.android_api is None:
|
||||
with section_printer.group("Detect Android APIS"):
|
||||
args.android_api = releaser._detect_android_api(android_home=args.android_home)
|
||||
if args.android_api is None or not (Path(args.android_home) / f"platforms/android-{args.android_api}").is_dir():
|
||||
else:
|
||||
try:
|
||||
android_api_ints = tuple(int(v) for v in args.android_api.split("."))
|
||||
match len(android_api_ints):
|
||||
case 1: android_api_name = f"android-{android_api_ints[0]}"
|
||||
case 2: android_api_name = f"android-{android_api_ints[0]}-ext-{android_api_ints[1]}"
|
||||
case _: raise ValueError
|
||||
except ValueError:
|
||||
logger.error("Invalid --android-api, must be a 'X' or 'X.Y' version")
|
||||
args.android_api = AndroidApiVersion(ints=android_api_ints, name=android_api_name)
|
||||
if args.android_api is None:
|
||||
parser.error("Invalid --android-api, and/or could not be detected")
|
||||
android_api_path = Path(args.android_home) / f"platforms/{args.android_api.name}"
|
||||
if not android_api_path.is_dir():
|
||||
parser.error(f"Android API directory does not exist ({android_api_path})")
|
||||
with section_printer.group("Android arguments"):
|
||||
print(f"android_home = {args.android_home}")
|
||||
print(f"android_ndk_home = {args.android_ndk_home}")
|
||||
print(f"android_api = {args.android_api}")
|
||||
releaser.create_android_archives(
|
||||
android_api=args.android_api,
|
||||
android_api=args.android_api.ints[0],
|
||||
android_home=args.android_home,
|
||||
android_ndk_home=args.android_ndk_home,
|
||||
)
|
||||
|
@@ -90,15 +90,9 @@ foreach my $release (@releases) {
|
||||
my $tag = $fulltags{$release};
|
||||
my $blobname = "$tag:src/dynapi/SDL_dynapi_overrides.h";
|
||||
|
||||
if ($release =~ /\A3\.(0\.\d+|1\.[0123])/) { # make everything up to the first SDL3 prerelease look like 3.1.3 (ABI lock version).
|
||||
$release = '3.1.3';
|
||||
}
|
||||
|
||||
# !!! FIXME: REMOVE ME WHEN 3.2.0 SHIPS!
|
||||
elsif (not $release =~ /\A3\.1\.\d+/) { # a couple of releases after the initial 3.1.3, let them through.
|
||||
if ($release =~ /\A3\.[01]\.\d+\Z/) { # make everything up to the first SDL3 official release look like 3.2.0.
|
||||
$release = '3.2.0';
|
||||
}
|
||||
# !!! FIXME: REMOVE ME WHEN 3.2.0 SHIPS!
|
||||
|
||||
open(PIPEFH, '-|', "git show '$blobname'") or die "Failed to read git blob '$blobname': $!\n";
|
||||
while (<PIPEFH>) {
|
||||
|
@@ -1,7 +1,13 @@
|
||||
This Android archive allows use of @<@PROJECT_NAME@>@ in your Android project, without needing to copy any SDL source.
|
||||
|
||||
# Using this package
|
||||
|
||||
This package contains @<@PROJECT_NAME@>@ built for the Android platform.
|
||||
|
||||
## Gradle integration
|
||||
|
||||
For integration with CMake/ndk-build, it uses [prefab](https://google.github.io/prefab/).
|
||||
|
||||
Copy this archive (@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar) to a `app/libs` directory of your project.
|
||||
Copy the aar archive (@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar) to a `app/libs` directory of your project.
|
||||
|
||||
In `app/build.gradle` of your Android project, add:
|
||||
```
|
||||
@@ -40,22 +46,46 @@ $(call import-module,prefab/@<@PROJECT_NAME@>@)
|
||||
|
||||
---
|
||||
|
||||
For advanced users:
|
||||
## Other build systems (advanced)
|
||||
|
||||
If you want to build a 3rd party library outside Gradle,
|
||||
If you want to build a project without Gradle,
|
||||
running the following command will extract the Android archive into a more common directory structure.
|
||||
```
|
||||
python @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar -o android_prefix
|
||||
```
|
||||
Add `--help` for a list of all available options.
|
||||
|
||||
# Documentation
|
||||
|
||||
Look at the example programs in ./test (of the source archive), and check out online documentation:
|
||||
https://wiki.libsdl.org/SDL3/FrontPage
|
||||
An API reference, tutorials, and additional documentation is available at:
|
||||
|
||||
Join the SDL discourse server if you want to join the community:
|
||||
https://discourse.libsdl.org/
|
||||
https://wiki.libsdl.org/@<@PROJECT_NAME@>@
|
||||
|
||||
# Example code
|
||||
|
||||
There are simple example programs available at:
|
||||
|
||||
https://examples.libsdl.org/SDL3
|
||||
|
||||
# Discussions
|
||||
|
||||
## Discord
|
||||
|
||||
You can join the official Discord server at:
|
||||
|
||||
https://discord.com/invite/BwpFGBWsv8
|
||||
|
||||
## Forums/mailing lists
|
||||
|
||||
You can join SDL development discussions at:
|
||||
|
||||
https://discourse.libsdl.org/
|
||||
|
||||
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
|
||||
|
||||
## Announcement list
|
||||
|
||||
You can sign up for the low traffic announcement list at:
|
||||
|
||||
https://www.libsdl.org/mailing-list.php
|
||||
|
||||
That's it!
|
||||
Sam Lantinga <slouken@libsdl.org>
|
||||
|
53
build-scripts/pkg-support/mingw/INSTALL.md.in
Normal file
53
build-scripts/pkg-support/mingw/INSTALL.md.in
Normal file
@@ -0,0 +1,53 @@
|
||||
|
||||
# Using this package
|
||||
|
||||
This package contains @<@PROJECT_NAME@>@ built for the mingw-w64 toolchain.
|
||||
|
||||
The files for 32-bit architecture are in i686-w64-mingw32
|
||||
The files for 64-bit architecture are in x86_64-w64-mingw32
|
||||
|
||||
You can install them to another location, just type `make` for help.
|
||||
|
||||
To use this package, point your include path at _arch_/include and your library path at _arch_/lib, link with the @<@PROJECT_NAME@>@ library and copy _arch_/bin/@<@PROJECT_NAME@>@.dll next to your executable.
|
||||
|
||||
e.g.
|
||||
```sh
|
||||
gcc -o hello.exe hello.c -Ix86_64-w64-mingw32/include -Lx86_64-w64-mingw32/lib -l@<@PROJECT_NAME@>@
|
||||
cp x86_64-w64-mingw32/bin/@<@PROJECT_NAME@>@.dll .
|
||||
./hello.exe
|
||||
```
|
||||
|
||||
# Documentation
|
||||
|
||||
An API reference, tutorials, and additional documentation is available at:
|
||||
|
||||
https://wiki.libsdl.org/@<@PROJECT_NAME@>@
|
||||
|
||||
# Example code
|
||||
|
||||
There are simple example programs available at:
|
||||
|
||||
https://examples.libsdl.org/SDL3
|
||||
|
||||
# Discussions
|
||||
|
||||
## Discord
|
||||
|
||||
You can join the official Discord server at:
|
||||
|
||||
https://discord.com/invite/BwpFGBWsv8
|
||||
|
||||
## Forums/mailing lists
|
||||
|
||||
You can join SDL development discussions at:
|
||||
|
||||
https://discourse.libsdl.org/
|
||||
|
||||
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
|
||||
|
||||
## Announcement list
|
||||
|
||||
You can sign up for the low traffic announcement list at:
|
||||
|
||||
https://www.libsdl.org/mailing-list.php
|
||||
|
@@ -1,25 +0,0 @@
|
||||
|
||||
The 32-bit files are in i686-w64-mingw32
|
||||
The 64-bit files are in x86_64-w64-mingw32
|
||||
|
||||
To install SDL for 32-bit x86 executables (i686):
|
||||
make install-i686
|
||||
|
||||
To install SDL for 64-bit x86 executables (x86_64):
|
||||
make install-x86_64
|
||||
|
||||
To install both:
|
||||
make install-all
|
||||
|
||||
Use DESTDIR to change the target location
|
||||
mkdir $HOME/mingw32-prefix
|
||||
make install-i686 DESTDIR=$HOME/mingw32-prefix
|
||||
|
||||
Look at the example programs in ./test, and check out online documentation:
|
||||
https://wiki.libsdl.org/SDL3/FrontPage
|
||||
|
||||
Join the SDL discourse server if you want to join the community:
|
||||
https://discourse.libsdl.org/
|
||||
|
||||
That's it!
|
||||
Sam Lantinga <slouken@libsdl.org>
|
45
build-scripts/pkg-support/msvc/INSTALL.md.in
Normal file
45
build-scripts/pkg-support/msvc/INSTALL.md.in
Normal file
@@ -0,0 +1,45 @@
|
||||
|
||||
# Using this package
|
||||
|
||||
This package contains @<@PROJECT_NAME@>@ built for Visual Studio.
|
||||
|
||||
To use this package, edit your project properties:
|
||||
- Add the include directory to "VC++ Directories" -> "Include Directories"
|
||||
- Add the lib/_arch_ directory to "VC++ Directories" -> "Library Directories"
|
||||
- Add @<@PROJECT_NAME@>@.lib to Linker -> Input -> "Additional Dependencies"
|
||||
- Copy lib/_arch_/@<@PROJECT_NAME@>@.dll to your project directory.
|
||||
|
||||
# Documentation
|
||||
|
||||
An API reference, tutorials, and additional documentation is available at:
|
||||
|
||||
https://wiki.libsdl.org/@<@PROJECT_NAME@>@
|
||||
|
||||
# Example code
|
||||
|
||||
There are simple example programs available at:
|
||||
|
||||
https://examples.libsdl.org/SDL3
|
||||
|
||||
# Discussions
|
||||
|
||||
## Discord
|
||||
|
||||
You can join the official Discord server at:
|
||||
|
||||
https://discord.com/invite/BwpFGBWsv8
|
||||
|
||||
## Forums/mailing lists
|
||||
|
||||
You can join SDL development discussions at:
|
||||
|
||||
https://discourse.libsdl.org/
|
||||
|
||||
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
|
||||
|
||||
## Announcement list
|
||||
|
||||
You can sign up for the low traffic announcement list at:
|
||||
|
||||
https://www.libsdl.org/mailing-list.php
|
||||
|
13
build-scripts/pkg-support/msvc/arm64/INSTALL.md.in
Normal file
13
build-scripts/pkg-support/msvc/arm64/INSTALL.md.in
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
# Using this package
|
||||
|
||||
This package contains @<@PROJECT_NAME@>@ built for arm64 Windows.
|
||||
|
||||
To use this package, simply replace an existing 64-bit ARM @<@PROJECT_NAME@>@.dll with the one included here.
|
||||
|
||||
# Development packages
|
||||
|
||||
If you're looking for packages with headers and libraries, you can download one of these:
|
||||
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip, for development using Visual Studio
|
||||
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-mingw.zip, for development using mingw-w64
|
||||
|
13
build-scripts/pkg-support/msvc/x64/INSTALL.md.in
Normal file
13
build-scripts/pkg-support/msvc/x64/INSTALL.md.in
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
# Using this package
|
||||
|
||||
This package contains @<@PROJECT_NAME@>@ built for x64 Windows.
|
||||
|
||||
To use this package, simply replace an existing 64-bit @<@PROJECT_NAME@>@.dll with the one included here.
|
||||
|
||||
# Development packages
|
||||
|
||||
If you're looking for packages with headers and libraries, you can download one of these:
|
||||
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip, for development using Visual Studio
|
||||
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-mingw.zip, for development using mingw-w64
|
||||
|
13
build-scripts/pkg-support/msvc/x86/INSTALL.md.in
Normal file
13
build-scripts/pkg-support/msvc/x86/INSTALL.md.in
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
# Using this package
|
||||
|
||||
This package contains @<@PROJECT_NAME@>@ built for x86 Windows.
|
||||
|
||||
To use this package, simply replace an existing 32-bit @<@PROJECT_NAME@>@.dll with the one included here.
|
||||
|
||||
# Development packages
|
||||
|
||||
If you're looking for packages with headers and libraries, you can download one of these:
|
||||
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip, for development using Visual Studio
|
||||
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-mingw.zip, for development using mingw-w64
|
||||
|
@@ -45,24 +45,14 @@
|
||||
},
|
||||
"files": {
|
||||
"": [
|
||||
"build-scripts/pkg-support/mingw/INSTALL.txt",
|
||||
"build-scripts/pkg-support/mingw/INSTALL.md.in:INSTALL.md",
|
||||
"build-scripts/pkg-support/mingw/Makefile",
|
||||
"BUGS.txt",
|
||||
"CREDITS.md",
|
||||
"README-SDL.txt",
|
||||
"WhatsNew.txt",
|
||||
"LICENSE.txt",
|
||||
"README.md"
|
||||
],
|
||||
"cmake": [
|
||||
"build-scripts/pkg-support/mingw/cmake/SDL3Config.cmake",
|
||||
"build-scripts/pkg-support/mingw/cmake/SDL3ConfigVersion.cmake"
|
||||
],
|
||||
"docs": [
|
||||
"docs/*"
|
||||
],
|
||||
"test": [
|
||||
"test/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -120,25 +110,22 @@
|
||||
},
|
||||
"files-lib": {
|
||||
"": [
|
||||
"README-SDL.txt"
|
||||
"build-scripts/pkg-support/msvc/@<@ARCH@>@/INSTALL.md.in:INSTALL.md",
|
||||
"LICENSE.txt",
|
||||
"README.md"
|
||||
]
|
||||
},
|
||||
"files-devel": {
|
||||
"": [
|
||||
"README-SDL.txt",
|
||||
"BUGS.txt",
|
||||
"build-scripts/pkg-support/msvc/INSTALL.md.in:INSTALL.md",
|
||||
"LICENSE.txt",
|
||||
"README.md",
|
||||
"WhatsNew.txt"
|
||||
"README.md"
|
||||
],
|
||||
"cmake": [
|
||||
"build-scripts/pkg-support/msvc/cmake/SDL3Config.cmake.in:SDL3Config.cmake",
|
||||
"build-scripts/pkg-support/msvc/cmake/SDL3ConfigVersion.cmake.in:SDL3ConfigVersion.cmake",
|
||||
"cmake/sdlcpu.cmake"
|
||||
],
|
||||
"docs": [
|
||||
"docs/*"
|
||||
],
|
||||
"include/SDL3": [
|
||||
"include/SDL3/*.h"
|
||||
]
|
||||
@@ -151,9 +138,9 @@
|
||||
"-DSDL_STATIC=OFF",
|
||||
"-DSDL_TEST_LIBRARY=ON",
|
||||
"-DSDL_TESTS=OFF",
|
||||
"-DSDL_DISABLE_ANDROID_JAR=OFF",
|
||||
"-DSDL_DISABLE_INSTALL=OFF",
|
||||
"-DSDL_DISABLE_INSTALL_DOCS=OFF",
|
||||
"-DSDL_ANDROID_JAR=ON",
|
||||
"-DSDL_INSTALL=ON",
|
||||
"-DSDL_INSTALL_DOCS=ON",
|
||||
"-DSDL_VENDOR_INFO=libsdl.org"
|
||||
]
|
||||
},
|
||||
@@ -194,23 +181,29 @@
|
||||
"x86",
|
||||
"x86_64"
|
||||
],
|
||||
"api-minimum": 19,
|
||||
"api-target": 29,
|
||||
"api-minimum": 21,
|
||||
"api-target": 35,
|
||||
"ndk-minimum": 21,
|
||||
"files": {
|
||||
"aar-files": {
|
||||
"": [
|
||||
"android-project/app/proguard-rules.pro:proguard.txt",
|
||||
"build-scripts/pkg-support/android/INSTALL.md.in:INSTALL.md",
|
||||
"build-scripts/pkg-support/android/__main__.py.in:__main__.py",
|
||||
"build-scripts/pkg-support/android/description.json.in:description.json"
|
||||
"build-scripts/pkg-support/android/aar/__main__.py.in:__main__.py",
|
||||
"build-scripts/pkg-support/android/aar/description.json.in:description.json"
|
||||
],
|
||||
"META-INF": [
|
||||
"LICENSE.txt"
|
||||
],
|
||||
"cmake": [
|
||||
"cmake/sdlcpu.cmake",
|
||||
"build-scripts/pkg-support/android/cmake/SDL3Config.cmake",
|
||||
"build-scripts/pkg-support/android/cmake/SDL3ConfigVersion.cmake.in:SDL3ConfigVersion.cmake"
|
||||
"build-scripts/pkg-support/android/aar/cmake/SDL3Config.cmake",
|
||||
"build-scripts/pkg-support/android/aar/cmake/SDL3ConfigVersion.cmake.in:SDL3ConfigVersion.cmake"
|
||||
]
|
||||
},
|
||||
"files": {
|
||||
"": [
|
||||
"build-scripts/pkg-support/android/INSTALL.md.in:INSTALL.md",
|
||||
"LICENSE.txt",
|
||||
"README.md"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@@ -50,6 +50,7 @@ my $optionsfname = undef;
|
||||
my $wikipreamble = undef;
|
||||
my $wikiheaderfiletext = 'Defined in %fname%';
|
||||
my $manpageheaderfiletext = 'Defined in %fname%';
|
||||
my $manpagesymbolfilterregex = undef;
|
||||
my $headercategoryeval = undef;
|
||||
my $quickrefenabled = 0;
|
||||
my @quickrefcategoryorder;
|
||||
@@ -127,6 +128,7 @@ if (defined $optionsfname) {
|
||||
$wikipreamble = $val, next if $key eq 'wikipreamble';
|
||||
$wikiheaderfiletext = $val, next if $key eq 'wikiheaderfiletext';
|
||||
$manpageheaderfiletext = $val, next if $key eq 'manpageheaderfiletext';
|
||||
$manpagesymbolfilterregex = $val, next if $key eq 'manpagesymbolfilterregex';
|
||||
$headercategoryeval = $val, next if $key eq 'headercategoryeval';
|
||||
$quickrefenabled = int($val), next if $key eq 'quickrefenabled';
|
||||
@quickrefcategoryorder = split(/,/, $val), next if $key eq 'quickrefcategoryorder';
|
||||
@@ -2758,6 +2760,7 @@ __EOF__
|
||||
my $sym = $_;
|
||||
next if not defined $wikisyms{$sym}; # don't have a page for that function, skip it.
|
||||
next if $sym =~ /\A\[category documentation\]/; # not real symbols
|
||||
next if (defined $manpagesymbolfilterregex) && ($sym =~ /$manpagesymbolfilterregex/);
|
||||
my $symtype = $headersymstype{$sym};
|
||||
my $wikitype = $wikitypes{$sym};
|
||||
my $sectionsref = $wikisyms{$sym};
|
||||
@@ -2789,7 +2792,8 @@ __EOF__
|
||||
my $decl = $headerdecls{$sym};
|
||||
my $str = '';
|
||||
|
||||
$brief = "$brief";
|
||||
# the "$brief" makes sure this is a copy of the string, which is doing some weird reference thing otherwise.
|
||||
$brief = defined $brief ? "$brief" : '';
|
||||
$brief =~ s/\A[\s\n]*\= .*? \=\s*?\n+//ms;
|
||||
$brief =~ s/\A[\s\n]*\=\= .*? \=\=\s*?\n+//ms;
|
||||
$brief =~ s/\A(.*?\.) /$1\n/; # \brief should only be one sentence, delimited by a period+space. Split if necessary.
|
||||
|
@@ -376,24 +376,6 @@ function(SDL_PrintSummary)
|
||||
message(STATUS "")
|
||||
endif()
|
||||
|
||||
if(WARN_ABOUT_ARM_SIMD_ASM_MIT)
|
||||
message(STATUS "SDL is being built with ARM SIMD optimizations, which")
|
||||
message(STATUS "uses code licensed under the MIT license. If this is a")
|
||||
message(STATUS "problem, please disable that code by rerunning CMake with:")
|
||||
message(STATUS "")
|
||||
message(STATUS " -DSDL_ARMSIMD=OFF")
|
||||
message(STATUS "")
|
||||
endif()
|
||||
|
||||
if(WARN_ABOUT_ARM_NEON_ASM_MIT)
|
||||
message(STATUS "SDL is being built with ARM NEON optimizations, which")
|
||||
message(STATUS "uses code licensed under the MIT license. If this is a")
|
||||
message(STATUS "problem, please disable that code by rerunning CMake with:")
|
||||
message(STATUS "")
|
||||
message(STATUS " -DSDL_ARMNEON=OFF")
|
||||
message(STATUS "")
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT (ANDROID OR APPLE OR EMSCRIPTEN OR HAIKU OR RISCOS))
|
||||
if(NOT (HAVE_X11 OR HAVE_WAYLAND))
|
||||
if(NOT SDL_UNIX_CONSOLE_BUILD)
|
||||
|
@@ -1245,7 +1245,21 @@ endmacro()
|
||||
macro(CheckLibUnwind)
|
||||
if(TARGET SDL3_test)
|
||||
set(found_libunwind FALSE)
|
||||
set(_libunwind_src "#include <libunwind.h>\nint main() {unw_context_t context; unw_getcontext(&context); return 0;}")
|
||||
set(_libunwind_src [==[
|
||||
#include <libunwind.h>
|
||||
int main(int argc, char *argv[]) {
|
||||
(void)argc; (void)argv;
|
||||
unw_context_t context;
|
||||
unw_cursor_t cursor;
|
||||
unw_word_t pc;
|
||||
char sym[256];
|
||||
unw_word_t offset;
|
||||
unw_getcontext(&context);
|
||||
unw_step(&cursor);
|
||||
unw_get_reg(&cursor, UNW_REG_IP, &pc);
|
||||
unw_get_proc_name(&cursor, sym, sizeof(sym), &offset);
|
||||
return 0;
|
||||
}]==])
|
||||
|
||||
if(NOT found_libunwind)
|
||||
cmake_push_check_state()
|
||||
|
@@ -6,7 +6,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
SDL_SetMainReady();
|
||||
if (!SDL_Init(0)) {
|
||||
SDL_Log("Could not initialize SDL: %s\n", SDL_GetError());
|
||||
SDL_Log("Could not initialize SDL: %s", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
SDL_Delay(100);
|
||||
|
@@ -6,12 +6,12 @@ int main(int argc, char *argv[])
|
||||
SDL_Window *window = NULL;
|
||||
SDL_Surface *screenSurface = NULL;
|
||||
if (!SDL_Init(SDL_INIT_VIDEO)) {
|
||||
SDL_Log("Could not initialize SDL: %s\n", SDL_GetError());
|
||||
SDL_Log("Could not initialize SDL: %s", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
window = SDL_CreateWindow("Hello SDL", 640, 480, 0);
|
||||
if (!window) {
|
||||
SDL_Log("could not create window: %s\n", SDL_GetError());
|
||||
SDL_Log("could not create window: %s", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
screenSurface = SDL_GetWindowSurface(window);
|
||||
|
@@ -18,7 +18,7 @@ int MYLIBRARY_EXPORT mylibrary_work(void);
|
||||
int mylibrary_init(void) {
|
||||
SDL_SetMainReady();
|
||||
if (!SDL_Init(0)) {
|
||||
SDL_Log("Could not initialize SDL: %s\n", SDL_GetError());
|
||||
SDL_Log("Could not initialize SDL: %s", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
17
docs/INTRO-androidstudio.md
Normal file
17
docs/INTRO-androidstudio.md
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
# Introduction to SDL with Android Studio
|
||||
|
||||
We'll start by creating a simple project to build and run [hello.c](hello.c)
|
||||
|
||||
- Use our handy script to create a template project:
|
||||
```sh
|
||||
./build-scripts/create-android-project.py org.libsdl.hello docs/hello.c
|
||||
```
|
||||
- Run Android Studio and open the newly created build/org.libsdl.hello directory
|
||||
- Build and run!
|
||||
|
||||
A more complete example is available at:
|
||||
|
||||
https://github.com/Ravbug/sdl3-sample
|
||||
|
||||
Additional information and troubleshooting is available in [README-android.md](README-android.md)
|
50
docs/INTRO-cmake.md
Normal file
50
docs/INTRO-cmake.md
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
# Introduction to SDL with CMake
|
||||
|
||||
The easiest way to use SDL is to include it as a subproject in your project.
|
||||
|
||||
We'll start by creating a simple project to build and run [hello.c](hello.c)
|
||||
|
||||
Create the file CMakeLists.txt
|
||||
```cmake
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(hello)
|
||||
|
||||
# set the output directory for built objects.
|
||||
# This makes sure that the dynamic library goes into the build directory automatically.
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/$<CONFIGURATION>")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/$<CONFIGURATION>")
|
||||
|
||||
# This assumes the SDL source is available in vendored/SDL
|
||||
add_subdirectory(vendored/SDL EXCLUDE_FROM_ALL)
|
||||
|
||||
# Create your game executable target as usual
|
||||
add_executable(hello WIN32 hello.c)
|
||||
|
||||
# Link to the actual SDL3 library.
|
||||
target_link_libraries(hello PRIVATE SDL3::SDL3)
|
||||
```
|
||||
|
||||
Build:
|
||||
```sh
|
||||
cmake -S . -B build
|
||||
cmake --build build
|
||||
```
|
||||
|
||||
Run:
|
||||
- On Windows the executable is in the build Debug directory:
|
||||
```sh
|
||||
cd build/Debug
|
||||
./hello
|
||||
```
|
||||
- On other platforms the executable is in the build directory:
|
||||
```sh
|
||||
cd build
|
||||
./hello
|
||||
```
|
||||
|
||||
A more complete example is available at:
|
||||
|
||||
https://github.com/Ravbug/sdl3-sample
|
||||
|
||||
Additional information and troubleshooting is available in [README-cmake.md](README-cmake.md)
|
50
docs/INTRO-emscripten.md
Normal file
50
docs/INTRO-emscripten.md
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
# Introduction to SDL with Emscripten
|
||||
|
||||
The easiest way to use SDL is to include it as a subproject in your project.
|
||||
|
||||
We'll start by creating a simple project to build and run [hello.c](hello.c)
|
||||
|
||||
First, you should have the Emscripten SDK installed from:
|
||||
|
||||
https://emscripten.org/docs/getting_started/downloads.html
|
||||
|
||||
Create the file CMakeLists.txt
|
||||
```cmake
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(hello)
|
||||
|
||||
# set the output directory for built objects.
|
||||
# This makes sure that the dynamic library goes into the build directory automatically.
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/$<CONFIGURATION>")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/$<CONFIGURATION>")
|
||||
|
||||
# This assumes the SDL source is available in vendored/SDL
|
||||
add_subdirectory(vendored/SDL EXCLUDE_FROM_ALL)
|
||||
|
||||
# on Web targets, we need CMake to generate a HTML webpage.
|
||||
if(EMSCRIPTEN)
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ".html" CACHE INTERNAL "")
|
||||
endif()
|
||||
|
||||
# Create your game executable target as usual
|
||||
add_executable(hello WIN32 hello.c)
|
||||
|
||||
# Link to the actual SDL3 library.
|
||||
target_link_libraries(hello PRIVATE SDL3::SDL3)
|
||||
```
|
||||
|
||||
Build:
|
||||
```sh
|
||||
emcmake cmake -S . -B build
|
||||
cd build
|
||||
emmake make
|
||||
```
|
||||
|
||||
You can now run your app by pointing a webserver at your build directory and connecting a web browser to it, opening hello.html
|
||||
|
||||
A more complete example is available at:
|
||||
|
||||
https://github.com/Ravbug/sdl3-sample
|
||||
|
||||
Additional information and troubleshooting is available in [README-emscripten.md](README-emscripten.md)
|
14
docs/INTRO-visualstudio.md
Normal file
14
docs/INTRO-visualstudio.md
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
# Introduction to SDL with Visual Studio
|
||||
|
||||
The easiest way to use SDL is to include it as a subproject in your project.
|
||||
|
||||
We'll start by creating a simple project to build and run [hello.c](hello.c)
|
||||
|
||||
- Create a new project in Visual Studio, using the C++ Empty Project template
|
||||
- Add hello.c to the Source Files
|
||||
- Right click the solution, select add an existing project, navigate to VisualC/SDL and add SDL.vcxproj
|
||||
- Select your main project and go to Project -> Add Reference and select SDL3
|
||||
- Select your main project and go to Project -> Properties, set the filter at the top to "All Configurations" and "All Platforms", select VC++ Directories and add the SDL include directory to "Include Directories"
|
||||
- Build and run!
|
||||
|
16
docs/INTRO-xcode.md
Normal file
16
docs/INTRO-xcode.md
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
# Introduction to SDL with Xcode
|
||||
|
||||
The easiest way to use SDL is to include it as a subproject in your project.
|
||||
|
||||
We'll start by creating a simple project to build and run [hello.c](hello.c)
|
||||
|
||||
- Create a new project in Xcode, using the App template and selecting Objective C as the language
|
||||
- Remove the .h and .m files that were automatically added to the project
|
||||
- Remove the main storyboard that was automatically added to the project
|
||||
- On iOS projects, select the project, select the main target, select the Info tab, look for "Custom iOS Target Properties", and remove "Main storyboard base file name" and "Application Scene Manifest"
|
||||
- Right click the project and select "Add Files to [project]", navigate to the SDL docs directory and add the file hello.c
|
||||
- Right click the project and select "Add Files to [project]", navigate to the SDL Xcode/SDL directory and add SDL.xcodeproj
|
||||
- Select the project, select the main target, select the General tab, look for "Frameworks, Libaries, and Embedded Content", and add SDL3.framework
|
||||
- Build and run!
|
||||
|
6
docs/README-bsd.md
Normal file
6
docs/README-bsd.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# FreeBSD / OpenBSD / NetBSD
|
||||
|
||||
SDL is fully supported on BSD platforms, and is built using [CMake](README-cmake.md).
|
||||
|
||||
If you want to run on the console, you can take a look at [KMSDRM support on BSD](README-kmsbsd.md)
|
||||
|
@@ -2,60 +2,72 @@
|
||||
|
||||
[www.cmake.org](https://www.cmake.org/)
|
||||
|
||||
The CMake build system is supported on the following platforms:
|
||||
The CMake build system is supported with the following environments:
|
||||
|
||||
* FreeBSD
|
||||
* Linux
|
||||
* Microsoft Visual C
|
||||
* MinGW and Msys
|
||||
* macOS, iOS, tvOS, and visionOS with support for XCode
|
||||
* Android
|
||||
* Emscripten
|
||||
* NetBSD
|
||||
* FreeBSD
|
||||
* Haiku
|
||||
* Linux
|
||||
* macOS, iOS, tvOS, and visionOS with support for XCode
|
||||
* Microsoft Visual Studio
|
||||
* MinGW and Msys
|
||||
* NetBSD
|
||||
* Nintendo 3DS
|
||||
* PlayStation 2
|
||||
* PlayStation Portable
|
||||
* PlayStation Vita
|
||||
* QNX 7.x/8.x
|
||||
* RiscOS
|
||||
* RISC OS
|
||||
|
||||
## Building SDL
|
||||
## Building SDL on Windows
|
||||
|
||||
Assuming the source tree of SDL is located at `~/sdl`,
|
||||
this will configure and build SDL in the `~/build` directory:
|
||||
Assuming you're in the SDL source directory, building and installing to C:/SDL can be done with:
|
||||
```sh
|
||||
cmake -S ~/sdl -B ~/build
|
||||
cmake --build ~/build
|
||||
cmake -S . -B build
|
||||
cmake --build build --config RelWithDebInfo
|
||||
cmake --install build --config RelWithDebInfo --prefix C:/SDL
|
||||
```
|
||||
|
||||
Installation can be done using:
|
||||
## Building SDL on UNIX
|
||||
|
||||
SDL will build with very few dependencies, but for full functionality you should install the packages detailed in [README-linux.md](README-linux.md).
|
||||
|
||||
Assuming you're in the SDL source directory, building and installing to /usr/local can be done with:
|
||||
```sh
|
||||
cmake --install ~/build --prefix /usr/local # '--install' requires CMake 3.15, or newer
|
||||
cmake -S . -B build
|
||||
cmake --build build
|
||||
sudo cmake --install build --prefix /usr/local
|
||||
```
|
||||
|
||||
This will install SDL to /usr/local.
|
||||
## Building SDL on macOS
|
||||
|
||||
### Building SDL tests
|
||||
Assuming you're in the SDL source directory, building and installing to ~/SDL can be done with:
|
||||
```sh
|
||||
cmake -S . -B build -DSDL_FRAMEWORK=ON -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
|
||||
cmake --build build
|
||||
cmake --install build --prefix ~/SDL
|
||||
```
|
||||
|
||||
## Building SDL tests
|
||||
|
||||
You can build the SDL test programs by adding `-DSDL_TESTS=ON` to the first cmake command above:
|
||||
```sh
|
||||
cmake -S ~/sdl -B ~/build -DSDL_TEST_LIBRARY=ON -DSDL_TESTS=ON
|
||||
cmake -S . -B build -DSDL_TESTS=ON
|
||||
```
|
||||
and then building normally. In this example, the test programs will be built and can be run from `~/build/tests/`.
|
||||
and then building normally. The test programs will be built and can be run from `build/test/`.
|
||||
|
||||
### Building SDL examples
|
||||
## Building SDL examples
|
||||
|
||||
You can build the SDL example programs by adding `-DSDL_EXAMPLES=ON` to the first cmake command above:
|
||||
```sh
|
||||
cmake -S ~/sdl -B ~/build -DSDL_EXAMPLES=ON
|
||||
cmake -S . -B build -DSDL_EXAMPLES=ON
|
||||
```
|
||||
and then building normally. In this example, the example programs will be built and can be run from `~/build/examples/`.
|
||||
and then building normally. The example programs will be built and can be run from `build/examples/`.
|
||||
|
||||
## Including SDL in your project
|
||||
|
||||
SDL can be included in your project in 2 major ways:
|
||||
- using a system SDL library, provided by your (*nix) distribution or a package manager
|
||||
- using a system SDL library, provided by your (UNIX) distribution or a package manager
|
||||
- using a vendored SDL library: this is SDL copied or symlinked in a subfolder.
|
||||
|
||||
The following CMake script supports both, depending on the value of `MYGAME_VENDORED`.
|
||||
@@ -131,6 +143,13 @@ Exceptions exist:
|
||||
- some platforms don't support dynamic libraries, so only `-DSDL_STATIC=ON` makes sense.
|
||||
- a static Apple framework is not supported
|
||||
|
||||
### Man pages
|
||||
|
||||
Configuring with `-DSDL_INSTALL_DOCS=TRUE` installs man pages.
|
||||
|
||||
We recommend package managers of unix distributions to install SDL3's man pages.
|
||||
This adds an extra build-time dependency on Perl.
|
||||
|
||||
### Pass custom compile options to the compiler
|
||||
|
||||
- Use [`CMAKE_<LANG>_FLAGS`](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html) to pass extra
|
||||
@@ -174,7 +193,7 @@ Only shared frameworks are supported, no static ones.
|
||||
|
||||
#### Platforms
|
||||
|
||||
Use `-DCMAKE_PLATFORM_NAME=<value>` to configure the platform. CMake can target only one platform at a time.
|
||||
Use `-DCMAKE_SYSTEM_NAME=<value>` to configure the platform. CMake can target only one platform at a time.
|
||||
|
||||
| Apple platform | `CMAKE_SYSTEM_NAME` value |
|
||||
|-----------------|---------------------------|
|
||||
@@ -343,114 +362,3 @@ However, by default CMake builds static libraries as non-relocatable.
|
||||
Configuring SDL with `-DCMAKE_POSITION_INDEPENDENT_CODE=ON` will result in a static `libSDL3.a` library
|
||||
which you can link against to create a shared library.
|
||||
|
||||
## Help, it doesn't work!
|
||||
|
||||
Below, a SDL3 CMake project can be found that builds 99.9% of time (assuming you have internet connectivity).
|
||||
When you have a problem with building or using SDL, please modify it until it reproduces your issue.
|
||||
|
||||
```cmake
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(sdl_issue)
|
||||
|
||||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
# !!!!!! !!!!!!
|
||||
# !!!!!! This CMake script is not using "CMake best practices". !!!!!!
|
||||
# !!!!!! Don't use it in your project. !!!!!!
|
||||
# !!!!!! !!!!!!
|
||||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
# 1. Try system SDL3 package first
|
||||
find_package(SDL3 QUIET)
|
||||
if(SDL3_FOUND)
|
||||
message(STATUS "Using SDL3 via find_package")
|
||||
endif()
|
||||
|
||||
# 2. Try using a vendored SDL library
|
||||
if(NOT SDL3_FOUND AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL/CMakeLists.txt")
|
||||
add_subdirectory(SDL EXCLUDE_FROM_ALL)
|
||||
message(STATUS "Using SDL3 via add_subdirectory")
|
||||
set(SDL3_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
# 3. Download SDL, and use that.
|
||||
if(NOT SDL3_FOUND)
|
||||
include(FetchContent)
|
||||
set(SDL_SHARED TRUE CACHE BOOL "Build a SDL shared library (if available)")
|
||||
set(SDL_STATIC TRUE CACHE BOOL "Build a SDL static library (if available)")
|
||||
FetchContent_Declare(
|
||||
SDL
|
||||
GIT_REPOSITORY https://github.com/libsdl-org/SDL.git
|
||||
GIT_TAG main # Replace this with a particular git tag or git hash
|
||||
GIT_SHALLOW TRUE
|
||||
GIT_PROGRESS TRUE
|
||||
)
|
||||
message(STATUS "Using SDL3 via FetchContent")
|
||||
FetchContent_MakeAvailable(SDL)
|
||||
set_property(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/_deps/sdl-src" PROPERTY EXCLUDE_FROM_ALL TRUE)
|
||||
endif()
|
||||
|
||||
file(WRITE main.c [===========================================[
|
||||
/**
|
||||
* Modify this source such that it reproduces your problem.
|
||||
*/
|
||||
|
||||
/* START of source modifications */
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
/*
|
||||
* SDL3/SDL_main.h is explicitly not included such that a terminal window would appear on Windows.
|
||||
*/
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
if (!SDL_Init(SDL_INIT_VIDEO)) {
|
||||
SDL_Log("SDL_Init failed (%s)", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
|
||||
SDL_Window *window = NULL;
|
||||
SDL_Renderer *renderer = NULL;
|
||||
|
||||
if (!SDL_CreateWindowAndRenderer("SDL issue", 640, 480, 0, &window, &renderer)) {
|
||||
SDL_Log("SDL_CreateWindowAndRenderer failed (%s)", SDL_GetError());
|
||||
SDL_Quit();
|
||||
return 1;
|
||||
}
|
||||
|
||||
while (1) {
|
||||
int finished = 0;
|
||||
SDL_Event event;
|
||||
while (SDL_PollEvent(&event)) {
|
||||
if (event.type == SDL_EVENT_QUIT) {
|
||||
finished = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (finished) {
|
||||
break;
|
||||
}
|
||||
|
||||
SDL_SetRenderDrawColor(renderer, 80, 80, 80, SDL_ALPHA_OPAQUE);
|
||||
SDL_RenderClear(renderer);
|
||||
SDL_RenderPresent(renderer);
|
||||
}
|
||||
|
||||
SDL_DestroyRenderer(renderer);
|
||||
SDL_DestroyWindow(window);
|
||||
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* END of source modifications */
|
||||
|
||||
]===========================================])
|
||||
|
||||
add_executable(sdl_issue main.c)
|
||||
|
||||
target_link_libraries(sdl_issue PRIVATE SDL3::SDL3)
|
||||
# target_link_libraries(sdl_issue PRIVATE SDL3::SDL3-shared)
|
||||
# target_link_libraries(sdl_issue PRIVATE SDL3::SDL3-static)
|
||||
```
|
||||
|
@@ -57,7 +57,7 @@ If you had already forked the repository, you may update it from the web page us
|
||||
|
||||
Code formatting is done using a custom `.clang-format` file, you can learn more about how to run it [here](https://clang.llvm.org/docs/ClangFormat.html).
|
||||
|
||||
Some legacy code may not be formatted, as such avoid formatting the whole file at once and only format around your changes.
|
||||
Some legacy code may not be formatted, so please avoid formatting the whole file at once and only format around your changes.
|
||||
|
||||
For your commit message to be properly displayed on GitHub, it should contain:
|
||||
|
||||
|
@@ -239,13 +239,13 @@ If you want to build with thread support, something like this works:
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
emcmake cmake -DSDL_THREADS=On ..
|
||||
emcmake cmake -DSDL_THREADS=ON ..
|
||||
# you can also do `emcmake cmake -G Ninja ..` and then use `ninja` instead of this command.
|
||||
emmake make -j4
|
||||
```
|
||||
|
||||
To build the tests, add `-DSDL_TESTS=On` to the `emcmake cmake` command line.
|
||||
To build the examples, add `-DSDL_EXAMPLES=On` to the `emcmake cmake` command line.
|
||||
To build the tests, add `-DSDL_TESTS=ON` to the `emcmake cmake` command line.
|
||||
To build the examples, add `-DSDL_EXAMPLES=ON` to the `emcmake cmake` command line.
|
||||
|
||||
|
||||
## Building your app
|
||||
|
@@ -1,16 +0,0 @@
|
||||
git
|
||||
=========
|
||||
|
||||
The latest development version of SDL is available via git.
|
||||
Git allows you to get up-to-the-minute fixes and enhancements;
|
||||
as a developer works on a source tree, you can use "git" to mirror that
|
||||
source tree instead of waiting for an official release. Please look
|
||||
at the Git website ( https://git-scm.com/ ) for more
|
||||
information on using git, where you can also download software for
|
||||
macOS, Windows, and Unix systems.
|
||||
|
||||
git clone https://github.com/libsdl-org/SDL
|
||||
|
||||
There is a web interface to the Git repository at:
|
||||
http://github.com/libsdl-org/SDL/
|
||||
|
4
docs/README-haiku.md
Normal file
4
docs/README-haiku.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Haiku OS
|
||||
|
||||
SDL is fully supported on Haiku OS, and is built using [CMake](README-cmake.md).
|
||||
|
@@ -1,10 +1,10 @@
|
||||
iOS
|
||||
======
|
||||
|
||||
Building the Simple DirectMedia Layer for iOS 9.0+
|
||||
Building the Simple DirectMedia Layer for iOS 11.0+
|
||||
==============================================================================
|
||||
|
||||
Requirements: macOS 10.9 or later and the iOS 9.0 or newer SDK.
|
||||
Please note that building SDL requires at least Xcode 12.2 and the iOS 14.2 SDK.
|
||||
|
||||
Instructions:
|
||||
|
||||
@@ -185,9 +185,6 @@ Windows:
|
||||
Textures:
|
||||
The optimal texture formats on iOS are SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_XBGR8888, and SDL_PIXELFORMAT_RGB24 pixel formats.
|
||||
|
||||
Loading Shared Objects:
|
||||
This is disabled by default since it seems to break the terms of the iOS SDK agreement for iOS versions prior to iOS 8. It can be re-enabled in SDL_config_ios.h.
|
||||
|
||||
|
||||
Notes -- CoreBluetooth.framework
|
||||
==============================================================================
|
||||
@@ -249,7 +246,7 @@ Note that if you are using main callbacks instead of a standard C main() functio
|
||||
Deploying to older versions of iOS
|
||||
==============================================================================
|
||||
|
||||
SDL supports deploying to older versions of iOS than are supported by the latest version of Xcode, all the way back to iOS 8.0
|
||||
SDL supports deploying to older versions of iOS than are supported by the latest version of Xcode, all the way back to iOS 11.0
|
||||
|
||||
In order to do that you need to download an older version of Xcode:
|
||||
https://developer.apple.com/download/more/?name=Xcode
|
||||
|
@@ -13,7 +13,7 @@ To build SDL using the command line, use the CMake build script:
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11
|
||||
cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13
|
||||
cmake --build .
|
||||
sudo cmake --install .
|
||||
```
|
||||
@@ -25,15 +25,12 @@ You can also build SDL as a Universal library (a single binary for both
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11
|
||||
cmake .. "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13
|
||||
cmake --build .
|
||||
sudo cmake --install .
|
||||
```
|
||||
|
||||
Please note that building SDL requires at least Xcode 12.2 and the 11.0 SDK.
|
||||
PowerPC support for macOS has been officially dropped as of SDL 2.0.2.
|
||||
32-bit Intel and macOS 10.8 runtime support has been officially dropped as
|
||||
of SDL 2.24.0.
|
||||
Please note that building SDL requires at least Xcode 12.2 and the macOS 11.0 SDK.
|
||||
|
||||
To use the library once it's built, you essential have two possibilities:
|
||||
use the traditional autoconf/automake/make method, or use Xcode.
|
||||
|
@@ -193,7 +193,7 @@ Rather than iterating over audio devices using a device index, there are new fun
|
||||
if (devices) {
|
||||
for (i = 0; i < num_devices; ++i) {
|
||||
SDL_AudioDeviceID instance_id = devices[i];
|
||||
SDL_Log("AudioDevice %" SDL_PRIu32 ": %s\n", instance_id, SDL_GetAudioDeviceName(instance_id));
|
||||
SDL_Log("AudioDevice %" SDL_PRIu32 ": %s", instance_id, SDL_GetAudioDeviceName(instance_id));
|
||||
}
|
||||
SDL_free(devices);
|
||||
}
|
||||
@@ -749,7 +749,7 @@ Rather than iterating over haptic devices using device index, there is a new fun
|
||||
if (haptics) {
|
||||
for (i = 0; i < num_haptics; ++i) {
|
||||
SDL_HapticID instance_id = haptics[i];
|
||||
SDL_Log("Haptic %" SDL_PRIu32 ": %s\n", instance_id, SDL_GetHapticNameForID(instance_id));
|
||||
SDL_Log("Haptic %" SDL_PRIu32 ": %s", instance_id, SDL_GetHapticNameForID(instance_id));
|
||||
}
|
||||
SDL_free(haptics);
|
||||
}
|
||||
@@ -917,7 +917,7 @@ Rather than iterating over joysticks using device index, there is a new function
|
||||
const char *name = SDL_GetJoystickNameForID(instance_id);
|
||||
const char *path = SDL_GetJoystickPathForID(instance_id);
|
||||
|
||||
SDL_Log("Joystick %" SDL_PRIu32 ": %s%s%s VID 0x%.4x, PID 0x%.4x\n",
|
||||
SDL_Log("Joystick %" SDL_PRIu32 ": %s%s%s VID 0x%.4x, PID 0x%.4x",
|
||||
instance_id, name ? name : "Unknown", path ? ", " : "", path ? path : "", SDL_GetJoystickVendorForID(instance_id), SDL_GetJoystickProductForID(instance_id));
|
||||
}
|
||||
SDL_free(joysticks);
|
||||
@@ -1031,6 +1031,9 @@ The following structures have been removed:
|
||||
|
||||
SDL_Keycode is now Uint32 and the SDLK_* constants are now defines instead of an enum, to more clearly reflect that they are a subset of the possible values of an SDL_Keycode.
|
||||
|
||||
In addition to the `SDLK_SCANCODE_MASK` bit found on key codes that directly map to scancodes, there is now the
|
||||
`SDLK_EXTENDED_MASK` bit used to denote key codes that don't have a corresponding scancode, and aren't a unicode value.
|
||||
|
||||
The following symbols have been removed:
|
||||
|
||||
* KMOD_RESERVED - No replacement. A bit named "RESERVED" probably shouldn't be used in an app, but if you need it, this was equivalent to KMOD_SCROLL (0x8000) in SDL2.
|
||||
@@ -1262,6 +1265,7 @@ The following symbols have been renamed:
|
||||
The following functions have been removed:
|
||||
* SDL_FreeFormat()
|
||||
* SDL_SetPixelFormatPalette()
|
||||
* SDL_CalculateGammaRamp()
|
||||
|
||||
The following macros have been removed:
|
||||
* SDL_Colour - use SDL_Color instead
|
||||
@@ -1692,7 +1696,7 @@ Rather than iterating over sensors using device index, there is a new function S
|
||||
SDL_SensorID *sensors = SDL_GetSensors(&num_sensors);
|
||||
if (sensors) {
|
||||
for (i = 0; i < num_sensors; ++i) {
|
||||
SDL_Log("Sensor %" SDL_PRIu32 ": %s, type %d, platform type %d\n",
|
||||
SDL_Log("Sensor %" SDL_PRIu32 ": %s, type %d, platform type %d",
|
||||
sensors[i],
|
||||
SDL_GetSensorNameForID(sensors[i]),
|
||||
SDL_GetSensorTypeForID(sensors[i]),
|
||||
@@ -2117,7 +2121,7 @@ Rather than iterating over displays using display index, there is a new function
|
||||
SDL_DisplayID instance_id = displays[i];
|
||||
const char *name = SDL_GetDisplayName(instance_id);
|
||||
|
||||
SDL_Log("Display %" SDL_PRIu32 ": %s\n", instance_id, name ? name : "Unknown");
|
||||
SDL_Log("Display %" SDL_PRIu32 ": %s", instance_id, name ? name : "Unknown");
|
||||
}
|
||||
SDL_free(displays);
|
||||
}
|
||||
@@ -2163,7 +2167,7 @@ Rather than iterating over display modes using an index, there is a new function
|
||||
if (modes) {
|
||||
for (i = 0; i < num_modes; ++i) {
|
||||
SDL_DisplayMode *mode = modes[i];
|
||||
SDL_Log("Display %" SDL_PRIu32 " mode %d: %dx%d@%gx %gHz\n",
|
||||
SDL_Log("Display %" SDL_PRIu32 " mode %d: %dx%d@%gx %gHz",
|
||||
display, i, mode->w, mode->h, mode->pixel_density, mode->refresh_rate);
|
||||
}
|
||||
SDL_free(modes);
|
||||
@@ -2177,7 +2181,7 @@ Windows now have an explicit fullscreen mode that is set, using SDL_SetWindowFul
|
||||
|
||||
SDL_WINDOW_FULLSCREEN_DESKTOP has been removed, and you can call SDL_GetWindowFullscreenMode() to see whether an exclusive fullscreen mode will be used or the borderless fullscreen desktop mode will be used when the window is fullscreen.
|
||||
|
||||
SDL_SetWindowBrightness and SDL_SetWindowGammaRamp have been removed from the API, because they interact poorly with modern operating systems and aren't able to limit their effects to the SDL window.
|
||||
SDL_SetWindowBrightness(), SDL_GetWindowBrightness, SDL_SetWindowGammaRamp(), and SDL_GetWindowGammaRamp have been removed from the API, because they interact poorly with modern operating systems and aren't able to limit their effects to the SDL window.
|
||||
|
||||
Programs which have access to shaders can implement more robust versions of those functions using custom shader code rendered as a post-process effect.
|
||||
|
||||
@@ -2221,6 +2225,10 @@ The following functions have been removed:
|
||||
* SDL_CreateWindowFrom() - use SDL_CreateWindowWithProperties() with the properties that allow you to wrap an existing window
|
||||
* SDL_SetWindowInputFocus() - use SDL_RaiseWindow() instead
|
||||
* SDL_SetWindowModalFor() - use SDL_SetWindowParent() with SDL_SetWindowModal() instead
|
||||
* SDL_SetWindowBrightness() - use a shader or other in-game effect.
|
||||
* SDL_GetWindowBrightness() - use a shader or other in-game effect.
|
||||
* SDL_SetWindowGammaRamp() - use a shader or other in-game effect.
|
||||
* SDL_GetWindowGammaRamp() - use a shader or other in-game effect.
|
||||
|
||||
The SDL_Window id type is named SDL_WindowID
|
||||
|
||||
|
@@ -1,8 +1,40 @@
|
||||
Platforms
|
||||
=========
|
||||
# Platforms
|
||||
|
||||
We maintain the list of supported platforms on our wiki now, and how to
|
||||
build and install SDL for those platforms:
|
||||
## Supported Platforms
|
||||
|
||||
https://wiki.libsdl.org/Installation
|
||||
- [Android](README-android.md)
|
||||
- [Emscripten](README-emscripten.md)
|
||||
- [FreeBSD](README-bsd.md)
|
||||
- [Haiku OS](README-haiku.md)
|
||||
- [iOS](README-ios.md)
|
||||
- [Linux](README-linux.md)
|
||||
- [macOS](README-macos.md)
|
||||
- [NetBSD](README-bsd.md)
|
||||
- [Nintendo Switch](README-switch.md)
|
||||
- [Nintendo 3DS](README-3ds.md)
|
||||
- [OpenBSD](README-bsd.md)
|
||||
- [PlayStation 2](README-ps2.md)
|
||||
- [PlayStation 4](README-ps4.md)
|
||||
- [PlayStation 5](README-ps5.md)
|
||||
- [PlayStation Portable](README-psp.md)
|
||||
- [PlayStation Vita](README-vita.md)
|
||||
- [RISC OS](README-riscos.md)
|
||||
- [SteamOS](README-steamos.md)
|
||||
- [tvOS](README-ios.md)
|
||||
- [Windows](README-windows.md)
|
||||
- [Windows GDK](README-gdk.md)
|
||||
- [Xbox](README-gdk.md)
|
||||
|
||||
## Unsupported Platforms
|
||||
|
||||
If your favorite system is listed below, we aren't working on it. However, if you send reasonable patches and are willing to support the port in the long term, we are happy to take a look!
|
||||
|
||||
All of these still work with [SDL2](/SDL2), which is an incompatible API, but an option if you need to support these platforms still.
|
||||
|
||||
- Google Stadia
|
||||
- NaCL
|
||||
- Nokia N-Gage
|
||||
- OS/2
|
||||
- QNX
|
||||
- WinPhone
|
||||
- WinRT/UWP
|
||||
|
3
docs/README-ps4.md
Normal file
3
docs/README-ps4.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Sony PlayStation 4
|
||||
|
||||
SDL3 runs on the PS4! There are commercial games shipping with this port. This port is kept in a separate repository, but is available for free, under the zlib license, to anyone that is under NDA for PlayStation development with Sony. Please contact Ryan (icculus at icculus dot org) for details.
|
3
docs/README-ps5.md
Normal file
3
docs/README-ps5.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Sony PlayStation 5
|
||||
|
||||
SDL3 runs on the PS5! There are commercial games shipping with this port. This port is kept in a separate repository, but is available for free, under the zlib license, to anyone that is under NDA for PlayStation development with Sony. Please contact Ryan (icculus at icculus dot org) for details.
|
@@ -1,188 +0,0 @@
|
||||
Raspberry Pi
|
||||
============
|
||||
|
||||
Requirements:
|
||||
|
||||
Raspberry Pi OS (other Linux distros may work as well).
|
||||
|
||||
In modern times, the Raspberry Pi works mostly like any other Linux device:
|
||||
for video, you can use X11, Wayland, or KMSDRM. For audio, you can use ALSA,
|
||||
PulseAudio, or PipeWire, etc. OpenGL, OpenGL ES, and Vulkan are known to work.
|
||||
|
||||
There is a video backend in SDL called "rpi" that uses a deprecated Broadcom
|
||||
interface (named "dispmanx") to draw directly to the console without X11.
|
||||
Newer Raspberry Pi OS releases don't support this (and work fine with our
|
||||
"kmsdrm" backend for the same purposes, a standard Linux interface). Don't
|
||||
panic if you can't use this backend, or CMake says it can't find libraries it
|
||||
needs for this.
|
||||
|
||||
SDL has, in past times, worked on the original Raspberry Pi and the RPi 2, but
|
||||
these devices are no longer targets we actively test; if they broke, please
|
||||
report bugs or send patches!
|
||||
|
||||
The Raspberry Pi 3 and later (in 32-bit and 64-bit mode) are still known to
|
||||
work well at the time of this writing. The Raspberry Pi Zero and Zero 2 are
|
||||
also known to work well.
|
||||
|
||||
|
||||
## Documentation Out Of Date
|
||||
|
||||
The rest of this document is likely out of date; a lot has changed in recent
|
||||
years in both SDL and the Raspberry Pi universe, and this document has not
|
||||
been updated to reflect those details. Take the rest of this information with
|
||||
a grain of salt!
|
||||
|
||||
|
||||
|
||||
NEON
|
||||
----
|
||||
|
||||
If your Pi has NEON support, make sure you add -mfpu=neon to your CFLAGS so
|
||||
that SDL will select some otherwise-disabled highly-optimized code. The
|
||||
original Pi and Pi Zero units don't have NEON; everything from the Pi2/PiZero2
|
||||
and later do.
|
||||
|
||||
|
||||
Cross compiling from x86 Linux
|
||||
------------------------------
|
||||
|
||||
To cross compile SDL for Raspbian from your desktop machine, you'll need a
|
||||
Raspbian system root and the cross compilation tools. We'll assume these tools
|
||||
will be placed in /opt/rpi-tools
|
||||
|
||||
sudo git clone --depth 1 https://github.com/raspberrypi/tools /opt/rpi-tools
|
||||
|
||||
You'll also need a Raspbian binary image.
|
||||
Get it from: http://downloads.raspberrypi.org/raspbian_latest
|
||||
After unzipping, you'll get file with a name like: "<date>-wheezy-raspbian.img"
|
||||
Let's assume the sysroot will be built in /opt/rpi-sysroot.
|
||||
|
||||
export SYSROOT=/opt/rpi-sysroot
|
||||
sudo kpartx -a -v <path_to_raspbian_image>.img
|
||||
sudo mount -o loop /dev/mapper/loop0p2 /mnt
|
||||
sudo cp -r /mnt $SYSROOT
|
||||
sudo apt-get install qemu binfmt-support qemu-user-static
|
||||
sudo cp /usr/bin/qemu-arm-static $SYSROOT/usr/bin
|
||||
sudo mount --bind /dev $SYSROOT/dev
|
||||
sudo mount --bind /proc $SYSROOT/proc
|
||||
sudo mount --bind /sys $SYSROOT/sys
|
||||
|
||||
Now, before chrooting into the ARM sysroot, you'll need to apply a workaround,
|
||||
edit $SYSROOT/etc/ld.so.preload and comment out all lines in it.
|
||||
|
||||
sudo chroot $SYSROOT
|
||||
apt-get install libudev-dev libasound2-dev libdbus-1-dev libraspberrypi0 libraspberrypi-bin libraspberrypi-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev
|
||||
exit
|
||||
sudo umount $SYSROOT/dev
|
||||
sudo umount $SYSROOT/proc
|
||||
sudo umount $SYSROOT/sys
|
||||
sudo umount /mnt
|
||||
|
||||
There's one more fix required, as the libdl.so symlink uses an absolute path
|
||||
which doesn't quite work in our setup.
|
||||
|
||||
sudo rm -rf $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so
|
||||
sudo ln -s ../../../lib/arm-linux-gnueabihf/libdl.so.2 $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so
|
||||
|
||||
The final step is compiling SDL itself.
|
||||
|
||||
export CC="/opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux"
|
||||
cd <SDL SOURCE>
|
||||
mkdir -p build;cd build
|
||||
LDFLAGS="-L$SYSROOT/opt/vc/lib" ../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl3-installed --disable-pulseaudio --disable-esd
|
||||
make
|
||||
make install
|
||||
|
||||
To be able to deploy this to /usr/local in the Raspbian system you need to fix up a few paths:
|
||||
|
||||
perl -w -pi -e "s#$PWD/rpi-sdl3-installed#/usr/local#g;" ./rpi-sdl3-installed/lib/libSDL3.la ./rpi-sdl3-installed/lib/pkgconfig/sdl3.pc
|
||||
|
||||
Apps don't work or poor video/audio performance
|
||||
-----------------------------------------------
|
||||
|
||||
If you get sound problems, buffer underruns, etc, run "sudo rpi-update" to
|
||||
update the RPi's firmware. Note that doing so will fix these problems, but it
|
||||
will also render the CMA - Dynamic Memory Split functionality useless.
|
||||
|
||||
Also, by default the Raspbian distro configures the GPU RAM at 64MB, this is too
|
||||
low in general, specially if a 1080p TV is hooked up.
|
||||
|
||||
See here how to configure this setting: http://elinux.org/RPiconfig
|
||||
|
||||
Using a fixed gpu_mem=128 is the best option (specially if you updated the
|
||||
firmware, using CMA probably won't work, at least it's the current case).
|
||||
|
||||
No input
|
||||
--------
|
||||
|
||||
Make sure you belong to the "input" group.
|
||||
|
||||
sudo usermod -aG input `whoami`
|
||||
|
||||
No HDMI Audio
|
||||
-------------
|
||||
|
||||
If you notice that ALSA works but there's no audio over HDMI, try adding:
|
||||
|
||||
hdmi_drive=2
|
||||
|
||||
to your config.txt file and reboot.
|
||||
|
||||
Reference: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=5062
|
||||
|
||||
Text Input API support
|
||||
----------------------
|
||||
|
||||
The Text Input API is supported, with translation of scan codes done via the
|
||||
kernel symbol tables. For this to work, SDL needs access to a valid console.
|
||||
If you notice there's no SDL_EVENT_TEXT_INPUT message being emitted, double check that
|
||||
your app has read access to one of the following:
|
||||
|
||||
* /proc/self/fd/0
|
||||
* /dev/tty
|
||||
* /dev/tty[0...6]
|
||||
* /dev/vc/0
|
||||
* /dev/console
|
||||
|
||||
This is usually not a problem if you run from the physical terminal (as opposed
|
||||
to running from a pseudo terminal, such as via SSH). If running from a PTS, a
|
||||
quick workaround is to run your app as root or add yourself to the tty group,
|
||||
then re-login to the system.
|
||||
|
||||
sudo usermod -aG tty `whoami`
|
||||
|
||||
The keyboard layout used by SDL is the same as the one the kernel uses.
|
||||
To configure the layout on Raspbian:
|
||||
|
||||
sudo dpkg-reconfigure keyboard-configuration
|
||||
|
||||
To configure the locale, which controls which keys are interpreted as letters,
|
||||
this determining the CAPS LOCK behavior:
|
||||
|
||||
sudo dpkg-reconfigure locales
|
||||
|
||||
|
||||
OpenGL problems
|
||||
---------------
|
||||
|
||||
If you have desktop OpenGL headers installed at build time in your RPi or cross
|
||||
compilation environment, support for it will be built in. However, the chipset
|
||||
does not actually have support for it, which causes issues in certain SDL apps
|
||||
since the presence of OpenGL support supersedes the ES/ES2 variants.
|
||||
The workaround is to disable OpenGL at configuration time:
|
||||
|
||||
./configure --disable-video-opengl
|
||||
|
||||
Or if the application uses the Render functions, you can use the SDL_RENDER_DRIVER
|
||||
environment variable:
|
||||
|
||||
export SDL_RENDER_DRIVER=opengles2
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
* When launching apps remotely (via SSH), SDL can prevent local keystrokes from
|
||||
leaking into the console only if it has root privileges. Launching apps locally
|
||||
does not suffer from this issue.
|
||||
|
||||
|
10
docs/README-steamos.md
Normal file
10
docs/README-steamos.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# SteamOS
|
||||
|
||||
SteamOS is literally a Linux system, and uses the same binaries you distribute to generic Linux Steam users, so generally speaking, all the other [Linux advice](README-linux.md) applies.
|
||||
|
||||
If you are shipping a Linux game on Steam, or explicitly targeting SteamOS, the system is guaranteed to provide SDL. The Steam Client will set up the dynamic loader path so that a known-good copy of SDL is available to any program that needs it before launching a game. Steam provides all major versions of SDL to date, in this manner, for both x86 and amd64, in addition to several add-on libraries like `SDL_image` and `SDL_mixer`. When shipping a Linux game on Steam, do not ship a build of SDL with your game. Link against SDL as normal, and expect it to be available on the player's system. This allows Valve to make fixes and improvements to their SDL and those fixes to flow on to your game.
|
||||
|
||||
We are obsessive about SDL3 having a backwards-compatible ABI. Whether you build your game using the Steam Runtime SDK or just about any other copy of SDL, it _should_ work with the one that ships with Steam.
|
||||
|
||||
In fact, it's not a bad idea to just copy the SDL build out of the Steam Runtime if you plan to ship a Linux game for non-Steam platforms, too, since you know it's definitely well-built.
|
||||
|
3
docs/README-switch.md
Normal file
3
docs/README-switch.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Nintendo Switch
|
||||
|
||||
SDL3 runs on the Nintendo Switch! There are commercial games shipping with this port. This port is kept in a separate repository, but is available for free, under the zlib license, to anyone that is under NDA for Switch development with Nintendo. Please contact Ryan (icculus at icculus dot org) for details.
|
@@ -1,113 +0,0 @@
|
||||
Using SDL with Microsoft Visual C++
|
||||
===================================
|
||||
|
||||
#### by Lion Kimbro with additions by James Turk
|
||||
|
||||
You can either use the precompiled libraries from the [SDL](https://www.libsdl.org/download.php) web site, or you can build SDL
|
||||
yourself.
|
||||
|
||||
### Building SDL
|
||||
|
||||
0. To build SDL, your machine must, at a minimum, have the DirectX9.0c SDK installed. It may or may not be retrievable from
|
||||
the [Microsoft](https://www.microsoft.com) website, so you might need to locate it [online](https://duckduckgo.com/?q=directx9.0c+sdk+download&t=h_&ia=web).
|
||||
_Editor's note: I've been able to successfully build SDL using Visual Studio 2019 **without** the DX9.0c SDK_
|
||||
|
||||
1. Open the Visual Studio solution file at `./VisualC/SDL.sln`.
|
||||
|
||||
2. Your IDE will likely prompt you to upgrade this solution file to whatever later version of the IDE you're using. In the `Retarget Projects` dialog,
|
||||
all of the affected project files should be checked allowing you to use the latest `Windows SDK Version` you have installed, along with
|
||||
the `Platform Toolset`.
|
||||
|
||||
If you choose *NOT* to upgrade to use the latest `Windows SDK Version` or `Platform Toolset`, then you'll need the `Visual Studio 2010 Platform Toolset`.
|
||||
|
||||
3. Build the `.dll` and `.lib` files by right clicking on each project in turn (Projects are listed in the _Workspace_
|
||||
panel in the _FileView_ tab), and selecting `Build`.
|
||||
|
||||
You may get a few warnings, but you should not get any errors.
|
||||
|
||||
Later, we will refer to the following `.lib` and `.dll` files that have just been generated:
|
||||
|
||||
- `./VisualC/Win32/Debug/SDL3.dll` or `./VisualC/Win32/Release/SDL3.dll`
|
||||
- `./VisualC/Win32/Debug/SDL3.lib` or `./VisualC/Win32/Release/SDL3.lib`
|
||||
|
||||
_Note for the `x64` versions, just replace `Win32` in the path with `x64`_
|
||||
|
||||
### Creating a Project with SDL
|
||||
|
||||
- Create a project as a `Win32 Application`.
|
||||
|
||||
- Create a C++ file for your project.
|
||||
|
||||
- Set the C runtime to `Multi-threaded DLL` in the menu:
|
||||
`Project|Settings|C/C++ tab|Code Generation|Runtime Library `.
|
||||
|
||||
- Add the SDL `include` directory to your list of includes in the menu:
|
||||
`Project|Settings|C/C++ tab|Preprocessor|Additional include directories `
|
||||
|
||||
*VC7 Specific: Instead of doing this, I find it easier to add the
|
||||
include and library directories to the list that VC7 keeps. Do this by
|
||||
selecting Tools|Options|Projects|VC++ Directories and under the "Show
|
||||
Directories For:" dropbox select "Include Files", and click the "New
|
||||
Directory Icon" and add the [SDLROOT]\\include directory (e.g. If you
|
||||
installed to c:\\SDL\\ add c:\\SDL\\include). Proceed to change the
|
||||
dropbox selection to "Library Files" and add [SDLROOT]\\lib.*
|
||||
|
||||
The "include directory" I am referring to is the `./include` folder.
|
||||
|
||||
Now we're going to use the files that we had created earlier in the *Build SDL* step.
|
||||
|
||||
Copy the following file into your Project directory:
|
||||
|
||||
- `SDL3.dll`
|
||||
|
||||
Add the following file to your project (It is not necessary to copy it to your project directory):
|
||||
|
||||
- `SDL3.lib`
|
||||
|
||||
To add them to your project, right click on your project, and select
|
||||
`Add files to project`.
|
||||
|
||||
**Instead of adding the files to your project, it is more desirable to add them to the linker options: Project|Properties|Linker|Command Line
|
||||
and type the names of the libraries to link with in the "Additional Options:" box. Note: This must be done for each build configuration
|
||||
(e.g. Release,Debug).**
|
||||
|
||||
### Hello SDL
|
||||
|
||||
Here's a sample SDL snippet to verify everything is setup in your IDE:
|
||||
|
||||
```c
|
||||
#include <SDL3/SDL.h>
|
||||
#include <SDL3/SDL_main.h> // only include this one in the source file with main()!
|
||||
|
||||
int main( int argc, char* argv[] )
|
||||
{
|
||||
const int WIDTH = 640;
|
||||
const int HEIGHT = 480;
|
||||
SDL_Window* window = NULL;
|
||||
SDL_Renderer* renderer = NULL;
|
||||
|
||||
SDL_Init(SDL_INIT_VIDEO);
|
||||
window = SDL_CreateWindow("Hello SDL", WIDTH, HEIGHT, 0);
|
||||
renderer = SDL_CreateRenderer(window, NULL);
|
||||
|
||||
SDL_DestroyRenderer(renderer);
|
||||
SDL_DestroyWindow(window);
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
### That's it!
|
||||
|
||||
I hope that this document has helped you get through the most difficult part of using the SDL: installing it.
|
||||
Suggestions for improvements should be posted to the [Github Issues](https://github.com/libsdl-org/SDL/issues).
|
||||
|
||||
### Credits
|
||||
|
||||
Thanks to [Paulus Esterhazy](mailto:pesterhazy@gmx.net), for the work on VC++ port.
|
||||
|
||||
This document was originally called "VisualC.txt", and was written by [Sam Lantinga](mailto:slouken@libsdl.org).
|
||||
|
||||
Later, it was converted to HTML and expanded into the document that you see today by [Lion Kimbro](mailto:snowlion@sprynet.com).
|
||||
|
||||
Minor Fixes and Visual C++ 7 Information (in italic) was added by [James Turk](mailto:james@conceptofzero.net)
|
@@ -10,10 +10,10 @@ Credit to
|
||||
Building
|
||||
--------
|
||||
To build for the PSVita, make sure you have vitasdk and cmake installed and run:
|
||||
```
|
||||
cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build
|
||||
cmake --install build
|
||||
```sh
|
||||
cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build
|
||||
cmake --install build
|
||||
```
|
||||
|
||||
|
||||
|
@@ -18,7 +18,9 @@ Details are here: https://github.com/libsdl-org/SDL/issues/5186
|
||||
|
||||
## MinGW-w64 compiler support
|
||||
|
||||
SDL can be built with MinGW-w64 and CMake. First, you need to install and set up the MSYS2 environment, which provides the MinGW-w64 toolchain. Install MSYS2, typically to `C:\msys64`, and follow the instructions on the MSYS2 wiki to use the MinGW-w64 shell to update all components in the MSYS2 environment. This generally amounts to running `pacman -Syuu` from the mingw64 shell, but refer to MSYS2's documentation for more details. Once the MSYS2 environment has been updated, install the x86_64 MinGW toolchain from the mingw64 shell with the command `pacman -S mingw-w64-x86_64-toolchain`. (You can additionally install `mingw-w64-i686-toolchain` if you intend to build 32-bit binaries as well. The remainder of this section assumes you only want to build 64-bit binaries.)
|
||||
SDL can be built with MinGW-w64 and CMake. Minimum tested MinGW-w64 version is 8.0.3.
|
||||
|
||||
On a Windows host, you first need to install and set up the MSYS2 environment, which provides the MinGW-w64 toolchain. Install MSYS2, typically to `C:\msys64`, and follow the instructions on the MSYS2 wiki to use the MinGW-w64 shell to update all components in the MSYS2 environment. This generally amounts to running `pacman -Syuu` from the mingw64 shell, but refer to MSYS2's documentation for more details. Once the MSYS2 environment has been updated, install the x86_64 MinGW toolchain from the mingw64 shell with the command `pacman -S mingw-w64-x86_64-toolchain`. (You can additionally install `mingw-w64-i686-toolchain` if you intend to build 32-bit binaries as well. The remainder of this section assumes you only want to build 64-bit binaries.)
|
||||
|
||||
To build and install SDL, you can use PowerShell or any CMake-compatible IDE. First, install CMake, Ninja, and Git. These tools can be installed using any number of tools, such as the MSYS2's `pacman`, `winget`, `Chocolatey`, or by manually downloading and running the installers. Clone SDL to an appropriate location with `git` and run the following commands from the root of the cloned repository:
|
||||
|
||||
|
@@ -7,8 +7,7 @@ to provide low level access to audio, keyboard, mouse, joystick, and graphics
|
||||
hardware. It is used by video playback software, emulators, and popular games
|
||||
including Valve's award winning catalog and many Humble Bundle games.
|
||||
|
||||
SDL officially supports Windows, macOS, Linux, iOS, and Android.
|
||||
Support for other platforms may be found in the source code.
|
||||
SDL officially supports Windows, macOS, Linux, iOS, Android, Xbox, PlayStation 4/5, Nintendo Switch, and many other platforms.
|
||||
|
||||
SDL is written in C, works natively with C++, and there are bindings
|
||||
available for several other languages, including C# and Python.
|
||||
@@ -19,36 +18,19 @@ in the file "LICENSE.txt".
|
||||
Information on building SDL with CMake is available in [README-cmake.md](README-cmake.md)
|
||||
|
||||
The best way to learn how to use SDL is to check out the header files in
|
||||
the "include" subdirectory and the programs in the "test" subdirectory.
|
||||
the "include" subdirectory and the programs in the "examples" subdirectory.
|
||||
The header files and test programs are well commented and always up to date.
|
||||
|
||||
Information on reporting bugs and contributing is available in [README-contributing.md](README-contributing.md)
|
||||
|
||||
More documentation and FAQs are available online at [the wiki](http://wiki.libsdl.org/)
|
||||
More documentation and FAQs are available online at the [wiki](http://wiki.libsdl.org/)
|
||||
|
||||
- [High DPI Support](README-highdpi.md)
|
||||
- [main()](README-main-functions.md)
|
||||
- [Porting information](README-porting.md)
|
||||
- [Migrating from SDL 2.0](README-migration.md)
|
||||
- [Supported Platforms](README-platforms.md)
|
||||
- [main()](README-main-functions.md)
|
||||
- [High DPI Support](README-highdpi.md)
|
||||
- [Touch](README-touch.md)
|
||||
- [Versions](README-versions.md)
|
||||
- [Visual Studio](README-visualc.md)
|
||||
|
||||
- [Android](README-android.md)
|
||||
- [Emscripten](README-emscripten.md)
|
||||
- [iOS](README-ios.md)
|
||||
- [KMSDRM support on BSD](README-kmsbsd.md)
|
||||
- [Linux](README-linux.md)
|
||||
- [macOS](README-macos.md)
|
||||
- [Nintendo 3DS](README-n3ds.md)
|
||||
- [PS2](README-ps2.md)
|
||||
- [PSP](README-psp.md)
|
||||
- [PSVita](README-vita.md)
|
||||
- [Raspberry Pi](README-raspberrypi.md)
|
||||
- [RISC OS](README-riscos.md)
|
||||
- [Windows GDK](README-gdk.md)
|
||||
- [Windows](README-windows.md)
|
||||
- [Supported platforms](README-platforms.md)
|
||||
- [Porting information](README-porting.md)
|
||||
|
||||
If you need help with the library, or just want to discuss SDL related
|
||||
issues, you can join the [SDL Discourse](https://discourse.libsdl.org/),
|
||||
|
68
docs/hello.c
Normal file
68
docs/hello.c
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
Copyright (C) 1997-2025 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
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely.
|
||||
*/
|
||||
#define SDL_MAIN_USE_CALLBACKS 1 /* use the callbacks instead of main() */
|
||||
#include <SDL3/SDL.h>
|
||||
#include <SDL3/SDL_main.h>
|
||||
|
||||
static SDL_Window *window = NULL;
|
||||
static SDL_Renderer *renderer = NULL;
|
||||
|
||||
/* This function runs once at startup. */
|
||||
SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
{
|
||||
/* Create the window */
|
||||
if (!SDL_CreateWindowAndRenderer("Hello World", 800, 600, SDL_WINDOW_FULLSCREEN, &window, &renderer)) {
|
||||
SDL_Log("Couldn't create window and renderer: %s", SDL_GetError());
|
||||
return SDL_APP_FAILURE;
|
||||
}
|
||||
return SDL_APP_CONTINUE;
|
||||
}
|
||||
|
||||
/* This function runs when a new event (mouse input, keypresses, etc) occurs. */
|
||||
SDL_AppResult SDL_AppEvent(void *appstate, SDL_Event *event)
|
||||
{
|
||||
if (event->type == SDL_EVENT_KEY_DOWN ||
|
||||
event->type == SDL_EVENT_QUIT) {
|
||||
return SDL_APP_SUCCESS; /* end the program, reporting success to the OS. */
|
||||
}
|
||||
return SDL_APP_CONTINUE;
|
||||
}
|
||||
|
||||
/* This function runs once per frame, and is the heart of the program. */
|
||||
SDL_AppResult SDL_AppIterate(void *appstate)
|
||||
{
|
||||
const char *message = "Hello World!";
|
||||
int w = 0, h = 0;
|
||||
float x, y;
|
||||
const float scale = 4.0f;
|
||||
|
||||
/* Center the message and scale it up */
|
||||
SDL_GetRenderOutputSize(renderer, &w, &h);
|
||||
SDL_SetRenderScale(renderer, scale, scale);
|
||||
x = ((w / scale) - SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE * SDL_strlen(message)) / 2;
|
||||
y = ((h / scale) - SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE) / 2;
|
||||
|
||||
/* Draw the message */
|
||||
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
|
||||
SDL_RenderClear(renderer);
|
||||
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
|
||||
SDL_RenderDebugText(renderer, x, y, message);
|
||||
SDL_RenderPresent(renderer);
|
||||
|
||||
return SDL_APP_CONTINUE;
|
||||
}
|
||||
|
||||
/* This function runs once at shutdown. */
|
||||
void SDL_AppQuit(void *appstate, SDL_AppResult result)
|
||||
{
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
If you're running this in a web browser, you need to click the window before you'll hear anything!
|
||||
|
||||
This example code creates an simple audio stream for playing sound, and
|
||||
This example code creates a simple audio stream for playing sound, and
|
||||
generates a sine wave sound effect for it to play as time goes on. This is the
|
||||
simplest way to get up and running with procedural sound.
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This example code creates an simple audio stream for playing sound, and
|
||||
* This example code creates a simple audio stream for playing sound, and
|
||||
* generates a sine wave sound effect for it to play as time goes on. This
|
||||
* is the simplest way to get up and running with procedural sound.
|
||||
*
|
||||
@@ -14,7 +14,7 @@
|
||||
static SDL_Window *window = NULL;
|
||||
static SDL_Renderer *renderer = NULL;
|
||||
static SDL_AudioStream *stream = NULL;
|
||||
static int total_samples_generated = 0;
|
||||
static int current_sine_sample = 0;
|
||||
|
||||
/* This function runs once at startup. */
|
||||
SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
@@ -73,15 +73,17 @@ SDL_AppResult SDL_AppIterate(void *appstate)
|
||||
static float samples[512]; /* this will feed 512 samples each frame until we get to our maximum. */
|
||||
int i;
|
||||
|
||||
/* generate a 440Hz pure tone */
|
||||
for (i = 0; i < SDL_arraysize(samples); i++) {
|
||||
/* You don't have to care about this math; we're just generating a simple sine wave as we go.
|
||||
https://en.wikipedia.org/wiki/Sine_wave */
|
||||
const float time = total_samples_generated / 8000.0f;
|
||||
const int sine_freq = 500; /* run the wave at 500Hz */
|
||||
samples[i] = SDL_sinf(6.283185f * sine_freq * time);
|
||||
total_samples_generated++;
|
||||
const int freq = 440;
|
||||
const float phase = current_sine_sample * freq / 8000.0f;
|
||||
samples[i] = SDL_sinf(phase * 2 * SDL_PI_F);
|
||||
current_sine_sample++;
|
||||
}
|
||||
|
||||
/* wrapping around to avoid floating-point errors */
|
||||
current_sine_sample %= 8000;
|
||||
|
||||
/* feed the new data to the stream. It will queue at the end, and trickle out as the hardware needs more data. */
|
||||
SDL_PutAudioStreamData(stream, samples, sizeof (samples));
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
If you're running this in a web browser, you need to click the window before you'll hear anything!
|
||||
|
||||
This example code creates an simple audio stream for playing sound, and
|
||||
This example code creates a simple audio stream for playing sound, and
|
||||
generates a sine wave sound effect for it to play as time goes on. Unlike
|
||||
the previous example, this uses a callback to generate sound.
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This example code creates an simple audio stream for playing sound, and
|
||||
* This example code creates a simple audio stream for playing sound, and
|
||||
* generates a sine wave sound effect for it to play as time goes on. Unlike
|
||||
* the previous example, this uses a callback to generate sound.
|
||||
*
|
||||
@@ -17,7 +17,7 @@
|
||||
static SDL_Window *window = NULL;
|
||||
static SDL_Renderer *renderer = NULL;
|
||||
static SDL_AudioStream *stream = NULL;
|
||||
static int total_samples_generated = 0;
|
||||
static int current_sine_sample = 0;
|
||||
|
||||
/* this function will be called (usually in a background thread) when the audio stream is consuming data. */
|
||||
static void SDLCALL FeedTheAudioStreamMore(void *userdata, SDL_AudioStream *astream, int additional_amount, int total_amount)
|
||||
@@ -33,15 +33,17 @@ static void SDLCALL FeedTheAudioStreamMore(void *userdata, SDL_AudioStream *astr
|
||||
const int total = SDL_min(additional_amount, SDL_arraysize(samples));
|
||||
int i;
|
||||
|
||||
/* generate a 440Hz pure tone */
|
||||
for (i = 0; i < total; i++) {
|
||||
/* You don't have to care about this math; we're just generating a simple sine wave as we go.
|
||||
https://en.wikipedia.org/wiki/Sine_wave */
|
||||
const float time = total_samples_generated / 8000.0f;
|
||||
const int sine_freq = 500; /* run the wave at 500Hz */
|
||||
samples[i] = SDL_sinf(6.283185f * sine_freq * time);
|
||||
total_samples_generated++;
|
||||
const int freq = 440;
|
||||
const float phase = current_sine_sample * freq / 8000.0f;
|
||||
samples[i] = SDL_sinf(phase * 2 * SDL_PI_F);
|
||||
current_sine_sample++;
|
||||
}
|
||||
|
||||
/* wrapping around to avoid floating-point errors */
|
||||
current_sine_sample %= 8000;
|
||||
|
||||
/* feed the new data to the stream. It will queue at the end, and trickle out as the hardware needs more data. */
|
||||
SDL_PutAudioStreamData(astream, samples, total * sizeof (float));
|
||||
additional_amount -= total; /* subtract what we've just fed the stream. */
|
||||
|
@@ -1,5 +1,5 @@
|
||||
If you're running this in a web browser, you need to click the window before you'll hear anything!
|
||||
|
||||
This example code creates an simple audio stream for playing sound, and
|
||||
This example code creates a simple audio stream for playing sound, and
|
||||
loads a .wav file that is pushed through the stream in a loop.
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This example code creates an simple audio stream for playing sound, and
|
||||
* This example code creates a simple audio stream for playing sound, and
|
||||
* loads a .wav file that is pushed through the stream in a loop.
|
||||
*
|
||||
* This code is public domain. Feel free to use it for any purpose!
|
||||
|
@@ -19,6 +19,8 @@ static SDL_Texture *render_target = NULL;
|
||||
static float pressure = 0.0f;
|
||||
static float previous_touch_x = -1.0f;
|
||||
static float previous_touch_y = -1.0f;
|
||||
static float tilt_x = 0.0f;
|
||||
static float tilt_y = 0.0f;
|
||||
|
||||
/* This function runs once at startup. */
|
||||
SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
@@ -84,6 +86,10 @@ SDL_AppResult SDL_AppEvent(void *appstate, SDL_Event *event)
|
||||
} else if (event->type == SDL_EVENT_PEN_AXIS) {
|
||||
if (event->paxis.axis == SDL_PEN_AXIS_PRESSURE) {
|
||||
pressure = event->paxis.value; /* remember new pressure for later draws. */
|
||||
} else if(event->paxis.axis == SDL_PEN_AXIS_XTILT) {
|
||||
tilt_x = event->paxis.value;
|
||||
} else if(event->paxis.axis == SDL_PEN_AXIS_YTILT) {
|
||||
tilt_y = event->paxis.value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,11 +99,15 @@ SDL_AppResult SDL_AppEvent(void *appstate, SDL_Event *event)
|
||||
/* This function runs once per frame, and is the heart of the program. */
|
||||
SDL_AppResult SDL_AppIterate(void *appstate)
|
||||
{
|
||||
char debug_text[1024];
|
||||
|
||||
/* make sure we're drawing to the window and not the render target */
|
||||
SDL_SetRenderTarget(renderer, NULL);
|
||||
SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE);
|
||||
SDL_RenderClear(renderer); /* just in case. */
|
||||
SDL_RenderTexture(renderer, render_target, NULL, NULL);
|
||||
SDL_snprintf(debug_text, sizeof(debug_text), "Tilt: %f %f", tilt_x, tilt_y);
|
||||
SDL_RenderDebugText(renderer, 0, 8, debug_text);
|
||||
SDL_RenderPresent(renderer);
|
||||
return SDL_APP_CONTINUE; /* carry on with the program! */
|
||||
}
|
||||
|
@@ -207,7 +207,7 @@
|
||||
<li><a href="/@project_name@/@category_name@/@example_name@">@example_name@</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<h1>@project_name@ example: @category_name@/@example_name@</h1>
|
||||
<hr/>
|
||||
<div id="example-description">@description@</div>
|
||||
<div class="canvas-container">
|
||||
<canvas
|
||||
|
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Main include header for the SDL library, version 3.1.8
|
||||
* Main include header for the SDL library, version 3.2.2
|
||||
*
|
||||
* It is almost always best to include just this one header instead of
|
||||
* picking out individual headers included here. There are exceptions to
|
||||
|
@@ -89,7 +89,7 @@ extern "C" {
|
||||
* - 3: Paranoid settings: All SDL assertion macros enabled, including
|
||||
* SDL_assert_paranoid.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_ASSERT_LEVEL SomeNumberBasedOnVariousFactors
|
||||
|
||||
@@ -118,24 +118,27 @@ extern "C" {
|
||||
*
|
||||
* If the program is not running under a debugger, SDL_TriggerBreakpoint will
|
||||
* likely terminate the app, possibly without warning. If the current platform
|
||||
* isn't supported (SDL doesn't know how to trigger a breakpoint), this macro
|
||||
* does nothing.
|
||||
* isn't supported, this macro is left undefined.
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_TriggerBreakpoint() TriggerABreakpointInAPlatformSpecificManner
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
#elif defined(_MSC_VER) && _MSC_VER >= 1310
|
||||
/* Don't include intrin.h here because it contains C++ code */
|
||||
extern void __cdecl __debugbreak(void);
|
||||
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||
#elif defined(_MSC_VER) && defined(_M_IX86)
|
||||
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
|
||||
#elif defined(ANDROID)
|
||||
#include <assert.h>
|
||||
#define SDL_TriggerBreakpoint() assert(0)
|
||||
#elif SDL_HAS_BUILTIN(__builtin_debugtrap)
|
||||
#define SDL_TriggerBreakpoint() __builtin_debugtrap()
|
||||
#elif SDL_HAS_BUILTIN(__builtin_trap)
|
||||
#define SDL_TriggerBreakpoint() __builtin_trap()
|
||||
#elif (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||
#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
|
||||
@@ -152,8 +155,7 @@ extern "C" {
|
||||
#include <signal.h>
|
||||
#define SDL_TriggerBreakpoint() raise(SIGTRAP)
|
||||
#else
|
||||
/* How do we trigger breakpoints on this platform? */
|
||||
#define SDL_TriggerBreakpoint()
|
||||
/* SDL_TriggerBreakpoint is intentionally left undefined on unknown platforms. */
|
||||
#endif
|
||||
|
||||
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
||||
@@ -163,7 +165,7 @@ extern "C" {
|
||||
*
|
||||
* If SDL can't figure how the compiler reports this, it will use "???".
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_FUNCTION __FUNCTION__
|
||||
|
||||
@@ -178,14 +180,14 @@ extern "C" {
|
||||
/**
|
||||
* A macro that reports the current file being compiled.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_FILE __FILE__
|
||||
|
||||
/**
|
||||
* A macro that reports the current line number of the file being compiled.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_LINE __LINE__
|
||||
|
||||
@@ -222,7 +224,7 @@ disable assertions.
|
||||
* do { SomethingOnce(); } while (SDL_NULL_WHILE_LOOP_CONDITION (0));
|
||||
* ```
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_NULL_WHILE_LOOP_CONDITION (0)
|
||||
|
||||
@@ -246,7 +248,7 @@ disable assertions.
|
||||
*
|
||||
* \param condition the condition to assert (but not actually run here).
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_disabled_assert(condition) \
|
||||
do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
|
||||
@@ -262,7 +264,7 @@ disable assertions.
|
||||
* condition, try to break in a debugger, kill the program, or ignore the
|
||||
* problem).
|
||||
*
|
||||
* \since This enum is available since SDL 3.1.3.
|
||||
* \since This enum is available since SDL 3.2.0.
|
||||
*/
|
||||
typedef enum SDL_AssertState
|
||||
{
|
||||
@@ -280,7 +282,7 @@ typedef enum SDL_AssertState
|
||||
* used by the assertion handler, then added to the assertion report. This is
|
||||
* returned as a linked list from SDL_GetAssertionReport().
|
||||
*
|
||||
* \since This struct is available since SDL 3.1.3.
|
||||
* \since This struct is available since SDL 3.2.0.
|
||||
*/
|
||||
typedef struct SDL_AssertData
|
||||
{
|
||||
@@ -306,7 +308,7 @@ typedef struct SDL_AssertData
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *data,
|
||||
const char *func,
|
||||
@@ -321,7 +323,7 @@ extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *
|
||||
* This isn't for direct use by apps; use SDL_assert or SDL_TriggerBreakpoint
|
||||
* instead.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AssertBreakpoint() SDL_TriggerBreakpoint()
|
||||
|
||||
@@ -353,7 +355,7 @@ extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *
|
||||
*
|
||||
* \param condition the condition to assert.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_enabled_assert(condition) \
|
||||
do { \
|
||||
@@ -399,7 +401,7 @@ extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_assert(condition) if (assertion_enabled && (condition)) { trigger_assertion; }
|
||||
|
||||
@@ -432,7 +434,7 @@ extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_assert_release(condition) SDL_disabled_assert(condition)
|
||||
|
||||
@@ -461,7 +463,7 @@ extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||
|
||||
@@ -505,7 +507,7 @@ extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_assert_always(condition) SDL_enabled_assert(condition)
|
||||
|
||||
@@ -521,7 +523,7 @@ extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *
|
||||
* \threadsafety This callback may be called from any thread that triggers an
|
||||
* assert at any time.
|
||||
*
|
||||
* \since This datatype is available since SDL 3.1.3.
|
||||
* \since This datatype is available since SDL 3.2.0.
|
||||
*/
|
||||
typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
|
||||
const SDL_AssertData *data, void *userdata);
|
||||
@@ -545,7 +547,7 @@ typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAssertionHandler
|
||||
*/
|
||||
@@ -566,7 +568,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetAssertionHandler(
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAssertionHandler
|
||||
*/
|
||||
@@ -591,7 +593,7 @@ extern SDL_DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAssertionHandler
|
||||
*/
|
||||
@@ -625,7 +627,7 @@ extern SDL_DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **
|
||||
* SDL_ResetAssertionReport() simultaneously, may render the
|
||||
* returned pointer invalid.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_ResetAssertionReport
|
||||
*/
|
||||
@@ -643,7 +645,7 @@ extern SDL_DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
|
||||
* assertion, or simultaneously calling this function may cause
|
||||
* memory leaks or crashes.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAssertionReport
|
||||
*/
|
||||
|
@@ -67,14 +67,14 @@
|
||||
*
|
||||
* ## Best Practices
|
||||
*
|
||||
* Simple non-blocking i/o--for an app that just wants to pick up data
|
||||
* Simple non-blocking I/O--for an app that just wants to pick up data
|
||||
* whenever it's ready without losing framerate waiting on disks to spin--can
|
||||
* use whatever pattern works well for the program. In this case, simply call
|
||||
* SDL_ReadAsyncIO, or maybe SDL_LoadFileAsync, as needed. Once a frame, call
|
||||
* SDL_GetAsyncIOResult to check for any completed tasks and deal with the
|
||||
* data as it arrives.
|
||||
*
|
||||
* If two separate pieces of the same program need their own i/o, it is legal
|
||||
* If two separate pieces of the same program need their own I/O, it is legal
|
||||
* for each to create their own queue. This will prevent either piece from
|
||||
* accidentally consuming the other's completed tasks. Each queue does require
|
||||
* some amount of resources, but it is not an overwhelming cost. Do not make a
|
||||
@@ -83,7 +83,7 @@
|
||||
* were submitted, so it doesn't generally matter what order tasks are
|
||||
* started.
|
||||
*
|
||||
* One async i/o queue can be shared by multiple threads, or one thread can
|
||||
* One async I/O queue can be shared by multiple threads, or one thread can
|
||||
* have more than one queue, but the most efficient way--if ruthless
|
||||
* efficiency is the goal--is to have one queue per thread, with multiple
|
||||
* threads working in parallel, and attempt to keep each queue loaded with
|
||||
|
@@ -92,7 +92,7 @@ typedef int SDL_SpinLock;
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_LockSpinlock
|
||||
* \sa SDL_UnlockSpinlock
|
||||
@@ -109,7 +109,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TryLockSpinlock(SDL_SpinLock *lock);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_TryLockSpinlock
|
||||
* \sa SDL_UnlockSpinlock
|
||||
@@ -128,7 +128,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_LockSpinlock(SDL_SpinLock *lock);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_LockSpinlock
|
||||
* \sa SDL_TryLockSpinlock
|
||||
@@ -152,7 +152,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockSpinlock(SDL_SpinLock *lock);
|
||||
* time, but if you find yourself needing this, you are probably
|
||||
* dealing with some very sensitive code; be careful!
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_CompilerBarrier() DoCompilerSpecificReadWriteBarrier()
|
||||
|
||||
@@ -185,7 +185,7 @@ extern __inline void SDL_CompilerBarrier(void);
|
||||
* time, but if you find yourself needing this, you are probably
|
||||
* dealing with some very sensitive code; be careful!
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_MemoryBarrierRelease
|
||||
*/
|
||||
@@ -205,7 +205,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
|
||||
* time, but if you find yourself needing this, you are probably
|
||||
* dealing with some very sensitive code; be careful!
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_MemoryBarrierAcquire
|
||||
*/
|
||||
@@ -245,7 +245,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
||||
* time, but if you find yourself needing this, you are probably
|
||||
* dealing with some very sensitive code; be careful!
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_MemoryBarrierAcquire
|
||||
* \sa SDL_MemoryBarrierReleaseFunction
|
||||
@@ -268,7 +268,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
||||
* time, but if you find yourself needing this, you are probably
|
||||
* dealing with some very sensitive code; be careful!
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_MemoryBarrierRelease
|
||||
* \sa SDL_MemoryBarrierAcquireFunction
|
||||
@@ -341,7 +341,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
|
||||
*
|
||||
* \threadsafety This macro is safe to use from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_CPUPauseInstruction() DoACPUPauseInACompilerAndArchitectureSpecificWay
|
||||
|
||||
@@ -385,7 +385,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
|
||||
* This is a struct so people don't accidentally use numeric operations on it
|
||||
* directly. You have to use SDL atomic functions.
|
||||
*
|
||||
* \since This struct is available since SDL 3.1.3.
|
||||
* \since This struct is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CompareAndSwapAtomicInt
|
||||
* \sa SDL_GetAtomicInt
|
||||
@@ -407,7 +407,7 @@ typedef struct SDL_AtomicInt { int value; } SDL_AtomicInt;
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAtomicInt
|
||||
* \sa SDL_SetAtomicInt
|
||||
@@ -428,7 +428,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CompareAndSwapAtomicInt(SDL_AtomicInt *a, i
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAtomicInt
|
||||
*/
|
||||
@@ -445,7 +445,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetAtomicInt(SDL_AtomicInt *a, int v);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAtomicInt
|
||||
*/
|
||||
@@ -465,7 +465,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetAtomicInt(SDL_AtomicInt *a);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_AtomicDecRef
|
||||
* \sa SDL_AtomicIncRef
|
||||
@@ -484,7 +484,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_AddAtomicInt(SDL_AtomicInt *a, int v);
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_AtomicDecRef
|
||||
*/
|
||||
@@ -498,13 +498,13 @@ extern SDL_DECLSPEC int SDLCALL SDL_AddAtomicInt(SDL_AtomicInt *a, int v);
|
||||
*
|
||||
* ***Note: If you don't know what this macro is for, you shouldn't use it!***
|
||||
*
|
||||
* \param a a pointer to an SDL_AtomicInt to increment.
|
||||
* \param a a pointer to an SDL_AtomicInt to decrement.
|
||||
* \returns true if the variable reached zero after decrementing, false
|
||||
* otherwise.
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_AtomicIncRef
|
||||
*/
|
||||
@@ -531,7 +531,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_AddAtomicInt(SDL_AtomicInt *a, int v);
|
||||
* This is a struct so people don't accidentally use numeric operations on it
|
||||
* directly. You have to use SDL atomic functions.
|
||||
*
|
||||
* \since This struct is available since SDL 3.1.3.
|
||||
* \since This struct is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CompareAndSwapAtomicU32
|
||||
* \sa SDL_GetAtomicU32
|
||||
@@ -552,7 +552,7 @@ typedef struct SDL_AtomicU32 { Uint32 value; } SDL_AtomicU32;
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAtomicU32
|
||||
* \sa SDL_SetAtomicU32
|
||||
@@ -573,7 +573,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CompareAndSwapAtomicU32(SDL_AtomicU32 *a, U
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAtomicU32
|
||||
*/
|
||||
@@ -590,7 +590,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_SetAtomicU32(SDL_AtomicU32 *a, Uint32 v);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAtomicU32
|
||||
*/
|
||||
@@ -609,7 +609,7 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetAtomicU32(SDL_AtomicU32 *a);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CompareAndSwapAtomicInt
|
||||
* \sa SDL_GetAtomicPointer
|
||||
@@ -629,7 +629,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CompareAndSwapAtomicPointer(void **a, void
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CompareAndSwapAtomicPointer
|
||||
* \sa SDL_GetAtomicPointer
|
||||
@@ -647,7 +647,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_SetAtomicPointer(void **a, void *v);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CompareAndSwapAtomicPointer
|
||||
* \sa SDL_SetAtomicPointer
|
||||
|
@@ -146,7 +146,7 @@ extern "C" {
|
||||
*
|
||||
* Generally one should use SDL_AUDIO_BITSIZE instead of this macro directly.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AUDIO_MASK_BITSIZE (0xFFu)
|
||||
|
||||
@@ -155,7 +155,7 @@ extern "C" {
|
||||
*
|
||||
* Generally one should use SDL_AUDIO_ISFLOAT instead of this macro directly.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AUDIO_MASK_FLOAT (1u<<8)
|
||||
|
||||
@@ -165,7 +165,7 @@ extern "C" {
|
||||
* Generally one should use SDL_AUDIO_ISBIGENDIAN or SDL_AUDIO_ISLITTLEENDIAN
|
||||
* instead of this macro directly.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AUDIO_MASK_BIG_ENDIAN (1u<<12)
|
||||
|
||||
@@ -174,7 +174,7 @@ extern "C" {
|
||||
*
|
||||
* Generally one should use SDL_AUDIO_ISSIGNED instead of this macro directly.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AUDIO_MASK_SIGNED (1u<<15)
|
||||
|
||||
@@ -199,7 +199,7 @@ extern "C" {
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_DEFINE_AUDIO_FORMAT(signed, bigendian, flt, size) \
|
||||
(((Uint16)(signed) << 15) | ((Uint16)(bigendian) << 12) | ((Uint16)(flt) << 8) | ((size) & SDL_AUDIO_MASK_BITSIZE))
|
||||
@@ -207,7 +207,7 @@ extern "C" {
|
||||
/**
|
||||
* Audio format.
|
||||
*
|
||||
* \since This enum is available since SDL 3.1.3.
|
||||
* \since This enum is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_AUDIO_BITSIZE
|
||||
* \sa SDL_AUDIO_BYTESIZE
|
||||
@@ -261,7 +261,7 @@ typedef enum SDL_AudioFormat
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AUDIO_BITSIZE(x) ((x) & SDL_AUDIO_MASK_BITSIZE)
|
||||
|
||||
@@ -275,7 +275,7 @@ typedef enum SDL_AudioFormat
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AUDIO_BYTESIZE(x) (SDL_AUDIO_BITSIZE(x) / 8)
|
||||
|
||||
@@ -289,7 +289,7 @@ typedef enum SDL_AudioFormat
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AUDIO_ISFLOAT(x) ((x) & SDL_AUDIO_MASK_FLOAT)
|
||||
|
||||
@@ -303,7 +303,7 @@ typedef enum SDL_AudioFormat
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AUDIO_ISBIGENDIAN(x) ((x) & SDL_AUDIO_MASK_BIG_ENDIAN)
|
||||
|
||||
@@ -317,7 +317,7 @@ typedef enum SDL_AudioFormat
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AUDIO_ISLITTLEENDIAN(x) (!SDL_AUDIO_ISBIGENDIAN(x))
|
||||
|
||||
@@ -331,7 +331,7 @@ typedef enum SDL_AudioFormat
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AUDIO_ISSIGNED(x) ((x) & SDL_AUDIO_MASK_SIGNED)
|
||||
|
||||
@@ -345,7 +345,7 @@ typedef enum SDL_AudioFormat
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AUDIO_ISINT(x) (!SDL_AUDIO_ISFLOAT(x))
|
||||
|
||||
@@ -359,7 +359,7 @@ typedef enum SDL_AudioFormat
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AUDIO_ISUNSIGNED(x) (!SDL_AUDIO_ISSIGNED(x))
|
||||
|
||||
@@ -369,7 +369,7 @@ typedef enum SDL_AudioFormat
|
||||
*
|
||||
* Zero is used to signify an invalid/null device.
|
||||
*
|
||||
* \since This datatype is available since SDL 3.1.3.
|
||||
* \since This datatype is available since SDL 3.2.0.
|
||||
*/
|
||||
typedef Uint32 SDL_AudioDeviceID;
|
||||
|
||||
@@ -380,7 +380,7 @@ typedef Uint32 SDL_AudioDeviceID;
|
||||
* to signify the app just wants the system to choose a default device instead
|
||||
* of the app providing a specific one.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK ((SDL_AudioDeviceID) 0xFFFFFFFFu)
|
||||
|
||||
@@ -391,14 +391,14 @@ typedef Uint32 SDL_AudioDeviceID;
|
||||
* to signify the app just wants the system to choose a default device instead
|
||||
* of the app providing a specific one.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AUDIO_DEVICE_DEFAULT_RECORDING ((SDL_AudioDeviceID) 0xFFFFFFFEu)
|
||||
|
||||
/**
|
||||
* Format specifier for audio data.
|
||||
*
|
||||
* \since This struct is available since SDL 3.1.3.
|
||||
* \since This struct is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_AudioFormat
|
||||
*/
|
||||
@@ -420,7 +420,7 @@ typedef struct SDL_AudioSpec
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_AUDIO_FRAMESIZE(x) (SDL_AUDIO_BYTESIZE((x).format) * (x).channels)
|
||||
|
||||
@@ -444,7 +444,7 @@ typedef struct SDL_AudioSpec
|
||||
* more of them, bind them to an opened audio device, and feed data to them
|
||||
* (or for recording, consume data from them).
|
||||
*
|
||||
* \since This struct is available since SDL 3.1.3.
|
||||
* \since This struct is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CreateAudioStream
|
||||
*/
|
||||
@@ -470,7 +470,7 @@ typedef struct SDL_AudioStream SDL_AudioStream;
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAudioDriver
|
||||
*/
|
||||
@@ -494,7 +494,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetNumAudioDrivers
|
||||
*/
|
||||
@@ -512,7 +512,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetAudioDriver(int index);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentAudioDriver(void);
|
||||
|
||||
@@ -538,7 +538,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentAudioDriver(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_OpenAudioDevice
|
||||
* \sa SDL_GetAudioRecordingDevices
|
||||
@@ -567,7 +567,7 @@ extern SDL_DECLSPEC SDL_AudioDeviceID * SDLCALL SDL_GetAudioPlaybackDevices(int
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_OpenAudioDevice
|
||||
* \sa SDL_GetAudioPlaybackDevices
|
||||
@@ -583,7 +583,7 @@ extern SDL_DECLSPEC SDL_AudioDeviceID * SDLCALL SDL_GetAudioRecordingDevices(int
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAudioPlaybackDevices
|
||||
* \sa SDL_GetAudioRecordingDevices
|
||||
@@ -621,7 +621,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetAudioDeviceName(SDL_AudioDeviceI
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec *spec, int *sample_frames);
|
||||
|
||||
@@ -642,7 +642,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devi
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAudioStreamInputChannelMap
|
||||
*/
|
||||
@@ -717,7 +717,7 @@ extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioDeviceChannelMap(SDL_AudioDeviceID
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CloseAudioDevice
|
||||
* \sa SDL_GetAudioDeviceFormat
|
||||
@@ -781,18 +781,18 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePlayback(SDL_AudioDeviceID dev
|
||||
* Physical devices can not be paused or unpaused, only logical devices
|
||||
* created through SDL_OpenAudioDevice() can be.
|
||||
*
|
||||
* \param dev a device opened by SDL_OpenAudioDevice().
|
||||
* \param devid a device opened by SDL_OpenAudioDevice().
|
||||
* \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.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_ResumeAudioDevice
|
||||
* \sa SDL_AudioDevicePaused
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev);
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID devid);
|
||||
|
||||
/**
|
||||
* Use this function to unpause audio playback on a specified device.
|
||||
@@ -809,18 +809,18 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev);
|
||||
* Physical devices can not be paused or unpaused, only logical devices
|
||||
* created through SDL_OpenAudioDevice() can be.
|
||||
*
|
||||
* \param dev a device opened by SDL_OpenAudioDevice().
|
||||
* \param devid a device opened by SDL_OpenAudioDevice().
|
||||
* \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.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_AudioDevicePaused
|
||||
* \sa SDL_PauseAudioDevice
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioDevice(SDL_AudioDeviceID dev);
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioDevice(SDL_AudioDeviceID devid);
|
||||
|
||||
/**
|
||||
* Use this function to query if an audio device is paused.
|
||||
@@ -832,17 +832,17 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioDevice(SDL_AudioDeviceID dev);
|
||||
* created through SDL_OpenAudioDevice() can be. Physical and invalid device
|
||||
* IDs will report themselves as unpaused here.
|
||||
*
|
||||
* \param dev a device opened by SDL_OpenAudioDevice().
|
||||
* \param devid a device opened by SDL_OpenAudioDevice().
|
||||
* \returns true if device is valid and paused, false otherwise.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_PauseAudioDevice
|
||||
* \sa SDL_ResumeAudioDevice
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_AudioDevicePaused(SDL_AudioDeviceID dev);
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_AudioDevicePaused(SDL_AudioDeviceID devid);
|
||||
|
||||
/**
|
||||
* Get the gain of an audio device.
|
||||
@@ -861,7 +861,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_AudioDevicePaused(SDL_AudioDeviceID dev);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAudioDeviceGain
|
||||
*/
|
||||
@@ -896,7 +896,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetAudioDeviceGain(SDL_AudioDeviceID devid
|
||||
* \threadsafety It is safe to call this function from any thread, as it holds
|
||||
* a stream-specific mutex while running.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAudioDeviceGain
|
||||
*/
|
||||
@@ -917,7 +917,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioDeviceGain(SDL_AudioDeviceID devid,
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_OpenAudioDevice
|
||||
*/
|
||||
@@ -942,7 +942,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID devid);
|
||||
* Binding a stream to a device will set its output format for playback
|
||||
* devices, and its input format for recording devices, so they match the
|
||||
* device's settings. The caller is welcome to change the other end of the
|
||||
* stream's format at any time.
|
||||
* stream's format at any time with SDL_SetAudioStreamFormat().
|
||||
*
|
||||
* \param devid an audio device to bind a stream to.
|
||||
* \param streams an array of audio streams to bind.
|
||||
@@ -952,7 +952,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID devid);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_BindAudioStreams
|
||||
* \sa SDL_UnbindAudioStream
|
||||
@@ -973,7 +973,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_BindAudioStreams(SDL_AudioDeviceID devid, S
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_BindAudioStreams
|
||||
* \sa SDL_UnbindAudioStream
|
||||
@@ -996,7 +996,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_BindAudioStream(SDL_AudioDeviceID devid, SD
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_BindAudioStreams
|
||||
*/
|
||||
@@ -1012,7 +1012,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnbindAudioStreams(SDL_AudioStream * const
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_BindAudioStream
|
||||
*/
|
||||
@@ -1031,7 +1031,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnbindAudioStream(SDL_AudioStream *stream);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_BindAudioStream
|
||||
* \sa SDL_BindAudioStreams
|
||||
@@ -1048,7 +1048,7 @@ extern SDL_DECLSPEC SDL_AudioDeviceID SDLCALL SDL_GetAudioStreamDevice(SDL_Audio
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_PutAudioStreamData
|
||||
* \sa SDL_GetAudioStreamData
|
||||
@@ -1069,7 +1069,7 @@ extern SDL_DECLSPEC SDL_AudioStream * SDLCALL SDL_CreateAudioStream(const SDL_Au
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetAudioStreamProperties(SDL_AudioStream *stream);
|
||||
|
||||
@@ -1085,7 +1085,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetAudioStreamProperties(SDL_Au
|
||||
* \threadsafety It is safe to call this function from any thread, as it holds
|
||||
* a stream-specific mutex while running.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAudioStreamFormat
|
||||
*/
|
||||
@@ -1104,6 +1104,12 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetAudioStreamFormat(SDL_AudioStream *strea
|
||||
* next sound file, and start putting that new data while the previous sound
|
||||
* file is still queued, and everything will still play back correctly.
|
||||
*
|
||||
* If a stream is bound to a device, then the format of the side of the stream
|
||||
* bound to a device cannot be changed (src_spec for recording devices,
|
||||
* dst_spec for playback devices). Attempts to make a change to this side will
|
||||
* be ignored, but this will not report an error. The other side's format can
|
||||
* be changed.
|
||||
*
|
||||
* \param stream the stream the format is being changed.
|
||||
* \param src_spec the new format of the audio input; if NULL, it is not
|
||||
* changed.
|
||||
@@ -1115,7 +1121,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetAudioStreamFormat(SDL_AudioStream *strea
|
||||
* \threadsafety It is safe to call this function from any thread, as it holds
|
||||
* a stream-specific mutex while running.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAudioStreamFormat
|
||||
* \sa SDL_SetAudioStreamFrequencyRatio
|
||||
@@ -1132,7 +1138,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamFormat(SDL_AudioStream *strea
|
||||
* \threadsafety It is safe to call this function from any thread, as it holds
|
||||
* a stream-specific mutex while running.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAudioStreamFrequencyRatio
|
||||
*/
|
||||
@@ -1159,7 +1165,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetAudioStreamFrequencyRatio(SDL_AudioStre
|
||||
* \threadsafety It is safe to call this function from any thread, as it holds
|
||||
* a stream-specific mutex while running.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAudioStreamFrequencyRatio
|
||||
* \sa SDL_SetAudioStreamFormat
|
||||
@@ -1181,7 +1187,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamFrequencyRatio(SDL_AudioStrea
|
||||
* \threadsafety It is safe to call this function from any thread, as it holds
|
||||
* a stream-specific mutex while running.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAudioStreamGain
|
||||
*/
|
||||
@@ -1206,7 +1212,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetAudioStreamGain(SDL_AudioStream *stream
|
||||
* \threadsafety It is safe to call this function from any thread, as it holds
|
||||
* a stream-specific mutex while running.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAudioStreamGain
|
||||
*/
|
||||
@@ -1230,7 +1236,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamGain(SDL_AudioStream *stream,
|
||||
* \threadsafety It is safe to call this function from any thread, as it holds
|
||||
* a stream-specific mutex while running.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAudioStreamInputChannelMap
|
||||
*/
|
||||
@@ -1254,7 +1260,7 @@ extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioStreamInputChannelMap(SDL_AudioStr
|
||||
* \threadsafety It is safe to call this function from any thread, as it holds
|
||||
* a stream-specific mutex while running.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAudioStreamInputChannelMap
|
||||
*/
|
||||
@@ -1298,6 +1304,11 @@ extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioStreamOutputChannelMap(SDL_AudioSt
|
||||
* race condition hasn't changed the format while this call is setting the
|
||||
* channel map.
|
||||
*
|
||||
* Unlike attempting to change the stream's format, the input channel map on a
|
||||
* stream bound to a recording device is permitted to change at any time; any
|
||||
* data added to the stream from the device after this call will have the new
|
||||
* mapping, but previously-added data will still have the prior mapping.
|
||||
*
|
||||
* \param stream the SDL_AudioStream to change.
|
||||
* \param chmap the new channel map, NULL to reset to default.
|
||||
* \param count The number of channels in the map.
|
||||
@@ -1309,7 +1320,7 @@ extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioStreamOutputChannelMap(SDL_AudioSt
|
||||
* stream's format to have a different number of channels from a
|
||||
* a different thread at the same time, though!
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAudioStreamInputChannelMap
|
||||
*/
|
||||
@@ -1349,6 +1360,13 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamInputChannelMap(SDL_AudioStre
|
||||
* race condition hasn't changed the format while this call is setting the
|
||||
* channel map.
|
||||
*
|
||||
* Unlike attempting to change the stream's format, the output channel map on
|
||||
* a stream bound to a recording device is permitted to change at any time;
|
||||
* any data added to the stream after this call will have the new mapping, but
|
||||
* previously-added data will still have the prior mapping. When the channel
|
||||
* map doesn't match the hardware's channel layout, SDL will convert the data
|
||||
* before feeding it to the device for playback.
|
||||
*
|
||||
* \param stream the SDL_AudioStream to change.
|
||||
* \param chmap the new channel map, NULL to reset to default.
|
||||
* \param count The number of channels in the map.
|
||||
@@ -1360,7 +1378,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamInputChannelMap(SDL_AudioStre
|
||||
* stream's format to have a different number of channels from a
|
||||
* a different thread at the same time, though!
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAudioStreamInputChannelMap
|
||||
*/
|
||||
@@ -1387,7 +1405,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamOutputChannelMap(SDL_AudioStr
|
||||
* stream has a callback set, the caller might need to manage
|
||||
* extra locking.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_ClearAudioStream
|
||||
* \sa SDL_FlushAudioStream
|
||||
@@ -1418,7 +1436,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PutAudioStreamData(SDL_AudioStream *stream,
|
||||
* stream has a callback set, the caller might need to manage
|
||||
* extra locking.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_ClearAudioStream
|
||||
* \sa SDL_GetAudioStreamAvailable
|
||||
@@ -1445,7 +1463,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetAudioStreamData(SDL_AudioStream *stream,
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAudioStreamData
|
||||
* \sa SDL_PutAudioStreamData
|
||||
@@ -1484,7 +1502,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetAudioStreamAvailable(SDL_AudioStream *str
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_PutAudioStreamData
|
||||
* \sa SDL_ClearAudioStream
|
||||
@@ -1506,7 +1524,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetAudioStreamQueued(SDL_AudioStream *stream
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_PutAudioStreamData
|
||||
*/
|
||||
@@ -1524,7 +1542,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_FlushAudioStream(SDL_AudioStream *stream);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAudioStreamAvailable
|
||||
* \sa SDL_GetAudioStreamData
|
||||
@@ -1551,7 +1569,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ClearAudioStream(SDL_AudioStream *stream);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_ResumeAudioStreamDevice
|
||||
*/
|
||||
@@ -1565,18 +1583,41 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioStreamDevice(SDL_AudioStream *str
|
||||
* previously been paused. Once unpaused, any bound audio streams will begin
|
||||
* to progress again, and audio can be generated.
|
||||
*
|
||||
* Remember, SDL_OpenAudioDeviceStream opens device in a paused state, so this
|
||||
* function call is required for audio playback to begin on such device.
|
||||
*
|
||||
* \param stream the audio stream associated with the audio device to resume.
|
||||
* \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.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_PauseAudioStreamDevice
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioStreamDevice(SDL_AudioStream *stream);
|
||||
|
||||
/**
|
||||
* Use this function to query if an audio device associated with a stream is
|
||||
* paused.
|
||||
*
|
||||
* Unlike in SDL2, audio devices start in an _unpaused_ state, since an app
|
||||
* has to bind a stream before any audio will flow.
|
||||
*
|
||||
* \param stream the audio stream associated with the audio device to query.
|
||||
* \returns true if device is valid and paused, 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_PauseAudioStreamDevice
|
||||
* \sa SDL_ResumeAudioStreamDevice
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_AudioStreamDevicePaused(SDL_AudioStream *stream);
|
||||
|
||||
|
||||
/**
|
||||
* Lock an audio stream for serialized access.
|
||||
*
|
||||
@@ -1599,7 +1640,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioStreamDevice(SDL_AudioStream *st
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_UnlockAudioStream
|
||||
*/
|
||||
@@ -1618,7 +1659,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_LockAudioStream(SDL_AudioStream *stream);
|
||||
* \threadsafety You should only call this from the same thread that
|
||||
* previously called SDL_LockAudioStream.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_LockAudioStream
|
||||
*/
|
||||
@@ -1659,7 +1700,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_UnlockAudioStream(SDL_AudioStream *stream);
|
||||
* is called, so your callback does not need to manage the lock
|
||||
* explicitly.
|
||||
*
|
||||
* \since This datatype is available since SDL 3.1.3.
|
||||
* \since This datatype is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAudioStreamGetCallback
|
||||
* \sa SDL_SetAudioStreamPutCallback
|
||||
@@ -1706,7 +1747,7 @@ typedef void (SDLCALL *SDL_AudioStreamCallback)(void *userdata, SDL_AudioStream
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAudioStreamPutCallback
|
||||
*/
|
||||
@@ -1755,7 +1796,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamGetCallback(SDL_AudioStream *
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAudioStreamGetCallback
|
||||
*/
|
||||
@@ -1777,7 +1818,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamPutCallback(SDL_AudioStream *
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CreateAudioStream
|
||||
*/
|
||||
@@ -1839,7 +1880,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyAudioStream(SDL_AudioStream *stream)
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetAudioStreamDevice
|
||||
* \sa SDL_ResumeAudioStreamDevice
|
||||
@@ -1877,7 +1918,7 @@ extern SDL_DECLSPEC SDL_AudioStream * SDLCALL SDL_OpenAudioDeviceStream(SDL_Audi
|
||||
* application is responsible for locking resources the callback
|
||||
* touches that need to be protected.
|
||||
*
|
||||
* \since This datatype is available since SDL 3.1.3.
|
||||
* \since This datatype is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetAudioPostmixCallback
|
||||
*/
|
||||
@@ -1933,7 +1974,7 @@ typedef void (SDLCALL *SDL_AudioPostmixCallback)(void *userdata, const SDL_Audio
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, SDL_AudioPostmixCallback callback, void *userdata);
|
||||
|
||||
@@ -2011,7 +2052,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioPostmixCallback(SDL_AudioDeviceID d
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_free
|
||||
* \sa SDL_LoadWAV
|
||||
@@ -2047,7 +2088,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_LoadWAV_IO(SDL_IOStream *src, bool closeio,
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_free
|
||||
* \sa SDL_LoadWAV_IO
|
||||
@@ -2086,7 +2127,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_LoadWAV(const char *path, SDL_AudioSpec *sp
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_MixAudio(Uint8 *dst, const Uint8 *src, SDL_AudioFormat format, Uint32 len, float volume);
|
||||
|
||||
@@ -2116,7 +2157,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_MixAudio(Uint8 *dst, const Uint8 *src, SDL_
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_ConvertAudioSamples(const SDL_AudioSpec *src_spec, const Uint8 *src_data, int src_len, const SDL_AudioSpec *dst_spec, Uint8 **dst_data, int *dst_len);
|
||||
|
||||
@@ -2129,7 +2170,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ConvertAudioSamples(const SDL_AudioSpec *sr
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC const char * SDLCALL SDL_GetAudioFormatName(SDL_AudioFormat format);
|
||||
|
||||
@@ -2145,7 +2186,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetAudioFormatName(SDL_AudioFormat
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC int SDLCALL SDL_GetSilenceValueForFormat(SDL_AudioFormat format);
|
||||
|
||||
|
@@ -62,7 +62,7 @@
|
||||
* On compilers without a deprecation mechanism, this is defined to nothing,
|
||||
* and using a deprecated function will not generate a warning.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_DEPRECATED __attribute__((deprecated))
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
* This symbol is used in SDL's headers, but apps and other libraries are
|
||||
* welcome to use it for their own interfaces as well.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_DECLSPEC __attribute__ ((visibility("default")))
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
* This symbol is used in SDL's headers, but apps and other libraries are
|
||||
* welcome to use it for their own interfaces as well.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDLCALL __cdecl
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
* to ignore this request. On compilers without inline support, this is
|
||||
* defined to nothing.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_INLINE __inline
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
* This symbol is used in SDL's headers, but apps and other libraries are
|
||||
* welcome to use it for their own interfaces as well.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_FORCE_INLINE __forceinline
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
* This symbol is used in SDL's headers, but apps and other libraries are
|
||||
* welcome to use it for their own interfaces as well.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_NORETURN __attribute__((noreturn))
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
* This symbol is used in SDL's headers, but apps and other libraries are
|
||||
* welcome to use it for their own interfaces as well.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_ANALYZER_NORETURN __attribute__((analyzer_noreturn))
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_FALLTHROUGH [[fallthrough]]
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
*
|
||||
* On compilers without nodiscard support, this is defined to nothing.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_NODISCARD [[nodiscard]]
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
*
|
||||
* Most apps don't need to, and should not, use this directly.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_MALLOC __declspec(allocator) __desclspec(restrict)
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
*
|
||||
* Most apps don't need to, and should not, use this directly.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_ALLOC_SIZE(p) __attribute__((alloc_size(p)))
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
*
|
||||
* On compilers without restrict support, this is defined to nothing.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_RESTRICT __restrict__
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
* On compilers without has_builtin support, this is defined to 0 (always
|
||||
* false).
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_HAS_BUILTIN(x) __has_builtin(x)
|
||||
|
||||
|
@@ -61,7 +61,7 @@ extern __inline int _SDL_bsr_watcom(Uint32);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32(Uint32 x)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32(Uint32 x)
|
||||
return -1;
|
||||
}
|
||||
return _SDL_bsr_watcom(x);
|
||||
#elif defined(_MSC_VER)
|
||||
#elif defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
unsigned long index;
|
||||
if (_BitScanReverse(&index, x)) {
|
||||
return (int)index;
|
||||
@@ -128,7 +128,7 @@ SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32(Uint32 x)
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
SDL_FORCE_INLINE bool SDL_HasExactlyOneBitSet32(Uint32 x)
|
||||
{
|
||||
|
@@ -45,7 +45,7 @@ extern "C" {
|
||||
*
|
||||
* Additional values may be obtained from SDL_ComposeCustomBlendMode.
|
||||
*
|
||||
* \since This datatype is available since SDL 3.1.3.
|
||||
* \since This datatype is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_ComposeCustomBlendMode
|
||||
*/
|
||||
@@ -64,7 +64,7 @@ typedef Uint32 SDL_BlendMode;
|
||||
* The blend operation used when combining source and destination pixel
|
||||
* components.
|
||||
*
|
||||
* \since This enum is available since SDL 3.1.3.
|
||||
* \since This enum is available since SDL 3.2.0.
|
||||
*/
|
||||
typedef enum SDL_BlendOperation
|
||||
{
|
||||
@@ -83,7 +83,7 @@ typedef enum SDL_BlendOperation
|
||||
* operation. The comma-separated factors listed above are always applied in
|
||||
* the component order red, green, blue, and alpha.
|
||||
*
|
||||
* \since This enum is available since SDL 3.1.3.
|
||||
* \since This enum is available since SDL 3.2.0.
|
||||
*/
|
||||
typedef enum SDL_BlendFactor
|
||||
{
|
||||
@@ -179,7 +179,7 @@ typedef enum SDL_BlendFactor
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetRenderDrawBlendMode
|
||||
* \sa SDL_GetRenderDrawBlendMode
|
||||
|
@@ -88,7 +88,7 @@ extern "C" {
|
||||
*
|
||||
* The value 0 is an invalid ID.
|
||||
*
|
||||
* \since This datatype is available since SDL 3.1.3.
|
||||
* \since This datatype is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetCameras
|
||||
*/
|
||||
@@ -97,7 +97,7 @@ typedef Uint32 SDL_CameraID;
|
||||
/**
|
||||
* The opaque structure used to identify an opened SDL camera.
|
||||
*
|
||||
* \since This struct is available since SDL 3.1.3.
|
||||
* \since This struct is available since SDL 3.2.0.
|
||||
*/
|
||||
typedef struct SDL_Camera SDL_Camera;
|
||||
|
||||
@@ -107,7 +107,7 @@ typedef struct SDL_Camera SDL_Camera;
|
||||
* Cameras often support multiple formats; each one will be encapsulated in
|
||||
* this struct.
|
||||
*
|
||||
* \since This struct is available since SDL 3.1.3.
|
||||
* \since This struct is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetCameraSupportedFormats
|
||||
* \sa SDL_GetCameraFormat
|
||||
@@ -125,7 +125,7 @@ typedef struct SDL_CameraSpec
|
||||
/**
|
||||
* The position of camera in relation to system device.
|
||||
*
|
||||
* \since This enum is available since SDL 3.1.3.
|
||||
* \since This enum is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetCameraPosition
|
||||
*/
|
||||
@@ -154,7 +154,7 @@ typedef enum SDL_CameraPosition
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetCameraDriver
|
||||
*/
|
||||
@@ -178,7 +178,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumCameraDrivers(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetNumCameraDrivers
|
||||
*/
|
||||
@@ -196,7 +196,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCameraDriver(int index);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentCameraDriver(void);
|
||||
|
||||
@@ -211,7 +211,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentCameraDriver(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_OpenCamera
|
||||
*/
|
||||
@@ -239,7 +239,7 @@ extern SDL_DECLSPEC SDL_CameraID * SDLCALL SDL_GetCameras(int *count);
|
||||
* there _is_ a camera until the user has given you permission to check
|
||||
* through a scary warning popup.
|
||||
*
|
||||
* \param devid the camera device instance ID to query.
|
||||
* \param instance_id the camera device instance ID.
|
||||
* \param count a pointer filled in with the number of elements in the list,
|
||||
* may be NULL.
|
||||
* \returns a NULL terminated array of pointers to SDL_CameraSpec or NULL on
|
||||
@@ -249,12 +249,12 @@ extern SDL_DECLSPEC SDL_CameraID * SDLCALL SDL_GetCameras(int *count);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetCameras
|
||||
* \sa SDL_OpenCamera
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_CameraSpec ** SDLCALL SDL_GetCameraSupportedFormats(SDL_CameraID devid, int *count);
|
||||
extern SDL_DECLSPEC SDL_CameraSpec ** SDLCALL SDL_GetCameraSupportedFormats(SDL_CameraID instance_id, int *count);
|
||||
|
||||
/**
|
||||
* Get the human-readable device name for a camera.
|
||||
@@ -265,7 +265,7 @@ extern SDL_DECLSPEC SDL_CameraSpec ** SDLCALL SDL_GetCameraSupportedFormats(SDL_
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetCameras
|
||||
*/
|
||||
@@ -284,7 +284,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCameraName(SDL_CameraID instance
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetCameras
|
||||
*/
|
||||
@@ -330,7 +330,7 @@ extern SDL_DECLSPEC SDL_CameraPosition SDLCALL SDL_GetCameraPosition(SDL_CameraI
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetCameras
|
||||
* \sa SDL_GetCameraFormat
|
||||
@@ -363,7 +363,7 @@ extern SDL_DECLSPEC SDL_Camera * SDLCALL SDL_OpenCamera(SDL_CameraID instance_id
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_OpenCamera
|
||||
* \sa SDL_CloseCamera
|
||||
@@ -379,7 +379,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetCameraPermissionState(SDL_Camera *camera)
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_OpenCamera
|
||||
*/
|
||||
@@ -394,7 +394,7 @@ extern SDL_DECLSPEC SDL_CameraID SDLCALL SDL_GetCameraID(SDL_Camera *camera);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetCameraProperties(SDL_Camera *camera);
|
||||
|
||||
@@ -418,7 +418,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetCameraProperties(SDL_Camera
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_OpenCamera
|
||||
*/
|
||||
@@ -461,7 +461,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetCameraFormat(SDL_Camera *camera, SDL_Cam
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_ReleaseCameraFrame
|
||||
*/
|
||||
@@ -489,7 +489,7 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_AcquireCameraFrame(SDL_Camera *cam
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_AcquireCameraFrame
|
||||
*/
|
||||
@@ -504,7 +504,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseCameraFrame(SDL_Camera *camera, SDL_
|
||||
* \threadsafety It is safe to call this function from any thread, but no
|
||||
* thread may reference `device` once this function is called.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_OpenCamera
|
||||
*/
|
||||
|
@@ -96,7 +96,7 @@ extern "C" {
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetClipboardText
|
||||
* \sa SDL_HasClipboardText
|
||||
@@ -115,7 +115,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetClipboardText(const char *text);
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_HasClipboardText
|
||||
* \sa SDL_SetClipboardText
|
||||
@@ -129,7 +129,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetClipboardText
|
||||
* \sa SDL_SetClipboardText
|
||||
@@ -145,7 +145,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasClipboardText(void);
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetPrimarySelectionText
|
||||
* \sa SDL_HasPrimarySelectionText
|
||||
@@ -164,7 +164,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetPrimarySelectionText(const char *text);
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_HasPrimarySelectionText
|
||||
* \sa SDL_SetPrimarySelectionText
|
||||
@@ -179,7 +179,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_GetPrimarySelectionText(void);
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetPrimarySelectionText
|
||||
* \sa SDL_SetPrimarySelectionText
|
||||
@@ -204,7 +204,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasPrimarySelectionText(void);
|
||||
* breakage in receiving applications. The returned data will not be
|
||||
* freed so it needs to be retained and dealt with internally.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetClipboardData
|
||||
*/
|
||||
@@ -216,7 +216,7 @@ typedef const void *(SDLCALL *SDL_ClipboardDataCallback)(void *userdata, const c
|
||||
*
|
||||
* \param userdata a pointer to provided user data.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetClipboardData
|
||||
*/
|
||||
@@ -246,7 +246,7 @@ typedef void (SDLCALL *SDL_ClipboardCleanupCallback)(void *userdata);
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_ClearClipboardData
|
||||
* \sa SDL_GetClipboardData
|
||||
@@ -262,7 +262,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetClipboardData(SDL_ClipboardDataCallback
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetClipboardData
|
||||
*/
|
||||
@@ -282,7 +282,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ClearClipboardData(void);
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_HasClipboardData
|
||||
* \sa SDL_SetClipboardData
|
||||
@@ -298,7 +298,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_GetClipboardData(const char *mime_type, s
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetClipboardData
|
||||
* \sa SDL_GetClipboardData
|
||||
@@ -316,7 +316,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasClipboardData(const char *mime_type);
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetClipboardData
|
||||
*/
|
||||
|
@@ -55,7 +55,7 @@ extern "C" {
|
||||
* processors have a 128 byte cache line. We use the larger value to be
|
||||
* generally safe.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_CACHELINE_SIZE 128
|
||||
|
||||
@@ -68,7 +68,7 @@ extern "C" {
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC int SDLCALL SDL_GetNumLogicalCPUCores(void);
|
||||
|
||||
@@ -82,7 +82,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetNumLogicalCPUCores(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
|
||||
|
||||
@@ -96,7 +96,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_HasAltiVec(void);
|
||||
|
||||
@@ -109,7 +109,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasAltiVec(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_HasMMX(void);
|
||||
|
||||
@@ -122,7 +122,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasMMX(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
@@ -140,7 +140,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE3
|
||||
@@ -158,7 +158,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE2(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
@@ -176,7 +176,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE3(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
@@ -194,7 +194,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE41(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
@@ -212,7 +212,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE42(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasAVX512F
|
||||
@@ -228,7 +228,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasAVX(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX512F
|
||||
@@ -244,7 +244,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasAVX2(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
@@ -262,7 +262,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasAVX512F(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_HasNEON
|
||||
*/
|
||||
@@ -277,7 +277,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasARMSIMD(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_HasNEON(void);
|
||||
|
||||
@@ -291,7 +291,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasNEON(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_HasLSX(void);
|
||||
|
||||
@@ -305,7 +305,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasLSX(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_HasLASX(void);
|
||||
|
||||
@@ -316,7 +316,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasLASX(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
||||
|
||||
@@ -337,7 +337,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_aligned_alloc
|
||||
* \sa SDL_aligned_free
|
||||
|
@@ -59,7 +59,7 @@ extern "C" {
|
||||
* hyphens, underscores and periods. Alternatively, the whole string can be a
|
||||
* single asterisk ("*"), which serves as an "All files" filter.
|
||||
*
|
||||
* \since This struct is available since SDL 3.1.3.
|
||||
* \since This struct is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_DialogFileCallback
|
||||
* \sa SDL_ShowOpenFileDialog
|
||||
@@ -102,7 +102,7 @@ typedef struct SDL_DialogFileFilter
|
||||
* \param filelist the file(s) chosen by the user.
|
||||
* \param filter index of the selected filter.
|
||||
*
|
||||
* \since This datatype is available since SDL 3.1.3.
|
||||
* \since This datatype is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_DialogFileFilter
|
||||
* \sa SDL_ShowOpenFileDialog
|
||||
@@ -153,7 +153,7 @@ typedef void (SDLCALL *SDL_DialogFileCallback)(void *userdata, const char * cons
|
||||
* callback may be invoked from the same thread or from a
|
||||
* different one, depending on the OS's constraints.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_DialogFileCallback
|
||||
* \sa SDL_DialogFileFilter
|
||||
@@ -202,7 +202,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ShowOpenFileDialog(SDL_DialogFileCallback c
|
||||
* callback may be invoked from the same thread or from a
|
||||
* different one, depending on the OS's constraints.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_DialogFileCallback
|
||||
* \sa SDL_DialogFileFilter
|
||||
@@ -248,7 +248,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ShowSaveFileDialog(SDL_DialogFileCallback c
|
||||
* callback may be invoked from the same thread or from a
|
||||
* different one, depending on the OS's constraints.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_DialogFileCallback
|
||||
* \sa SDL_ShowOpenFileDialog
|
||||
@@ -263,7 +263,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ShowOpenFolderDialog(SDL_DialogFileCallback
|
||||
* This is used by SDL_ShowFileDialogWithProperties() to decide what kind of
|
||||
* dialog to present to the user.
|
||||
*
|
||||
* \since This enum is available since SDL 3.1.3.
|
||||
* \since This enum is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_ShowFileDialogWithProperties
|
||||
*/
|
||||
|
@@ -78,7 +78,7 @@ _m_prefetch(void *__P)
|
||||
* #endif
|
||||
* ```
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_BYTEORDER
|
||||
* \sa SDL_BIG_ENDIAN
|
||||
@@ -97,7 +97,7 @@ _m_prefetch(void *__P)
|
||||
* #endif
|
||||
* ```
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_BYTEORDER
|
||||
* \sa SDL_LIL_ENDIAN
|
||||
@@ -122,7 +122,7 @@ _m_prefetch(void *__P)
|
||||
* #endif
|
||||
* ```
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_LIL_ENDIAN
|
||||
* \sa SDL_BIG_ENDIAN
|
||||
@@ -184,7 +184,7 @@ _m_prefetch(void *__P)
|
||||
* #endif
|
||||
* ```
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_LIL_ENDIAN
|
||||
* \sa SDL_BIG_ENDIAN
|
||||
@@ -403,7 +403,7 @@ SDL_FORCE_INLINE Uint64 SDL_Swap64(Uint64 x)
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
SDL_FORCE_INLINE float SDL_SwapFloat(float x)
|
||||
{
|
||||
@@ -442,7 +442,7 @@ SDL_FORCE_INLINE float SDL_SwapFloat(float x)
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x) { return x_but_byteswapped; }
|
||||
|
||||
@@ -463,7 +463,7 @@ SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x) { return x_but_byteswapped; }
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x) { return x_but_byteswapped; }
|
||||
|
||||
@@ -484,7 +484,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x) { return x_but_byteswapped; }
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
||||
|
||||
@@ -500,7 +500,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_Swap16LE(x) SwapOnlyIfNecessary(x)
|
||||
|
||||
@@ -516,7 +516,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_Swap32LE(x) SwapOnlyIfNecessary(x)
|
||||
|
||||
@@ -532,7 +532,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_Swap64LE(x) SwapOnlyIfNecessary(x)
|
||||
|
||||
@@ -548,7 +548,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_SwapFloatLE(x) SwapOnlyIfNecessary(x)
|
||||
|
||||
@@ -564,7 +564,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_Swap16BE(x) SwapOnlyIfNecessary(x)
|
||||
|
||||
@@ -580,7 +580,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_Swap32BE(x) SwapOnlyIfNecessary(x)
|
||||
|
||||
@@ -596,7 +596,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_Swap64BE(x) SwapOnlyIfNecessary(x)
|
||||
|
||||
@@ -612,7 +612,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_SwapFloatBE(x) SwapOnlyIfNecessary(x)
|
||||
|
||||
|
@@ -80,7 +80,7 @@ extern "C" {
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_ClearError
|
||||
* \sa SDL_GetError
|
||||
@@ -99,7 +99,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const cha
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.6.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_ClearError
|
||||
* \sa SDL_GetError
|
||||
@@ -116,7 +116,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetErrorV(SDL_PRINTF_FORMAT_STRING const ch
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_OutOfMemory(void);
|
||||
|
||||
@@ -150,7 +150,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_OutOfMemory(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_ClearError
|
||||
* \sa SDL_SetError
|
||||
@@ -164,7 +164,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetError(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.3.
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetError
|
||||
* \sa SDL_SetError
|
||||
@@ -187,7 +187,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ClearError(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_Unsupported() SDL_SetError("That operation is not supported")
|
||||
|
||||
@@ -211,7 +211,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ClearError(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this macro from any thread.
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param))
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user