mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-08 17:04:24 +02:00
Compare commits
901 Commits
preview-3.
...
release-3.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3aabb7bc53 | ||
|
|
102bf22db8 | ||
|
|
65eda5fbd4 | ||
|
|
ed70ce85c1 | ||
|
|
cc150bc566 | ||
|
|
46f87cdc5a | ||
|
|
d7af22f927 | ||
|
|
fbd792e4df | ||
|
|
79dacf6630 | ||
|
|
46045ea060 | ||
|
|
3164b74256 | ||
|
|
affc61cc5e | ||
|
|
0013e9e1d3 | ||
|
|
22b5ceb0c7 | ||
|
|
259e4fe1a2 | ||
|
|
aef5dc0967 | ||
|
|
d83ac9ebfc | ||
|
|
2a53eed783 | ||
|
|
c784127077 | ||
|
|
1d228f8a7d | ||
|
|
ee2bebbace | ||
|
|
33f4093086 | ||
|
|
8975782d9a | ||
|
|
74058d40d6 | ||
|
|
70d4363890 | ||
|
|
396cd2d7f7 | ||
|
|
604a4dfa69 | ||
|
|
da0e3abd41 | ||
|
|
eebe7558d5 | ||
|
|
d240da419e | ||
|
|
b00d32c10a | ||
|
|
89eb50b25e | ||
|
|
8f99954e01 | ||
|
|
da032b77ab | ||
|
|
ef425def66 | ||
|
|
525842f2e7 | ||
|
|
88102f8d3c | ||
|
|
5454711c3b | ||
|
|
563b8cb51c | ||
|
|
7060088ffc | ||
|
|
9cdad39b52 | ||
|
|
7bd84b29e9 | ||
|
|
ab6bc13ef1 | ||
|
|
462b1f7b0d | ||
|
|
7ca97d0791 | ||
|
|
c819960a1c | ||
|
|
aadc6724d8 | ||
|
|
447ba0aa01 | ||
|
|
97c154791b | ||
|
|
350f873534 | ||
|
|
0e105ba49f | ||
|
|
0f67a2d179 | ||
|
|
3dc844148c | ||
|
|
95965bfef4 | ||
|
|
533ca2ea0c | ||
|
|
2e90ed4290 | ||
|
|
00c3cfcf97 | ||
|
|
a727925b5a | ||
|
|
d6f7b314b3 | ||
|
|
88acac053a | ||
|
|
69d4499c56 | ||
|
|
e54cc2b1fb | ||
|
|
e057712565 | ||
|
|
3243ae52e7 | ||
|
|
2d0ea900ba | ||
|
|
61ba96db36 | ||
|
|
a22488663c | ||
|
|
d2289755e9 | ||
|
|
7f3071a207 | ||
|
|
ff2c970c15 | ||
|
|
6b73386987 | ||
|
|
543b8b9b12 | ||
|
|
c226a67760 | ||
|
|
33090dc318 | ||
|
|
3939fb03bf | ||
|
|
d07bd49a7d | ||
|
|
4bc27ad15e | ||
|
|
ce3cc80aca | ||
|
|
103a4c4cb2 | ||
|
|
b6fd088246 | ||
|
|
5848e584a1 | ||
|
|
a883e69d7b | ||
|
|
8d7f469fb5 | ||
|
|
18463ccb8f | ||
|
|
2798ac07ea | ||
|
|
9403c6b43d | ||
|
|
48060320f6 | ||
|
|
f3e1c93ea2 | ||
|
|
5be888591c | ||
|
|
c391e73432 | ||
|
|
195b58121e | ||
|
|
b264c19c83 | ||
|
|
870c006288 | ||
|
|
9c6876ac18 | ||
|
|
31c7aab5db | ||
|
|
212f7539cb | ||
|
|
2503d34724 | ||
|
|
b7e1f88db8 | ||
|
|
8af454a0a1 | ||
|
|
270c2b8e86 | ||
|
|
3c9510f2ce | ||
|
|
3ae089e4de | ||
|
|
2b6bee46b2 | ||
|
|
be45038432 | ||
|
|
1fc5001f77 | ||
|
|
c546c5d335 | ||
|
|
880739f587 | ||
|
|
5a7e2d41b8 | ||
|
|
69cf2cf6aa | ||
|
|
b11ac0087f | ||
|
|
a004c1bcc4 | ||
|
|
db3ff5f5c4 | ||
|
|
764d7633ea | ||
|
|
fda7c0b461 | ||
|
|
add51f85c2 | ||
|
|
eca1479ff5 | ||
|
|
c4af41ba27 | ||
|
|
4b8fcb468b | ||
|
|
99a026cfde | ||
|
|
fa68d7de8b | ||
|
|
b7e46361f5 | ||
|
|
c9271b2f18 | ||
|
|
7b7322b222 | ||
|
|
a4c326a7bb | ||
|
|
a2fb4d6d47 | ||
|
|
b560f8ab17 | ||
|
|
0bf2065922 | ||
|
|
5ee57a9da1 | ||
|
|
86c664d695 | ||
|
|
8fa310e162 | ||
|
|
4dc440ff71 | ||
|
|
8ba903c859 | ||
|
|
a63fd07812 | ||
|
|
993993aaf3 | ||
|
|
c189cce819 | ||
|
|
6248eeec09 | ||
|
|
58c9c0ba7b | ||
|
|
96c4104523 | ||
|
|
e8f600bf46 | ||
|
|
ffd2696516 | ||
|
|
c5bc4576fc | ||
|
|
66020c2ed7 | ||
|
|
c2a910ab02 | ||
|
|
1e4fd21700 | ||
|
|
36ed4b75d1 | ||
|
|
7280152549 | ||
|
|
a70353891e | ||
|
|
fb312b2463 | ||
|
|
b08f7924a4 | ||
|
|
96e05da95e | ||
|
|
776e87ada9 | ||
|
|
99a65853a6 | ||
|
|
4128c4e44b | ||
|
|
18a0157457 | ||
|
|
b36a5ab6f4 | ||
|
|
aa5bcfa3d8 | ||
|
|
ef03c66ef3 | ||
|
|
6299705584 | ||
|
|
fcce05a19c | ||
|
|
1ee158cd31 | ||
|
|
e4c664a75f | ||
|
|
7a1d02083d | ||
|
|
0030fafda2 | ||
|
|
c9479f86f6 | ||
|
|
8bf6e23164 | ||
|
|
fb9bb7426d | ||
|
|
3a2a13d966 | ||
|
|
48fb914228 | ||
|
|
3e87c31a6c | ||
|
|
654f6f94f6 | ||
|
|
e7e2805475 | ||
|
|
df72790cfb | ||
|
|
0f02c41ac0 | ||
|
|
6d93ffe923 | ||
|
|
2fad85fa26 | ||
|
|
36ba09b63d | ||
|
|
b0414440a3 | ||
|
|
28014a0452 | ||
|
|
488e196415 | ||
|
|
d5b90fd82f | ||
|
|
c903079708 | ||
|
|
b488c2e4a0 | ||
|
|
aa9de89232 | ||
|
|
645b8e7f6d | ||
|
|
17532fd62e | ||
|
|
2214522b69 | ||
|
|
c608ce5acb | ||
|
|
b3adee0720 | ||
|
|
00c85a0b9e | ||
|
|
77edb4d5d3 | ||
|
|
62aea530b4 | ||
|
|
abab2f1181 | ||
|
|
01d8bb5b7c | ||
|
|
27439467ce | ||
|
|
399b2b18ce | ||
|
|
cbee4abdfc | ||
|
|
7066c6491e | ||
|
|
74bfc913ac | ||
|
|
d01ec84d85 | ||
|
|
d281a080c6 | ||
|
|
683181b47c | ||
|
|
a3bfd36665 | ||
|
|
70e1804e9f | ||
|
|
eaa20b5e8a | ||
|
|
a056d0f39a | ||
|
|
910d31e56a | ||
|
|
77dd2685ec | ||
|
|
7cc9955ae1 | ||
|
|
76ff74eeab | ||
|
|
dc590257ba | ||
|
|
267f13446d | ||
|
|
4cc96e3506 | ||
|
|
13ff9e0818 | ||
|
|
42abf69434 | ||
|
|
5d9d966d59 | ||
|
|
8df04368b3 | ||
|
|
3b4cf41c92 | ||
|
|
65dfdce3df | ||
|
|
3a5d0bac71 | ||
|
|
29c58245a7 | ||
|
|
1edb906aad | ||
|
|
1faaa128e5 | ||
|
|
99e1d9595f | ||
|
|
8389de757a | ||
|
|
a82660bb76 | ||
|
|
3d2af85934 | ||
|
|
ea2b4f4674 | ||
|
|
febe5dd3bc | ||
|
|
8f9dd75ead | ||
|
|
a849c4d361 | ||
|
|
8973dfd9cc | ||
|
|
2f4919c6ff | ||
|
|
d390a4e8f0 | ||
|
|
9f0ebbef46 | ||
|
|
6707df6d88 | ||
|
|
744ea5701c | ||
|
|
b467276f4a | ||
|
|
4361920501 | ||
|
|
b5cad69b9c | ||
|
|
723b77ede8 | ||
|
|
a7bac75470 | ||
|
|
a806a9092b | ||
|
|
55d78567b1 | ||
|
|
88bbc94921 | ||
|
|
027183f89c | ||
|
|
0810c5ac0d | ||
|
|
9f45801fa7 | ||
|
|
ae3bb879c7 | ||
|
|
17eb20505c | ||
|
|
badd9e5a15 | ||
|
|
576c2d2f2c | ||
|
|
48e5fc7b69 | ||
|
|
12e9ff33c3 | ||
|
|
054bea938a | ||
|
|
b9107ec196 | ||
|
|
5728f9d703 | ||
|
|
e61a874c66 | ||
|
|
2b72332b81 | ||
|
|
9ee86e7e79 | ||
|
|
6168085e45 | ||
|
|
000d56702e | ||
|
|
c12d90108f | ||
|
|
44c0feed99 | ||
|
|
fc5862b0dd | ||
|
|
7f3d51b690 | ||
|
|
45086459d2 | ||
|
|
5964104910 | ||
|
|
9194d199e7 | ||
|
|
81d9f30db4 | ||
|
|
38b9c9117d | ||
|
|
2887de55d6 | ||
|
|
8107d5b042 | ||
|
|
94f6f8d3c3 | ||
|
|
5935fe73d3 | ||
|
|
775eac98ee | ||
|
|
d9bc9dda7a | ||
|
|
f9bb023eeb | ||
|
|
9bf533d1c4 | ||
|
|
a2653b857c | ||
|
|
00fc74e6af | ||
|
|
28470f9231 | ||
|
|
171874ae5c | ||
|
|
6dc3211d56 | ||
|
|
6c38358984 | ||
|
|
c3e92cf1c4 | ||
|
|
de5e0f1784 | ||
|
|
1a278bb511 | ||
|
|
e803cbb34a | ||
|
|
997808a945 | ||
|
|
3cf15dc222 | ||
|
|
38b5ad824d | ||
|
|
d90c07a88f | ||
|
|
ff2a43bfbf | ||
|
|
5a4f1cbceb | ||
|
|
c4074bc9c9 | ||
|
|
6b6fe286fb | ||
|
|
e612c58518 | ||
|
|
dfb270f87c | ||
|
|
1ec73bac92 | ||
|
|
e1294f3b48 | ||
|
|
9c0b773f09 | ||
|
|
6cd9374929 | ||
|
|
3bde3e2406 | ||
|
|
5c002ba0b9 | ||
|
|
05fdfa1572 | ||
|
|
d4da5df088 | ||
|
|
6fef8fd0dc | ||
|
|
13f8201dbe | ||
|
|
4431c5f8ba | ||
|
|
a3232fe84e | ||
|
|
2ea3ac2914 | ||
|
|
34c687a59b | ||
|
|
388546be2e | ||
|
|
78b16b3cb8 | ||
|
|
e48e8a48ad | ||
|
|
26352be1e5 | ||
|
|
1d6d424775 | ||
|
|
c8fa870b36 | ||
|
|
b7df720371 | ||
|
|
b73ab6cc82 | ||
|
|
fffa14eb1a | ||
|
|
5454573e2d | ||
|
|
c6489b731e | ||
|
|
b451b27427 | ||
|
|
895bdc4f21 | ||
|
|
9e5975f332 | ||
|
|
a84cde99b7 | ||
|
|
aae4cb8d15 | ||
|
|
8ed4f46db0 | ||
|
|
3a54ca75cf | ||
|
|
3ec7fc8f59 | ||
|
|
4214001b97 | ||
|
|
44b59db1d5 | ||
|
|
7627f5d838 | ||
|
|
9c69084ed3 | ||
|
|
3b4ea10ebc | ||
|
|
799d2ca80b | ||
|
|
66a8454f2d | ||
|
|
012443729d | ||
|
|
26d20d5e22 | ||
|
|
45ab4a16a2 | ||
|
|
2a6187aa6b | ||
|
|
b7a241973a | ||
|
|
b8aff4a3ed | ||
|
|
d264c27468 | ||
|
|
92d6308aac | ||
|
|
a2f3e2ac23 | ||
|
|
e1b020f340 | ||
|
|
c88049d27f | ||
|
|
3cd5a407b8 | ||
|
|
75ff70b489 | ||
|
|
f6a979d7e8 | ||
|
|
f4b937adf8 | ||
|
|
6aa227a428 | ||
|
|
cc0755881c | ||
|
|
f1b2fa5b9b | ||
|
|
a4b7a77d70 | ||
|
|
06a6adf2b0 | ||
|
|
08b2176a80 | ||
|
|
99b2344253 | ||
|
|
35a891d0e9 | ||
|
|
0394e2e583 | ||
|
|
8a418521e1 | ||
|
|
fa894b07be | ||
|
|
832b2aaf39 | ||
|
|
3f58b99b53 | ||
|
|
406cd277d2 | ||
|
|
9a5700e9a3 | ||
|
|
2237a8eba2 | ||
|
|
0bc2296756 | ||
|
|
a85a6364d8 | ||
|
|
9fbba079b9 | ||
|
|
3d651ee403 | ||
|
|
8de01986b1 | ||
|
|
cbed9bd54d | ||
|
|
fd345ae2f9 | ||
|
|
c5dee0feb5 | ||
|
|
a6ff5646f4 | ||
|
|
80c6a5f8d9 | ||
|
|
d15ecb21be | ||
|
|
a962f40bbb | ||
|
|
cac2460623 | ||
|
|
25e33948af | ||
|
|
9698e20399 | ||
|
|
0ac6f972f9 | ||
|
|
d7a2d007d0 | ||
|
|
cb4f33b644 | ||
|
|
4d8f84f161 | ||
|
|
618eb57519 | ||
|
|
128b9260ec | ||
|
|
1a27b5b838 | ||
|
|
7d66d3271b | ||
|
|
b681862f14 | ||
|
|
3d354eeaad | ||
|
|
d33642b710 | ||
|
|
95ac0ff4d6 | ||
|
|
cb04dcd6f8 | ||
|
|
4fcb92e0df | ||
|
|
48d6c70f2c | ||
|
|
d10fe8bf2f | ||
|
|
becd08f376 | ||
|
|
38345adff0 | ||
|
|
370e9407b5 | ||
|
|
b6f4e10bf9 | ||
|
|
9e0b31b297 | ||
|
|
76352f2931 | ||
|
|
1fee2a9ae0 | ||
|
|
9fe5c1512f | ||
|
|
89dd2426cf | ||
|
|
8c54961de0 | ||
|
|
bb3d78e260 | ||
|
|
edec0c2ffd | ||
|
|
bf113bbe2a | ||
|
|
9dd3e2305e | ||
|
|
e18b301c51 | ||
|
|
58f534708e | ||
|
|
6840bbef58 | ||
|
|
5c03796ac7 | ||
|
|
0f1a705fda | ||
|
|
bd29d60d3c | ||
|
|
419e8600c8 | ||
|
|
e79cfbe520 | ||
|
|
2cd84bd581 | ||
|
|
0b9946d7bf | ||
|
|
7fe81f789f | ||
|
|
9094395b13 | ||
|
|
2bc6cf6efd | ||
|
|
00fe482efb | ||
|
|
bd35a1c8e5 | ||
|
|
5a257202d2 | ||
|
|
efc33633e3 | ||
|
|
37fca1fdcf | ||
|
|
b14aceea51 | ||
|
|
59961d8343 | ||
|
|
341f60555f | ||
|
|
0d705ca275 | ||
|
|
190b902fac | ||
|
|
2c3657a0ce | ||
|
|
46df9ea92a | ||
|
|
235f417616 | ||
|
|
d028d8bc3b | ||
|
|
63636c8403 | ||
|
|
c7508ca2e9 | ||
|
|
9c856aea96 | ||
|
|
d583fc88be | ||
|
|
9022d90e01 | ||
|
|
ef0a604d44 | ||
|
|
aeb4b3d2fc | ||
|
|
78d008fcd2 | ||
|
|
d94cd1efad | ||
|
|
09a2283b53 | ||
|
|
6665ebaa2e | ||
|
|
765a2e9118 | ||
|
|
1260c10aab | ||
|
|
73c9f25867 | ||
|
|
9092ddff3c | ||
|
|
db84b948f9 | ||
|
|
deb85d1fa8 | ||
|
|
64df9cfa47 | ||
|
|
bcaedd5781 | ||
|
|
518c98ea01 | ||
|
|
de642c8890 | ||
|
|
ae8df644d7 | ||
|
|
a3e5335dbf | ||
|
|
16b74a6ffa | ||
|
|
517a3d20e8 | ||
|
|
d780fa144a | ||
|
|
5fe69e73ba | ||
|
|
a2d19ec7f3 | ||
|
|
ec19f1e12f | ||
|
|
71be323973 | ||
|
|
bdb72bb3f0 | ||
|
|
76dfb85407 | ||
|
|
d6f6421973 | ||
|
|
f8a4fbf128 | ||
|
|
e5731f9bac | ||
|
|
c2710bd4e8 | ||
|
|
450a2cb5e4 | ||
|
|
ef416e84a1 | ||
|
|
5bbf1dcb44 | ||
|
|
466ca58b04 | ||
|
|
5b572638b8 | ||
|
|
62639fdf88 | ||
|
|
b3cdeb942a | ||
|
|
a296c40867 | ||
|
|
f896e26f59 | ||
|
|
d19b010d4e | ||
|
|
14aa5cf762 | ||
|
|
69255b870d | ||
|
|
a4de176e1c | ||
|
|
9b36a76ee6 | ||
|
|
a75bf983e5 | ||
|
|
6f774908fe | ||
|
|
a35639c7b5 | ||
|
|
db3ee5d62b | ||
|
|
08a547e077 | ||
|
|
b428c1834f | ||
|
|
5813d0ec0a | ||
|
|
4194879df1 | ||
|
|
9918d6cb5e | ||
|
|
19988c5faa | ||
|
|
7773157fae | ||
|
|
9bf86a2db3 | ||
|
|
edb81cf84a | ||
|
|
9257df24b5 | ||
|
|
97b0b13147 | ||
|
|
7e78636e8e | ||
|
|
f173fd28f0 | ||
|
|
eba0630907 | ||
|
|
1978506112 | ||
|
|
eea8090f84 | ||
|
|
96b5c92780 | ||
|
|
b74ba6298c | ||
|
|
9369a341c6 | ||
|
|
2c11d62d17 | ||
|
|
6602f12744 | ||
|
|
ab67be7e5a | ||
|
|
3d2b79c096 | ||
|
|
e047aeeb7c | ||
|
|
f38d31a811 | ||
|
|
71147216dc | ||
|
|
3659b2f100 | ||
|
|
ade2720829 | ||
|
|
69c78a7989 | ||
|
|
a5aa67882d | ||
|
|
37715c4029 | ||
|
|
82593fd6c1 | ||
|
|
0f37491a8b | ||
|
|
f5ea8805e1 | ||
|
|
a3992f504c | ||
|
|
27744952d1 | ||
|
|
0e96cbd8ce | ||
|
|
5c7d549267 | ||
|
|
e41bdfafe4 | ||
|
|
fc8d725367 | ||
|
|
03c932b9a7 | ||
|
|
09304831f6 | ||
|
|
8be18741e1 | ||
|
|
8e644111c2 | ||
|
|
c7133a6720 | ||
|
|
12e3162c5f | ||
|
|
2cb9a4fcc1 | ||
|
|
bc17a8922b | ||
|
|
ccdc9231f5 | ||
|
|
7b74fbb73f | ||
|
|
b5dd0ee07b | ||
|
|
3b12019892 | ||
|
|
c61497b744 | ||
|
|
d83fa92d58 | ||
|
|
aae2f74ae6 | ||
|
|
70c2f576c8 | ||
|
|
f97e53509e | ||
|
|
36b85ce909 | ||
|
|
5ae68e9a0f | ||
|
|
0c5ad99ec1 | ||
|
|
65ef4df6d4 | ||
|
|
cc681ffeda | ||
|
|
3313cb9c4b | ||
|
|
1dea7c801b | ||
|
|
adb0013470 | ||
|
|
bffc4ccc50 | ||
|
|
505cd6cd22 | ||
|
|
866ec367ad | ||
|
|
f92435cdb9 | ||
|
|
1961b16b78 | ||
|
|
dedab7b72c | ||
|
|
6217672bde | ||
|
|
e1edeab0c9 | ||
|
|
22decf4783 | ||
|
|
737be31c63 | ||
|
|
6d99204a82 | ||
|
|
2b1904a849 | ||
|
|
c1db2b4bb0 | ||
|
|
29213efa65 | ||
|
|
b7c8b2f29a | ||
|
|
ea1514ab63 | ||
|
|
955698c635 | ||
|
|
1c46c8a3dc | ||
|
|
778f70c906 | ||
|
|
9c6c2387b9 | ||
|
|
5e9163592f | ||
|
|
b9d794bb37 | ||
|
|
7af479bc53 | ||
|
|
defd7895da | ||
|
|
625d090243 | ||
|
|
fdcd548612 | ||
|
|
54b15532d3 | ||
|
|
eda8d1d842 | ||
|
|
21f93e127b | ||
|
|
1edb850639 | ||
|
|
52a4366e54 | ||
|
|
7e5f3330ff | ||
|
|
9b348ef6e8 | ||
|
|
da863ff5f9 | ||
|
|
29f3844b01 | ||
|
|
74653b3cd5 | ||
|
|
24fe3c48a0 | ||
|
|
55a566a6b4 | ||
|
|
e221905195 | ||
|
|
9896dc18e7 | ||
|
|
8fa93d64ab | ||
|
|
56269cd010 | ||
|
|
4e79d2ad64 | ||
|
|
6534345d9a | ||
|
|
7f0d0d0046 | ||
|
|
f7ded3db5e | ||
|
|
ebd3aa5289 | ||
|
|
ba919832e4 | ||
|
|
1fdc7975cb | ||
|
|
15f98b2a61 | ||
|
|
17ab859907 | ||
|
|
ff44bad9bd | ||
|
|
54ef731534 | ||
|
|
a37d3f96f4 | ||
|
|
ce5e46c37d | ||
|
|
7d5ec38953 | ||
|
|
c0a2ae2a4a | ||
|
|
7388054fa2 | ||
|
|
d0e70c37ab | ||
|
|
f0d958d850 | ||
|
|
6a1218c1cc | ||
|
|
1fc093491a | ||
|
|
fed80a0d41 | ||
|
|
b984846dd0 | ||
|
|
67728a5450 | ||
|
|
4b0514f087 | ||
|
|
029746a3d4 | ||
|
|
62a7ac507a | ||
|
|
faf1e770dd | ||
|
|
22df7c66ed | ||
|
|
d9230f4796 | ||
|
|
0f76744828 | ||
|
|
3dee60d65f | ||
|
|
06583ce421 | ||
|
|
99d7dad7e6 | ||
|
|
0cc3354731 | ||
|
|
be15de6baa | ||
|
|
082848e945 | ||
|
|
36976ecb43 | ||
|
|
92eaa34277 | ||
|
|
a7ab3a604b | ||
|
|
168e4eb532 | ||
|
|
a9a24ac000 | ||
|
|
4a769b6475 | ||
|
|
61bf7087f5 | ||
|
|
9f444b3981 | ||
|
|
2ef005afe5 | ||
|
|
d50cda3247 | ||
|
|
fa3467a94d | ||
|
|
ef0ae4c903 | ||
|
|
6d60cc65cf | ||
|
|
0c5655940c | ||
|
|
1209abf9dc | ||
|
|
a1ade13f1e | ||
|
|
1e5cbbc1d0 | ||
|
|
168f78b8b7 | ||
|
|
cc768f3e88 | ||
|
|
908216bbae | ||
|
|
47360a9a46 | ||
|
|
64bf432beb | ||
|
|
8f21fe4994 | ||
|
|
44471b3ea4 | ||
|
|
4931c675ab | ||
|
|
b144c79da2 | ||
|
|
8920736df0 | ||
|
|
17a891daa8 | ||
|
|
3ba9bdfc01 | ||
|
|
14470755b7 | ||
|
|
d058781f71 | ||
|
|
c68254927f | ||
|
|
a882afafe5 | ||
|
|
f1145186ea | ||
|
|
770b38b4f1 | ||
|
|
3f0545587f | ||
|
|
667272e71d | ||
|
|
d9d0df2534 | ||
|
|
abf7a8974b | ||
|
|
4bc9ab665d | ||
|
|
07f995eb72 | ||
|
|
3ae7a54c94 | ||
|
|
b83bd80424 | ||
|
|
10f6b860ee | ||
|
|
d4bef0d5ba | ||
|
|
005cb20e67 | ||
|
|
c6935f9dcb | ||
|
|
a4c269cd10 | ||
|
|
0f763da015 | ||
|
|
cb6272ed2d | ||
|
|
dccf486a0a | ||
|
|
d62f141b29 | ||
|
|
0ae3d7b0b0 | ||
|
|
ed6d41f55b | ||
|
|
cc3b5766fa | ||
|
|
2b2bf85970 | ||
|
|
367c8d7c7b | ||
|
|
919254cdd1 | ||
|
|
879f081de3 | ||
|
|
9fd3dbfc42 | ||
|
|
f0d4aca03d | ||
|
|
ae6cdea0fa | ||
|
|
d66946cee7 | ||
|
|
7db0e48454 | ||
|
|
a01d6f109d | ||
|
|
4cc9153df2 | ||
|
|
e2e8f86076 | ||
|
|
493bc621e4 | ||
|
|
dafca86123 | ||
|
|
54f129f765 | ||
|
|
9dbde4542c | ||
|
|
702a1adf4a | ||
|
|
667720d5af | ||
|
|
d0926d380e | ||
|
|
379c47cc75 | ||
|
|
2079517802 | ||
|
|
0c5f7f6a33 | ||
|
|
e1af623631 | ||
|
|
1998b65045 | ||
|
|
04a62cba1f | ||
|
|
3dab15d3b4 | ||
|
|
65989d269e | ||
|
|
b2585ac236 | ||
|
|
536507101d | ||
|
|
b7ea19d5e5 | ||
|
|
ac0f77b7e6 | ||
|
|
6905714986 | ||
|
|
25ab8c99df | ||
|
|
7073cfc58e | ||
|
|
5bed8ec603 | ||
|
|
a63e848509 | ||
|
|
5ec6147acb | ||
|
|
6b07e13fef | ||
|
|
fffaf122df | ||
|
|
dde7fa3b17 | ||
|
|
6baaa0fe87 | ||
|
|
6a7fb838f4 | ||
|
|
eccd5c03c3 | ||
|
|
33c70af2f8 | ||
|
|
1c77304ee9 | ||
|
|
ff890d1733 | ||
|
|
6389f4db4c | ||
|
|
ead02b08dd | ||
|
|
4e5ba722fd | ||
|
|
d29f368ca8 | ||
|
|
3399bc600e | ||
|
|
97ebfbf7a0 | ||
|
|
d9be8b9a00 | ||
|
|
01a812cbca | ||
|
|
b5624e14ff | ||
|
|
0b2073d143 | ||
|
|
1b79ba9ab6 | ||
|
|
6976b57988 | ||
|
|
799c6aa629 | ||
|
|
0cc2b026e7 | ||
|
|
f3d39815e7 | ||
|
|
f6a05121ec | ||
|
|
5d0236ad51 | ||
|
|
2382d3831c | ||
|
|
a96664674f | ||
|
|
836dad75ae | ||
|
|
53ee410d7a | ||
|
|
2bc886d0bd | ||
|
|
2be18f340f | ||
|
|
b9c790949e | ||
|
|
2f41dd7b5c | ||
|
|
704ac98d3f | ||
|
|
089dc86bcf | ||
|
|
cc2a272d6f | ||
|
|
ac0edbe9d2 | ||
|
|
2b365983db | ||
|
|
78152d13ee | ||
|
|
d145e78cd6 | ||
|
|
01d359c1df | ||
|
|
7d628ef76c | ||
|
|
7553d5892e | ||
|
|
6a01d6e7d3 | ||
|
|
1fb663b429 | ||
|
|
3489a45216 | ||
|
|
294beceec7 | ||
|
|
0f21e46586 | ||
|
|
547b2a2e37 | ||
|
|
950a9a72ab | ||
|
|
b3060956c3 | ||
|
|
9a19cc8323 | ||
|
|
118dcf27ce | ||
|
|
9ff737efbd | ||
|
|
f211a3bb69 | ||
|
|
ef5b1c8f5f | ||
|
|
a2ed1a4197 | ||
|
|
a71b2f0a93 | ||
|
|
2a873be9cd | ||
|
|
599bd1a6aa | ||
|
|
f8a959da05 | ||
|
|
e24eeefbd1 | ||
|
|
ca072c9fc6 | ||
|
|
de5b8a1c45 | ||
|
|
7ad4911584 | ||
|
|
616c21d730 | ||
|
|
80af7d3ccd | ||
|
|
d17b8412f1 | ||
|
|
04af745fec | ||
|
|
c94da8977d | ||
|
|
9a1745f2c8 | ||
|
|
720a9d0636 | ||
|
|
7324823b3e | ||
|
|
b09b557fc6 | ||
|
|
f5e72c8709 | ||
|
|
0da649eb72 | ||
|
|
49134ecf25 | ||
|
|
05887f2087 | ||
|
|
eedc0b19fd | ||
|
|
4560fae07e | ||
|
|
a6351ac474 | ||
|
|
dc5b136930 | ||
|
|
0b1eb4c841 | ||
|
|
5ad9b6b317 | ||
|
|
ea8e66ccd1 | ||
|
|
6493be9eea | ||
|
|
641deb9c0e | ||
|
|
05ce978e18 | ||
|
|
97e2951875 | ||
|
|
4db63e323e | ||
|
|
63cb046d38 | ||
|
|
0882623092 | ||
|
|
889e4787d6 | ||
|
|
3336aa95f1 | ||
|
|
b695e5c24b | ||
|
|
fc6f97f162 | ||
|
|
eb87a36940 | ||
|
|
6c4f2bd83d | ||
|
|
a82e8a701d | ||
|
|
28849fd789 | ||
|
|
524739900a | ||
|
|
aafbf7183f | ||
|
|
3a59163614 | ||
|
|
6a510d6174 | ||
|
|
ca569bb837 | ||
|
|
de5d8616bf | ||
|
|
d97e8bd49b | ||
|
|
b46e26e65a | ||
|
|
b6f67dd2b2 | ||
|
|
09f00e397c | ||
|
|
446fb65ca6 | ||
|
|
b3dd0995df | ||
|
|
1502c2fd8b | ||
|
|
0d2f081d41 | ||
|
|
45a1cfde1f | ||
|
|
2f5279eb01 | ||
|
|
c21b7f8cb8 | ||
|
|
a7147f327f | ||
|
|
0773e88df5 | ||
|
|
8b64dd67d2 | ||
|
|
d9ca0457b5 | ||
|
|
a76fb7b2fb | ||
|
|
3b80fcd1a0 | ||
|
|
b3612f6462 | ||
|
|
8b8c51573b | ||
|
|
84fac6ca44 | ||
|
|
bf0752a8d7 | ||
|
|
c4cef905ae | ||
|
|
cecf4b0d4e | ||
|
|
78f9cb44c3 | ||
|
|
3383436068 | ||
|
|
2d14a237dc | ||
|
|
a57757aaba | ||
|
|
933beeb18b | ||
|
|
965ac7f406 | ||
|
|
90242312fe | ||
|
|
b305534edc | ||
|
|
be1d44279c | ||
|
|
f6c3af9c8c | ||
|
|
0c4c4cfd16 | ||
|
|
f773da2273 | ||
|
|
8ca8887885 | ||
|
|
f5966890b0 | ||
|
|
01aa1882f8 | ||
|
|
5ad12c47dc | ||
|
|
766532948e | ||
|
|
4e8f93c6f1 | ||
|
|
b4eaf9d96f | ||
|
|
0ea20a5f86 | ||
|
|
33f1008d01 | ||
|
|
7381a2b072 | ||
|
|
e08edab180 | ||
|
|
ffd0ca4391 | ||
|
|
e7e2b26b2e | ||
|
|
a0fa64a91c | ||
|
|
acaf53926c | ||
|
|
38df1c3138 | ||
|
|
093fbfd867 | ||
|
|
ac0915bdb5 | ||
|
|
537e92b158 | ||
|
|
51b401d418 | ||
|
|
1506c40ec8 | ||
|
|
404ec13fbb | ||
|
|
5c56cf110b | ||
|
|
3149533f0c | ||
|
|
d2c6aeea7d | ||
|
|
c959f9f0d8 | ||
|
|
42ce72be3c | ||
|
|
be781fc8f5 | ||
|
|
39aedcef64 |
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,3 +1,5 @@
|
|||||||
|
- [ ] I confirm that I am the author of this code and release it to the SDL project under the Zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").
|
||||||
|
|
||||||
<!--- Provide a general summary of your changes in the Title above -->
|
<!--- Provide a general summary of your changes in the Title above -->
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|||||||
4
.github/actions/setup-gdk-desktop/action.yml
vendored
4
.github/actions/setup-gdk-desktop/action.yml
vendored
@@ -30,7 +30,7 @@ runs:
|
|||||||
echo "cache-key=gdk-${{ inputs.ref }}-${{ inputs.edition }}" >> $Env:GITHUB_OUTPUT
|
echo "cache-key=gdk-${{ inputs.ref }}-${{ inputs.edition }}" >> $Env:GITHUB_OUTPUT
|
||||||
- name: 'Restore cached GDK'
|
- name: 'Restore cached GDK'
|
||||||
id: cache-restore
|
id: cache-restore
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v5
|
||||||
with:
|
with:
|
||||||
path: '${{ steps.calc.outputs.gdk-path }}'
|
path: '${{ steps.calc.outputs.gdk-path }}'
|
||||||
key: ${{ steps.calc.outputs.cache-key }}
|
key: ${{ steps.calc.outputs.cache-key }}
|
||||||
@@ -58,7 +58,7 @@ runs:
|
|||||||
--no-user-props
|
--no-user-props
|
||||||
- name: 'Cache GDK'
|
- name: 'Cache GDK'
|
||||||
if: ${{ !steps.cache-restore.outputs.cache-hit }}
|
if: ${{ !steps.cache-restore.outputs.cache-hit }}
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v5
|
||||||
with:
|
with:
|
||||||
path: '${{ steps.calc.outputs.gdk-path }}'
|
path: '${{ steps.calc.outputs.gdk-path }}'
|
||||||
key: ${{ steps.calc.outputs.cache-key }}
|
key: ${{ steps.calc.outputs.cache-key }}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ outputs:
|
|||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/cache/restore@v4
|
- uses: actions/cache/restore@v5
|
||||||
id: restore-cache
|
id: restore-cache
|
||||||
with:
|
with:
|
||||||
path: /opt/cross-tools
|
path: /opt/cross-tools
|
||||||
@@ -34,7 +34,7 @@ runs:
|
|||||||
mkdir -p /opt
|
mkdir -p /opt
|
||||||
tar -C /opt -x -f /tmp/toolchain.tar.xz
|
tar -C /opt -x -f /tmp/toolchain.tar.xz
|
||||||
|
|
||||||
- uses: actions/cache/save@v4
|
- uses: actions/cache/save@v5
|
||||||
if: ${{ !steps.restore-cache.outputs.cache-hit }}
|
if: ${{ !steps.restore-cache.outputs.cache-hit }}
|
||||||
with:
|
with:
|
||||||
path: /opt/cross-tools
|
path: /opt/cross-tools
|
||||||
|
|||||||
4
.github/actions/setup-msvc-libusb/action.yml
vendored
4
.github/actions/setup-msvc-libusb/action.yml
vendored
@@ -17,7 +17,7 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- name: 'Restore cached libusb-${{ inputs.version }}.7z'
|
- name: 'Restore cached libusb-${{ inputs.version }}.7z'
|
||||||
id: cache-restore
|
id: cache-restore
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v5
|
||||||
with:
|
with:
|
||||||
path: 'C:\temp\libusb-${{ inputs.version }}.7z'
|
path: 'C:\temp\libusb-${{ inputs.version }}.7z'
|
||||||
key: libusb-msvc-${{ inputs.version }}
|
key: libusb-msvc-${{ inputs.version }}
|
||||||
@@ -28,7 +28,7 @@ runs:
|
|||||||
Invoke-WebRequest "https://github.com/libusb/libusb/releases/download/v${{ inputs.version }}/libusb-${{ inputs.version }}.7z" -OutFile "C:\temp\libusb-${{ inputs.version }}.7z"
|
Invoke-WebRequest "https://github.com/libusb/libusb/releases/download/v${{ inputs.version }}/libusb-${{ inputs.version }}.7z" -OutFile "C:\temp\libusb-${{ inputs.version }}.7z"
|
||||||
- name: 'Cache libusb-${{ inputs.version }}.7z'
|
- name: 'Cache libusb-${{ inputs.version }}.7z'
|
||||||
if: ${{ !steps.cache-restore.outputs.cache-hit }}
|
if: ${{ !steps.cache-restore.outputs.cache-hit }}
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v5
|
||||||
with:
|
with:
|
||||||
path: 'C:\temp\libusb-${{ inputs.version }}.7z'
|
path: 'C:\temp\libusb-${{ inputs.version }}.7z'
|
||||||
key: libusb-msvc-${{ inputs.version }}
|
key: libusb-msvc-${{ inputs.version }}
|
||||||
|
|||||||
6
.github/actions/setup-ngage-sdk/action.yml
vendored
6
.github/actions/setup-ngage-sdk/action.yml
vendored
@@ -7,7 +7,7 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
- name: 'Verify platform'
|
- name: 'Verify platform'
|
||||||
@@ -52,7 +52,7 @@ runs:
|
|||||||
echo "extras-branch=${extras_branch}" >> ${GITHUB_OUTPUT}
|
echo "extras-branch=${extras_branch}" >> ${GITHUB_OUTPUT}
|
||||||
# - name: 'Restore cached ${{ steps.calc.outputs.archive }}'
|
# - name: 'Restore cached ${{ steps.calc.outputs.archive }}'
|
||||||
# id: cache-restore
|
# id: cache-restore
|
||||||
# uses: actions/cache/restore@v4
|
# uses: actions/cache/restore@v5
|
||||||
# with:
|
# with:
|
||||||
# path: '${{ runner.temp }}'
|
# path: '${{ runner.temp }}'
|
||||||
# key: ${{ steps.calc.outputs.cache-key }}
|
# key: ${{ steps.calc.outputs.cache-key }}
|
||||||
@@ -68,7 +68,7 @@ runs:
|
|||||||
|
|
||||||
# - name: 'Cache ${{ steps.calc.outputs.archive }}'
|
# - name: 'Cache ${{ steps.calc.outputs.archive }}'
|
||||||
# if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
|
# if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
|
||||||
# uses: actions/cache/save@v4
|
# uses: actions/cache/save@v5
|
||||||
# with:
|
# with:
|
||||||
# path: |
|
# path: |
|
||||||
# ${{ runner.temp }}/apps.zip
|
# ${{ runner.temp }}/apps.zip
|
||||||
|
|||||||
4
.github/actions/setup-ninja/action.yml
vendored
4
.github/actions/setup-ninja/action.yml
vendored
@@ -36,7 +36,7 @@ runs:
|
|||||||
echo "cache-key=${archive}-${{ inputs.version }}-${{ runner.os }}-${{ runner.arch }}" >> ${GITHUB_OUTPUT}
|
echo "cache-key=${archive}-${{ inputs.version }}-${{ runner.os }}-${{ runner.arch }}" >> ${GITHUB_OUTPUT}
|
||||||
- name: 'Restore cached ${{ steps.calc.outputs.archive }}'
|
- name: 'Restore cached ${{ steps.calc.outputs.archive }}'
|
||||||
id: cache-restore
|
id: cache-restore
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v5
|
||||||
with:
|
with:
|
||||||
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}'
|
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}'
|
||||||
key: ${{ steps.calc.outputs.cache-key }}
|
key: ${{ steps.calc.outputs.cache-key }}
|
||||||
@@ -47,7 +47,7 @@ runs:
|
|||||||
Invoke-WebRequest "https://github.com/ninja-build/ninja/releases/download/v${{ inputs.version }}/${{ steps.calc.outputs.archive }}" -OutFile "${{ runner.temp }}/${{ steps.calc.outputs.archive }}"
|
Invoke-WebRequest "https://github.com/ninja-build/ninja/releases/download/v${{ inputs.version }}/${{ steps.calc.outputs.archive }}" -OutFile "${{ runner.temp }}/${{ steps.calc.outputs.archive }}"
|
||||||
- name: 'Cache ${{ steps.calc.outputs.archive }}'
|
- name: 'Cache ${{ steps.calc.outputs.archive }}'
|
||||||
if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
|
if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v5
|
||||||
with:
|
with:
|
||||||
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}'
|
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}'
|
||||||
key: ${{ steps.calc.outputs.cache-key }}
|
key: ${{ steps.calc.outputs.cache-key }}
|
||||||
|
|||||||
4
.github/actions/setup-vita-gles/action.yml
vendored
4
.github/actions/setup-vita-gles/action.yml
vendored
@@ -33,7 +33,7 @@ runs:
|
|||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
- uses: actions/cache/restore@v4
|
- uses: actions/cache/restore@v5
|
||||||
id: restore-cache
|
id: restore-cache
|
||||||
with:
|
with:
|
||||||
path: /vita/dependencies
|
path: /vita/dependencies
|
||||||
@@ -81,7 +81,7 @@ runs:
|
|||||||
wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/vitasdk_stubs.zip -P/tmp
|
wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/vitasdk_stubs.zip -P/tmp
|
||||||
unzip /tmp/vitasdk_stubs.zip -d/vita/dependencies/lib
|
unzip /tmp/vitasdk_stubs.zip -d/vita/dependencies/lib
|
||||||
|
|
||||||
- uses: actions/cache/save@v4
|
- uses: actions/cache/save@v5
|
||||||
if: ${{ !steps.restore-cache.outputs.cache-hit }}
|
if: ${{ !steps.restore-cache.outputs.cache-hit }}
|
||||||
with:
|
with:
|
||||||
path: /vita/dependencies
|
path: /vita/dependencies
|
||||||
|
|||||||
46
.github/workflows/create-test-plan.py
vendored
46
.github/workflows/create-test-plan.py
vendored
@@ -100,6 +100,7 @@ class JobSpec:
|
|||||||
clang_cl: bool = False
|
clang_cl: bool = False
|
||||||
gdk: bool = False
|
gdk: bool = False
|
||||||
vita_gles: Optional[VitaGLES] = None
|
vita_gles: Optional[VitaGLES] = None
|
||||||
|
more_hard_deps: bool = False
|
||||||
|
|
||||||
|
|
||||||
JOB_SPECS = {
|
JOB_SPECS = {
|
||||||
@@ -116,8 +117,10 @@ JOB_SPECS = {
|
|||||||
"ubuntu-22.04": JobSpec(name="Ubuntu 22.04", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04", ),
|
"ubuntu-22.04": JobSpec(name="Ubuntu 22.04", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04", ),
|
||||||
"ubuntu-latest": JobSpec(name="Ubuntu (latest)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-ubuntu-latest", ),
|
"ubuntu-latest": JobSpec(name="Ubuntu (latest)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-ubuntu-latest", ),
|
||||||
"ubuntu-24.04-arm64": JobSpec(name="Ubuntu 24.04 (ARM64)", os=JobOs.Ubuntu24_04_arm, platform=SdlPlatform.Linux, artifact="SDL-ubuntu24.04-arm64", ),
|
"ubuntu-24.04-arm64": JobSpec(name="Ubuntu 24.04 (ARM64)", os=JobOs.Ubuntu24_04_arm, platform=SdlPlatform.Linux, artifact="SDL-ubuntu24.04-arm64", ),
|
||||||
"steamrt3": JobSpec(name="Steam Linux Runtime 3.0 (x86_64)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-steamrt3", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest", ),
|
"steamrt3": JobSpec(name="Steam Linux Runtime 3.0 (x86_64)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-steamrt3", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest" ),
|
||||||
"steamrt3-arm64": JobSpec(name="Steam Linux Runtime 3.0 (arm64)", os=JobOs.Ubuntu24_04_arm, platform=SdlPlatform.Linux, artifact="SDL-steamrt3-arm64", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk/arm64:latest", ),
|
"steamrt3-arm64": JobSpec(name="Steam Linux Runtime 3.0 (arm64)", os=JobOs.Ubuntu24_04_arm, platform=SdlPlatform.Linux, artifact="SDL-steamrt3-arm64", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk/arm64:latest" ),
|
||||||
|
"steamrt4": JobSpec(name="Steam Linux Runtime 4.0 (x86_64)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-steamrt4", container="registry.gitlab.steamos.cloud/steamrt/steamrt4/sdk:latest", more_hard_deps = True, ),
|
||||||
|
"steamrt4-arm64": JobSpec(name="Steam Linux Runtime 4.0 (arm64)", os=JobOs.Ubuntu24_04_arm, platform=SdlPlatform.Linux, artifact="SDL-steamrt4-arm64", container="registry.gitlab.steamos.cloud/steamrt/steamrt4/sdk/arm64:latest", more_hard_deps = True, ),
|
||||||
"ubuntu-intel-icx": JobSpec(name="Ubuntu 22.04 (Intel oneAPI)", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04-oneapi", intel=IntelCompiler.Icx, ),
|
"ubuntu-intel-icx": JobSpec(name="Ubuntu 22.04 (Intel oneAPI)", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04-oneapi", intel=IntelCompiler.Icx, ),
|
||||||
"ubuntu-intel-icc": JobSpec(name="Ubuntu 22.04 (Intel Compiler)", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04-icc", intel=IntelCompiler.Icc, ),
|
"ubuntu-intel-icc": JobSpec(name="Ubuntu 22.04 (Intel Compiler)", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04-icc", intel=IntelCompiler.Icc, ),
|
||||||
"macos-framework-x64": JobSpec(name="MacOS (Framework) (x64)", os=JobOs.Macos14, platform=SdlPlatform.MacOS, artifact="SDL-macos-framework", apple_framework=True, apple_archs={AppleArch.Aarch64, AppleArch.X86_64, }, xcode=True, ),
|
"macos-framework-x64": JobSpec(name="MacOS (Framework) (x64)", os=JobOs.Macos14, platform=SdlPlatform.MacOS, artifact="SDL-macos-framework", apple_framework=True, apple_archs={AppleArch.Aarch64, AppleArch.X86_64, }, xcode=True, ),
|
||||||
@@ -209,8 +212,7 @@ class JobDetails:
|
|||||||
minidump: bool = False
|
minidump: bool = False
|
||||||
intel: bool = False
|
intel: bool = False
|
||||||
msys2_msystem: str = ""
|
msys2_msystem: str = ""
|
||||||
msys2_env: str = ""
|
msys2_packages: list[str] = dataclasses.field(default_factory=list)
|
||||||
msys2_no_perl: bool = False
|
|
||||||
werror: bool = True
|
werror: bool = True
|
||||||
msvc_vcvars_arch: str = ""
|
msvc_vcvars_arch: str = ""
|
||||||
msvc_vcvars_sdk: str = ""
|
msvc_vcvars_sdk: str = ""
|
||||||
@@ -245,8 +247,7 @@ class JobDetails:
|
|||||||
"enable-artifacts": enable_artifacts,
|
"enable-artifacts": enable_artifacts,
|
||||||
"shell": self.shell,
|
"shell": self.shell,
|
||||||
"msys2-msystem": self.msys2_msystem,
|
"msys2-msystem": self.msys2_msystem,
|
||||||
"msys2-env": self.msys2_env,
|
"msys2-packages": my_shlex_join(self.msys2_packages),
|
||||||
"msys2-no-perl": self.msys2_no_perl,
|
|
||||||
"android-ndk": self.android_ndk,
|
"android-ndk": self.android_ndk,
|
||||||
"java": self.java,
|
"java": self.java,
|
||||||
"intel": self.intel,
|
"intel": self.intel,
|
||||||
@@ -448,6 +449,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
|||||||
"libxfixes-dev",
|
"libxfixes-dev",
|
||||||
"libxi-dev",
|
"libxi-dev",
|
||||||
"libxss-dev",
|
"libxss-dev",
|
||||||
|
"libxtst-dev",
|
||||||
"libwayland-dev",
|
"libwayland-dev",
|
||||||
"libxkbcommon-dev",
|
"libxkbcommon-dev",
|
||||||
"libdrm-dev",
|
"libdrm-dev",
|
||||||
@@ -483,6 +485,19 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
|||||||
job.shared_lib = SharedLibType.SO_0
|
job.shared_lib = SharedLibType.SO_0
|
||||||
job.static_lib = StaticLibType.A
|
job.static_lib = StaticLibType.A
|
||||||
fpic = True
|
fpic = True
|
||||||
|
if spec.more_hard_deps:
|
||||||
|
# Some distros prefer to make important dependencies
|
||||||
|
# mandatory, so that SDL won't start up but lack expected
|
||||||
|
# functionality if they're missing
|
||||||
|
job.cmake_arguments.extend([
|
||||||
|
"-DSDL_ALSA_SHARED=OFF",
|
||||||
|
"-DSDL_FRIBIDI_SHARED=OFF",
|
||||||
|
"-DSDL_HIDAPI_LIBUSB_SHARED=OFF",
|
||||||
|
"-DSDL_PULSEAUDIO_SHARED=OFF",
|
||||||
|
"-DSDL_X11_SHARED=OFF",
|
||||||
|
"-DSDL_WAYLAND_LIBDECOR_SHARED=OFF",
|
||||||
|
"-DSDL_WAYLAND_SHARED=OFF",
|
||||||
|
])
|
||||||
case SdlPlatform.Ios | SdlPlatform.Tvos:
|
case SdlPlatform.Ios | SdlPlatform.Tvos:
|
||||||
job.brew_packages.extend([
|
job.brew_packages.extend([
|
||||||
"ccache",
|
"ccache",
|
||||||
@@ -720,15 +735,26 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
|||||||
job.shell = "msys2 {0}"
|
job.shell = "msys2 {0}"
|
||||||
assert spec.msys2_platform
|
assert spec.msys2_platform
|
||||||
job.msys2_msystem = spec.msys2_platform.value
|
job.msys2_msystem = spec.msys2_platform.value
|
||||||
job.msys2_env = {
|
job.shared_lib = SharedLibType.WIN32
|
||||||
|
job.static_lib = StaticLibType.A
|
||||||
|
msys2_env = {
|
||||||
"mingw32": "mingw-w64-i686",
|
"mingw32": "mingw-w64-i686",
|
||||||
"mingw64": "mingw-w64-x86_64",
|
"mingw64": "mingw-w64-x86_64",
|
||||||
"clang64": "mingw-w64-clang-x86_64",
|
"clang64": "mingw-w64-clang-x86_64",
|
||||||
"ucrt64": "mingw-w64-ucrt-x86_64",
|
"ucrt64": "mingw-w64-ucrt-x86_64",
|
||||||
}[spec.msys2_platform.value]
|
}[spec.msys2_platform.value]
|
||||||
job.msys2_no_perl = spec.msys2_platform in (Msys2Platform.Mingw32, )
|
job.msys2_packages.extend([
|
||||||
job.shared_lib = SharedLibType.WIN32
|
f"{msys2_env}-cc",
|
||||||
job.static_lib = StaticLibType.A
|
f"{msys2_env}-cmake",
|
||||||
|
f"{msys2_env}-ffmpeg",
|
||||||
|
f"{msys2_env}-ninja",
|
||||||
|
f"{msys2_env}-pkg-config",
|
||||||
|
])
|
||||||
|
if spec.msys2_platform not in (Msys2Platform.Mingw32, ):
|
||||||
|
job.msys2_packages.append(f"{msys2_env}-perl")
|
||||||
|
job.msys2_packages.append(f"{msys2_env}-clang-tools-extra")
|
||||||
|
if job.ccache:
|
||||||
|
job.msys2_packages.append(f"{msys2_env}-ccache")
|
||||||
case SdlPlatform.Riscos:
|
case SdlPlatform.Riscos:
|
||||||
job.ccache = False # FIXME: enable when container gets upgrade
|
job.ccache = False # FIXME: enable when container gets upgrade
|
||||||
# FIXME: Enable SDL_WERROR
|
# FIXME: Enable SDL_WERROR
|
||||||
|
|||||||
32
.github/workflows/generic.yml
vendored
32
.github/workflows/generic.yml
vendored
@@ -27,15 +27,7 @@ jobs:
|
|||||||
uses: msys2/setup-msys2@v2
|
uses: msys2/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
msystem: ${{ matrix.platform.msys2-msystem }}
|
msystem: ${{ matrix.platform.msys2-msystem }}
|
||||||
install: >-
|
install: ${{ matrix.platform.msys2-packages }}
|
||||||
${{ matrix.platform.msys2-env }}-cc
|
|
||||||
${{ matrix.platform.msys2-env }}-cmake
|
|
||||||
${{ matrix.platform.msys2-env }}-ffmpeg
|
|
||||||
${{ matrix.platform.msys2-env }}-ninja
|
|
||||||
${{ (!matrix.platform.msys2-no-perl && format('{0}-perl', matrix.platform.msys2-env)) || '' }}
|
|
||||||
${{ matrix.platform.msys2-env }}-pkg-config
|
|
||||||
${{ matrix.platform.msys2-env }}-clang-tools-extra
|
|
||||||
${{ (matrix.platform.ccache && format('{0}-ccache', matrix.platform.msys2-env)) || '' }}
|
|
||||||
- name: 'About this job'
|
- name: 'About this job'
|
||||||
run: |
|
run: |
|
||||||
echo "key=${{ matrix.platform.key }}"
|
echo "key=${{ matrix.platform.key }}"
|
||||||
@@ -43,7 +35,7 @@ jobs:
|
|||||||
echo "os=${{ matrix.platform.os }}"
|
echo "os=${{ matrix.platform.os }}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Add [sdl-ci-filter ${{ matrix.platform.key }}] to your commit message to reduce the number of jobs."
|
echo "Add [sdl-ci-filter ${{ matrix.platform.key }}] to your commit message to reduce the number of jobs."
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- name: 'Set up ninja'
|
- name: 'Set up ninja'
|
||||||
if: ${{ matrix.platform.setup-ninja }}
|
if: ${{ matrix.platform.setup-ninja }}
|
||||||
uses: ./.github/actions/setup-ninja
|
uses: ./.github/actions/setup-ninja
|
||||||
@@ -52,11 +44,11 @@ jobs:
|
|||||||
uses: ./.github/actions/setup-msvc-libusb
|
uses: ./.github/actions/setup-msvc-libusb
|
||||||
with:
|
with:
|
||||||
arch: ${{ matrix.platform.setup-libusb-arch }}
|
arch: ${{ matrix.platform.setup-libusb-arch }}
|
||||||
- uses: mymindstorm/setup-emsdk@v14
|
- uses: mymindstorm/setup-emsdk@v15
|
||||||
if: ${{ matrix.platform.platform == 'emscripten' }}
|
if: ${{ matrix.platform.platform == 'emscripten' }}
|
||||||
with:
|
with:
|
||||||
version: 3.1.35
|
version: 3.1.35
|
||||||
- uses: browser-actions/setup-chrome@v1
|
- uses: browser-actions/setup-chrome@v2
|
||||||
id: setup-chrome
|
id: setup-chrome
|
||||||
if: ${{ matrix.platform.platform == 'emscripten' }}
|
if: ${{ matrix.platform.platform == 'emscripten' }}
|
||||||
with:
|
with:
|
||||||
@@ -84,7 +76,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
# We cannot use GitHub expressions in the controller job
|
# We cannot use GitHub expressions in the controller job
|
||||||
echo "ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}" >>$GITHUB_ENV
|
echo "ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}" >>$GITHUB_ENV
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v5
|
||||||
if: ${{ matrix.platform.java }}
|
if: ${{ matrix.platform.java }}
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
@@ -179,7 +171,7 @@ jobs:
|
|||||||
echo "timestamp=$(date -u "+%Y%m%d%H%M_%S")" >> "$GITHUB_OUTPUT"
|
echo "timestamp=$(date -u "+%Y%m%d%H%M_%S")" >> "$GITHUB_OUTPUT"
|
||||||
- name: 'Restore ccache'
|
- name: 'Restore ccache'
|
||||||
if: ${{ matrix.platform.ccache }}
|
if: ${{ matrix.platform.ccache }}
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v5
|
||||||
id: restore-ccache
|
id: restore-ccache
|
||||||
with:
|
with:
|
||||||
path: ${{ runner.temp }}/ccache
|
path: ${{ runner.temp }}/ccache
|
||||||
@@ -327,7 +319,7 @@ jobs:
|
|||||||
- name: 'Build (cross-platform-actions, BSD)'
|
- name: 'Build (cross-platform-actions, BSD)'
|
||||||
id: cpactions
|
id: cpactions
|
||||||
if: ${{ matrix.platform.cpactions }}
|
if: ${{ matrix.platform.cpactions }}
|
||||||
uses: cross-platform-actions/action@v0.29.0
|
uses: cross-platform-actions/action@v0.32.0
|
||||||
with:
|
with:
|
||||||
operating_system: '${{ matrix.platform.cpactions-os }}'
|
operating_system: '${{ matrix.platform.cpactions-os }}'
|
||||||
architecture: '${{ matrix.platform.cpactions-arch }}'
|
architecture: '${{ matrix.platform.cpactions-arch }}'
|
||||||
@@ -357,7 +349,7 @@ jobs:
|
|||||||
- name: Add msbuild to PATH
|
- name: Add msbuild to PATH
|
||||||
id: setup-msbuild
|
id: setup-msbuild
|
||||||
if: ${{ matrix.platform.msvc-project != '' }}
|
if: ${{ matrix.platform.msvc-project != '' }}
|
||||||
uses: microsoft/setup-msbuild@v2
|
uses: microsoft/setup-msbuild@v3
|
||||||
- name: Build msbuild
|
- name: Build msbuild
|
||||||
if: ${{ matrix.platform.msvc-project != '' }}
|
if: ${{ matrix.platform.msvc-project != '' }}
|
||||||
run: |
|
run: |
|
||||||
@@ -401,7 +393,7 @@ jobs:
|
|||||||
ccache -s
|
ccache -s
|
||||||
- name: 'Save ccache'
|
- name: 'Save ccache'
|
||||||
if: ${{ matrix.platform.ccache }}
|
if: ${{ matrix.platform.ccache }}
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v5
|
||||||
with:
|
with:
|
||||||
path: ${{ runner.temp }}/ccache
|
path: ${{ runner.temp }}/ccache
|
||||||
key: ${{ steps.restore-ccache.outputs.cache-primary-key }}
|
key: ${{ steps.restore-ccache.outputs.cache-primary-key }}
|
||||||
@@ -421,7 +413,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
find ./ -iname '*.so' | xargs -L1 ./build-scripts/check_elf_alignment.sh
|
find ./ -iname '*.so' | xargs -L1 ./build-scripts/check_elf_alignment.sh
|
||||||
- name: 'Upload binary package'
|
- name: 'Upload binary package'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
if: ${{ always() && matrix.platform.artifact != '' && (steps.package.outcome == 'success' || steps.cpactions.outcome == 'success') && (matrix.platform.enable-artifacts || steps.tests.outcome == 'failure') }}
|
if: ${{ always() && matrix.platform.artifact != '' && (steps.package.outcome == 'success' || steps.cpactions.outcome == 'success') && (matrix.platform.enable-artifacts || steps.tests.outcome == 'failure') }}
|
||||||
with:
|
with:
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
@@ -430,14 +422,14 @@ jobs:
|
|||||||
build/dist/SDL3*
|
build/dist/SDL3*
|
||||||
build/include*
|
build/include*
|
||||||
- name: 'Upload minidumps'
|
- name: 'Upload minidumps'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
if: ${{ always() && steps.tests.outcome == 'failure' && (matrix.platform.platform == 'msvc' || matrix.platform.platform == 'msys2') }}
|
if: ${{ always() && steps.tests.outcome == 'failure' && (matrix.platform.platform == 'msvc' || matrix.platform.platform == 'msys2') }}
|
||||||
with:
|
with:
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
name: '${{ matrix.platform.artifact }}-minidumps'
|
name: '${{ matrix.platform.artifact }}-minidumps'
|
||||||
path: build/**/*.dmp
|
path: build/**/*.dmp
|
||||||
- name: "Upload Android test apk's"
|
- name: "Upload Android test apk's"
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
if: ${{ matrix.platform.enable-artifacts && always() && matrix.platform.artifact != '' && steps.apks.outcome == 'success' }}
|
if: ${{ matrix.platform.enable-artifacts && always() && matrix.platform.artifact != '' && steps.apks.outcome == 'success' }}
|
||||||
with:
|
with:
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|||||||
79
.github/workflows/release.yml
vendored
79
.github/workflows/release.yml
vendored
@@ -20,15 +20,15 @@ jobs:
|
|||||||
src-zip: ${{ steps.releaser.outputs.src-zip }}
|
src-zip: ${{ steps.releaser.outputs.src-zip }}
|
||||||
steps:
|
steps:
|
||||||
- name: 'Set up Python'
|
- name: 'Set up Python'
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: 'Fetch build-release.py'
|
- name: 'Fetch build-release.py'
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
sparse-checkout: 'build-scripts/build-release.py'
|
sparse-checkout: 'build-scripts/build-release.py'
|
||||||
- name: 'Set up SDL sources'
|
- name: 'Set up SDL sources'
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
path: 'SDL'
|
path: 'SDL'
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -43,7 +43,7 @@ jobs:
|
|||||||
--github \
|
--github \
|
||||||
--debug
|
--debug
|
||||||
- name: 'Store source archives'
|
- name: 'Store source archives'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: sources
|
name: sources
|
||||||
path: '${{ github.workspace}}/dist'
|
path: '${{ github.workspace}}/dist'
|
||||||
@@ -61,7 +61,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Download source archives'
|
- name: 'Download source archives'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: sources
|
name: sources
|
||||||
path: '${{ github.workspace }}'
|
path: '${{ github.workspace }}'
|
||||||
@@ -91,13 +91,21 @@ jobs:
|
|||||||
sudo apt-get install -y \
|
sudo apt-get install -y \
|
||||||
gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev libjack-dev libsndio-dev \
|
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 \
|
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 \
|
libxss-dev libxtst-dev libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev \
|
||||||
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-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)'
|
- name: 'CMake (configure + build + tests + examples)'
|
||||||
run: |
|
run: |
|
||||||
|
set -e
|
||||||
cmake -S ${{ steps.tar.outputs.path }} -B /tmp/build -DSDL_TEST_LIBRARY=TRUE -DSDL_TESTS=TRUE -DSDL_EXAMPLES=TRUE
|
cmake -S ${{ steps.tar.outputs.path }} -B /tmp/build -DSDL_TEST_LIBRARY=TRUE -DSDL_TESTS=TRUE -DSDL_EXAMPLES=TRUE
|
||||||
cmake --build /tmp/build --verbose
|
cmake --build /tmp/build --verbose
|
||||||
ctest --test-dir /tmp/build --no-tests=error --output-on-failure
|
ctest --test-dir /tmp/build --no-tests=error --output-on-failure
|
||||||
|
- name: 'Verify SDL_REVISION contains SDL-'
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
if test "x$(strings /tmp/build/libSDL3.so.0 | grep SDL- | wc -l)" != x1; then
|
||||||
|
echo "SDL- string not found: must be present in SDL_REVISION"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
dmg:
|
dmg:
|
||||||
needs: [src]
|
needs: [src]
|
||||||
@@ -106,15 +114,15 @@ jobs:
|
|||||||
dmg: ${{ steps.releaser.outputs.dmg }}
|
dmg: ${{ steps.releaser.outputs.dmg }}
|
||||||
steps:
|
steps:
|
||||||
- name: 'Set up Python'
|
- name: 'Set up Python'
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: 'Fetch build-release.py'
|
- name: 'Fetch build-release.py'
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
sparse-checkout: 'build-scripts/build-release.py'
|
sparse-checkout: 'build-scripts/build-release.py'
|
||||||
- name: 'Download source archives'
|
- name: 'Download source archives'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: sources
|
name: sources
|
||||||
path: '${{ github.workspace }}'
|
path: '${{ github.workspace }}'
|
||||||
@@ -135,7 +143,7 @@ jobs:
|
|||||||
--github \
|
--github \
|
||||||
--debug
|
--debug
|
||||||
- name: 'Store DMG image file'
|
- name: 'Store DMG image file'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: dmg
|
name: dmg
|
||||||
path: '${{ github.workspace }}/dist'
|
path: '${{ github.workspace }}/dist'
|
||||||
@@ -145,12 +153,12 @@ jobs:
|
|||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Download source archives'
|
- name: 'Download source archives'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: sources
|
name: sources
|
||||||
path: '${{ github.workspace }}'
|
path: '${{ github.workspace }}'
|
||||||
- name: 'Download ${{ needs.dmg.outputs.dmg }}'
|
- name: 'Download ${{ needs.dmg.outputs.dmg }}'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: dmg
|
name: dmg
|
||||||
path: '${{ github.workspace }}'
|
path: '${{ github.workspace }}'
|
||||||
@@ -314,15 +322,15 @@ jobs:
|
|||||||
VC-devel: ${{ steps.releaser.outputs.VC-devel }}
|
VC-devel: ${{ steps.releaser.outputs.VC-devel }}
|
||||||
steps:
|
steps:
|
||||||
- name: 'Set up Python'
|
- name: 'Set up Python'
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: 'Fetch build-release.py'
|
- name: 'Fetch build-release.py'
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
sparse-checkout: 'build-scripts/build-release.py'
|
sparse-checkout: 'build-scripts/build-release.py'
|
||||||
- name: 'Download source archives'
|
- name: 'Download source archives'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: sources
|
name: sources
|
||||||
path: '${{ github.workspace }}'
|
path: '${{ github.workspace }}'
|
||||||
@@ -343,7 +351,7 @@ jobs:
|
|||||||
--github `
|
--github `
|
||||||
--debug
|
--debug
|
||||||
- name: 'Store MSVC archives'
|
- name: 'Store MSVC archives'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: win32
|
name: win32
|
||||||
path: '${{ github.workspace }}/dist'
|
path: '${{ github.workspace }}/dist'
|
||||||
@@ -353,16 +361,16 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Fetch .github/actions/setup-ninja/action.yml'
|
- name: 'Fetch .github/actions/setup-ninja/action.yml'
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
sparse-checkout: '.github/actions/setup-ninja/action.yml'
|
sparse-checkout: '.github/actions/setup-ninja/action.yml'
|
||||||
- name: 'Download source archives'
|
- name: 'Download source archives'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: sources
|
name: sources
|
||||||
path: '${{ github.workspace }}'
|
path: '${{ github.workspace }}'
|
||||||
- name: 'Download MSVC binaries'
|
- name: 'Download MSVC binaries'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: win32
|
name: win32
|
||||||
path: '${{ github.workspace }}'
|
path: '${{ github.workspace }}'
|
||||||
@@ -473,11 +481,11 @@ jobs:
|
|||||||
mingw-devel-tar-xz: ${{ steps.releaser.outputs.mingw-devel-tar-xz }}
|
mingw-devel-tar-xz: ${{ steps.releaser.outputs.mingw-devel-tar-xz }}
|
||||||
steps:
|
steps:
|
||||||
- name: 'Set up Python'
|
- name: 'Set up Python'
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: 'Fetch build-release.py'
|
- name: 'Fetch build-release.py'
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
sparse-checkout: 'build-scripts/build-release.py'
|
sparse-checkout: 'build-scripts/build-release.py'
|
||||||
- name: 'Install Mingw toolchain'
|
- name: 'Install Mingw toolchain'
|
||||||
@@ -485,7 +493,7 @@ jobs:
|
|||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get install -y gcc-mingw-w64 g++-mingw-w64 ninja-build
|
sudo apt-get install -y gcc-mingw-w64 g++-mingw-w64 ninja-build
|
||||||
- name: 'Download source archives'
|
- name: 'Download source archives'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: sources
|
name: sources
|
||||||
path: '${{ github.workspace }}'
|
path: '${{ github.workspace }}'
|
||||||
@@ -505,7 +513,7 @@ jobs:
|
|||||||
--github \
|
--github \
|
||||||
--debug
|
--debug
|
||||||
- name: 'Store MinGW archives'
|
- name: 'Store MinGW archives'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: mingw
|
name: mingw
|
||||||
path: '${{ github.workspace }}/dist'
|
path: '${{ github.workspace }}/dist'
|
||||||
@@ -519,12 +527,12 @@ jobs:
|
|||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get install -y gcc-mingw-w64 g++-mingw-w64 ninja-build
|
sudo apt-get install -y gcc-mingw-w64 g++-mingw-w64 ninja-build
|
||||||
- name: 'Download source archives'
|
- name: 'Download source archives'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: sources
|
name: sources
|
||||||
path: '${{ github.workspace }}'
|
path: '${{ github.workspace }}'
|
||||||
- name: 'Download MinGW binaries'
|
- name: 'Download MinGW binaries'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: mingw
|
name: mingw
|
||||||
path: '${{ github.workspace }}'
|
path: '${{ github.workspace }}'
|
||||||
@@ -574,11 +582,11 @@ jobs:
|
|||||||
android-aar: ${{ steps.releaser.outputs.android-aar }}
|
android-aar: ${{ steps.releaser.outputs.android-aar }}
|
||||||
steps:
|
steps:
|
||||||
- name: 'Set up Python'
|
- name: 'Set up Python'
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: 'Fetch build-release.py'
|
- name: 'Fetch build-release.py'
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
sparse-checkout: 'build-scripts/build-release.py'
|
sparse-checkout: 'build-scripts/build-release.py'
|
||||||
- name: 'Setup Android NDK'
|
- name: 'Setup Android NDK'
|
||||||
@@ -588,7 +596,7 @@ jobs:
|
|||||||
local-cache: false
|
local-cache: false
|
||||||
ndk-version: r28c
|
ndk-version: r28c
|
||||||
- name: 'Setup Java JDK'
|
- name: 'Setup Java JDK'
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
@@ -597,7 +605,7 @@ jobs:
|
|||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get install -y ninja-build
|
sudo apt-get install -y ninja-build
|
||||||
- name: 'Download source archives'
|
- name: 'Download source archives'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: sources
|
name: sources
|
||||||
path: '${{ github.workspace }}'
|
path: '${{ github.workspace }}'
|
||||||
@@ -619,7 +627,7 @@ jobs:
|
|||||||
--github \
|
--github \
|
||||||
--debug
|
--debug
|
||||||
- name: 'Store Android archive(s)'
|
- name: 'Store Android archive(s)'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: android
|
name: android
|
||||||
path: '${{ github.workspace }}/dist'
|
path: '${{ github.workspace }}/dist'
|
||||||
@@ -629,20 +637,20 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Set up Python'
|
- name: 'Set up Python'
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
- name: 'Download source archives'
|
- name: 'Download source archives'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: sources
|
name: sources
|
||||||
path: '${{ github.workspace }}'
|
path: '${{ github.workspace }}'
|
||||||
- name: 'Download Android .aar archive'
|
- name: 'Download Android .aar archive'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: android
|
name: android
|
||||||
path: '${{ github.workspace }}'
|
path: '${{ github.workspace }}'
|
||||||
@@ -677,6 +685,7 @@ jobs:
|
|||||||
-DTEST_TEST=TRUE \
|
-DTEST_TEST=TRUE \
|
||||||
-DCMAKE_PREFIX_PATH="${{ steps.sdk.outputs.prefix }}" \
|
-DCMAKE_PREFIX_PATH="${{ steps.sdk.outputs.prefix }}" \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
|
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
|
||||||
|
-DANDROID_USE_LEGACY_TOOLCHAIN=0 \
|
||||||
-DANDROID_ABI=${android_abi} \
|
-DANDROID_ABI=${android_abi} \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-B "${android_abi}"
|
-B "${android_abi}"
|
||||||
|
|||||||
20
AGENTS.md
Normal file
20
AGENTS.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
AI must not be used to generate code for contributions to this project.
|
||||||
|
|
||||||
|
"AI" in this case means a Large Language Model ("LLM"), such as ChatGPT,
|
||||||
|
Claude, Copilot, Grok, etc.
|
||||||
|
|
||||||
|
AI-generated code is based upon sources of unknown origins and may not be
|
||||||
|
compatible with the Zlib license, or may introduce conflicting license terms
|
||||||
|
if they include code from other projects.
|
||||||
|
|
||||||
|
AI can be used to identify issues with contributions to this project, but the
|
||||||
|
solutions to those issues should be authored by humans.
|
||||||
|
|
||||||
|
We have found that AI will frequently hallucinate issues that are not actually
|
||||||
|
problems in practice, report incorrect information, and describe problems that
|
||||||
|
are actually not issues at all. If AI identifies a problem with this codebase,
|
||||||
|
please make sure you understand what it is saying and have independently
|
||||||
|
confirmed that the issue exists before submitting a bug report or pull request.
|
||||||
|
|
||||||
|
Any pull request to this project will ask you to confirm that you are the
|
||||||
|
author and that you are contributing your changes under the Zlib license.
|
||||||
@@ -112,8 +112,6 @@ ifeq ($(NDK_DEBUG),1)
|
|||||||
cmd-strip :=
|
cmd-strip :=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LOCAL_STATIC_LIBRARIES := cpufeatures
|
|
||||||
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
||||||
|
|
||||||
@@ -145,4 +143,3 @@ LOCAL_EXPORT_LDLIBS :=
|
|||||||
|
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
$(call import-module,android/cpufeatures)
|
|
||||||
|
|||||||
22
CLAUDE.md
Normal file
22
CLAUDE.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
AI must not be used to generate code for contributions to this project.
|
||||||
|
|
||||||
|
"AI" in this case means a Large Language Model ("LLM"), such as ChatGPT,
|
||||||
|
Claude, Copilot, Grok, etc.
|
||||||
|
|
||||||
|
AI-generated code is based upon sources of unknown origins and may not be
|
||||||
|
compatible with the Zlib license, or may introduce conflicting license terms
|
||||||
|
if they include code from other projects.
|
||||||
|
|
||||||
|
AI can be used to identify issues with contributions to this project, but the
|
||||||
|
solutions to those issues should be authored by humans.
|
||||||
|
|
||||||
|
We have found that AI will frequently hallucinate issues that are not actually
|
||||||
|
problems in practice, report incorrect information, and describe problems that
|
||||||
|
are actually not issues at all. If AI identifies a problem with this codebase,
|
||||||
|
please make sure you understand what it is saying and have independently
|
||||||
|
confirmed that the issue exists before submitting a bug report or pull request.
|
||||||
|
|
||||||
|
Any pull request to this project will ask you to confirm that you are the
|
||||||
|
author and that you are contributing your changes under the Zlib license.
|
||||||
|
|
||||||
|
|
||||||
189
CMakeLists.txt
189
CMakeLists.txt
@@ -5,7 +5,7 @@ if(NOT DEFINED CMAKE_BUILD_TYPE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# See docs/release_checklist.md
|
# See docs/release_checklist.md
|
||||||
project(SDL3 LANGUAGES C VERSION "3.3.2")
|
project(SDL3 LANGUAGES C VERSION "3.4.6")
|
||||||
|
|
||||||
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||||
set(SDL3_MAINPROJECT ON)
|
set(SDL3_MAINPROJECT ON)
|
||||||
@@ -46,6 +46,7 @@ endif()
|
|||||||
|
|
||||||
include(CheckLibraryExists)
|
include(CheckLibraryExists)
|
||||||
include(CheckIncludeFile)
|
include(CheckIncludeFile)
|
||||||
|
include(CheckIncludeFiles)
|
||||||
include(CheckLanguage)
|
include(CheckLanguage)
|
||||||
include(CheckSymbolExists)
|
include(CheckSymbolExists)
|
||||||
include(CheckCSourceCompiles)
|
include(CheckCSourceCompiles)
|
||||||
@@ -169,12 +170,12 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(SDL_ASSEMBLY_DEFAULT OFF)
|
set(SDL_ASSEMBLY_DEFAULT OFF)
|
||||||
if(USE_CLANG OR USE_GCC OR USE_INTELCC OR MSVC_VERSION GREATER 1400)
|
if(USE_CLANG OR USE_GCC OR USE_INTELCC OR USE_TCC OR MSVC_VERSION GREATER 1400)
|
||||||
set(SDL_ASSEMBLY_DEFAULT ON)
|
set(SDL_ASSEMBLY_DEFAULT ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(SDL_GCC_ATOMICS_DEFAULT OFF)
|
set(SDL_GCC_ATOMICS_DEFAULT OFF)
|
||||||
if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC)
|
if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC OR USE_TCC)
|
||||||
set(SDL_GCC_ATOMICS_DEFAULT ON)
|
set(SDL_GCC_ATOMICS_DEFAULT ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -349,6 +350,8 @@ dep_option(SDL_X11_XSYNC "Enable Xsync support" ON SDL_X11 OFF)
|
|||||||
dep_option(SDL_X11_XTEST "Enable XTest support" ON SDL_X11 OFF)
|
dep_option(SDL_X11_XTEST "Enable XTest support" ON SDL_X11 OFF)
|
||||||
dep_option(SDL_FRIBIDI "Enable Fribidi support" ON SDL_X11 OFF)
|
dep_option(SDL_FRIBIDI "Enable Fribidi support" ON SDL_X11 OFF)
|
||||||
dep_option(SDL_FRIBIDI_SHARED "Dynamically load Fribidi support" ON "SDL_FRIBIDI;SDL_DEPS_SHARED" OFF)
|
dep_option(SDL_FRIBIDI_SHARED "Dynamically load Fribidi support" ON "SDL_FRIBIDI;SDL_DEPS_SHARED" OFF)
|
||||||
|
dep_option(SDL_LIBTHAI "Enable Thai support" ON SDL_X11 OFF)
|
||||||
|
dep_option(SDL_LIBTHAI_SHARED "Dynamically load Thai support" ON "SDL_LIBTHAI;SDL_DEPS_SHARED" OFF)
|
||||||
dep_option(SDL_WAYLAND "Use Wayland video driver" ${UNIX_SYS} "SDL_VIDEO" OFF)
|
dep_option(SDL_WAYLAND "Use Wayland video driver" ${UNIX_SYS} "SDL_VIDEO" OFF)
|
||||||
dep_option(SDL_WAYLAND_SHARED "Dynamically load Wayland support" ON "SDL_WAYLAND;SDL_DEPS_SHARED" OFF)
|
dep_option(SDL_WAYLAND_SHARED "Dynamically load Wayland support" ON "SDL_WAYLAND;SDL_DEPS_SHARED" OFF)
|
||||||
dep_option(SDL_WAYLAND_LIBDECOR "Use client-side window decorations on Wayland" ON "SDL_WAYLAND" OFF)
|
dep_option(SDL_WAYLAND_LIBDECOR "Use client-side window decorations on Wayland" ON "SDL_WAYLAND" OFF)
|
||||||
@@ -365,7 +368,7 @@ dep_option(SDL_RENDER_D3D12 "Enable the Direct3D 12 render driver" ON "SD
|
|||||||
dep_option(SDL_RENDER_METAL "Enable the Metal render driver" ON "SDL_RENDER;APPLE" OFF)
|
dep_option(SDL_RENDER_METAL "Enable the Metal render driver" ON "SDL_RENDER;APPLE" OFF)
|
||||||
dep_option(SDL_RENDER_GPU "Enable the SDL_GPU render driver" ON "SDL_RENDER;SDL_GPU" OFF)
|
dep_option(SDL_RENDER_GPU "Enable the SDL_GPU render driver" ON "SDL_RENDER;SDL_GPU" OFF)
|
||||||
dep_option(SDL_VIVANTE "Use Vivante EGL video driver" ON "${UNIX_SYS};SDL_CPU_ARM32" OFF)
|
dep_option(SDL_VIVANTE "Use Vivante EGL video driver" ON "${UNIX_SYS};SDL_CPU_ARM32" OFF)
|
||||||
dep_option(SDL_VULKAN "Enable Vulkan support" ON "SDL_VIDEO;ANDROID OR APPLE OR LINUX OR FREEBSD OR WINDOWS" OFF)
|
dep_option(SDL_VULKAN "Enable Vulkan support" ON "SDL_VIDEO;ANDROID OR APPLE OR LINUX OR FREEBSD OR OPENBSD OR WINDOWS" OFF)
|
||||||
dep_option(SDL_RENDER_VULKAN "Enable the Vulkan render driver" ON "SDL_RENDER;SDL_VULKAN" OFF)
|
dep_option(SDL_RENDER_VULKAN "Enable the Vulkan render driver" ON "SDL_RENDER;SDL_VULKAN" OFF)
|
||||||
dep_option(SDL_METAL "Enable Metal support" ON "APPLE" OFF)
|
dep_option(SDL_METAL "Enable Metal support" ON "APPLE" OFF)
|
||||||
set_option(SDL_OPENVR "Use OpenVR video driver" OFF)
|
set_option(SDL_OPENVR "Use OpenVR video driver" OFF)
|
||||||
@@ -376,7 +379,7 @@ dep_option(SDL_DUMMYCAMERA "Support the dummy camera driver" ON SDL_CAME
|
|||||||
option_string(SDL_BACKGROUNDING_SIGNAL "number to use for magic backgrounding signal or 'OFF'" OFF)
|
option_string(SDL_BACKGROUNDING_SIGNAL "number to use for magic backgrounding signal or 'OFF'" OFF)
|
||||||
option_string(SDL_FOREGROUNDING_SIGNAL "number to use for magic foregrounding signal or 'OFF'" OFF)
|
option_string(SDL_FOREGROUNDING_SIGNAL "number to use for magic foregrounding signal or 'OFF'" OFF)
|
||||||
dep_option(SDL_HIDAPI "Enable the HIDAPI subsystem" ON "NOT VISIONOS" OFF)
|
dep_option(SDL_HIDAPI "Enable the HIDAPI subsystem" ON "NOT VISIONOS" OFF)
|
||||||
dep_option(SDL_HIDAPI_LIBUSB "Use libusb for low level joystick drivers" ON SDL_HIDAPI_LIBUSB_AVAILABLE OFF)
|
dep_option(SDL_HIDAPI_LIBUSB "Use libusb for low level joystick drivers" ON "SDL_HIDAPI;SDL_HIDAPI_LIBUSB_AVAILABLE" OFF)
|
||||||
dep_option(SDL_HIDAPI_LIBUSB_SHARED "Dynamically load libusb support" ON "SDL_HIDAPI_LIBUSB;SDL_DEPS_SHARED" OFF)
|
dep_option(SDL_HIDAPI_LIBUSB_SHARED "Dynamically load libusb support" ON "SDL_HIDAPI_LIBUSB;SDL_DEPS_SHARED" OFF)
|
||||||
dep_option(SDL_HIDAPI_JOYSTICK "Use HIDAPI for low level joystick drivers" ON SDL_HIDAPI OFF)
|
dep_option(SDL_HIDAPI_JOYSTICK "Use HIDAPI for low level joystick drivers" ON SDL_HIDAPI OFF)
|
||||||
dep_option(SDL_VIRTUAL_JOYSTICK "Enable the virtual-joystick driver" ON SDL_HIDAPI OFF)
|
dep_option(SDL_VIRTUAL_JOYSTICK "Enable the virtual-joystick driver" ON SDL_HIDAPI OFF)
|
||||||
@@ -385,13 +388,17 @@ set_option(SDL_ASAN "Use AddressSanitizer to detect memory errors
|
|||||||
set_option(SDL_CCACHE "Use Ccache to speed up build" OFF)
|
set_option(SDL_CCACHE "Use Ccache to speed up build" OFF)
|
||||||
set_option(SDL_CLANG_TIDY "Run clang-tidy static analysis" OFF)
|
set_option(SDL_CLANG_TIDY "Run clang-tidy static analysis" OFF)
|
||||||
|
|
||||||
|
if(EMSCRIPTEN)
|
||||||
|
option_string(SDL_EMSCRIPTEN_PERSISTENT_PATH "Path to mount Emscripten IDBFS at startup or '' to disable" "")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(SDL_VENDOR_INFO "" CACHE STRING "Vendor name and/or version to add to SDL_REVISION")
|
set(SDL_VENDOR_INFO "" CACHE STRING "Vendor name and/or version to add to SDL_REVISION")
|
||||||
|
|
||||||
cmake_dependent_option(SDL_SHARED "Build a shared version of the library" ${SDL_SHARED_DEFAULT} ${SDL_SHARED_AVAILABLE} OFF)
|
cmake_dependent_option(SDL_SHARED "Build a shared version of the library" ${SDL_SHARED_DEFAULT} ${SDL_SHARED_AVAILABLE} OFF)
|
||||||
cmake_dependent_option(SDL_STATIC "Build a static version of the library" ${SDL_STATIC_DEFAULT} ${SDL_STATIC_AVAILABLE} OFF)
|
cmake_dependent_option(SDL_STATIC "Build a static version of the library" ${SDL_STATIC_DEFAULT} ${SDL_STATIC_AVAILABLE} OFF)
|
||||||
option(SDL_TEST_LIBRARY "Build the SDL3_test library" ON)
|
option(SDL_TEST_LIBRARY "Build the SDL3_test library" ON)
|
||||||
|
|
||||||
dep_option(SDL_TESTS "Build the test directory" OFF SDL_TEST_LIBRARY OFF)
|
dep_option(SDL_TESTS "Build the test directory" ${SDL3_MAINPROJECT} SDL_TEST_LIBRARY OFF)
|
||||||
dep_option(SDL_INSTALL_TESTS "Install test-cases" OFF "SDL_INSTALL;NOT SDL_FRAMEWORK" OFF)
|
dep_option(SDL_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}")
|
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")
|
set(SDL_TESTS_TIMEOUT_MULTIPLIER "1" CACHE STRING "Timeout multiplier to account for really slow machines")
|
||||||
@@ -463,7 +470,10 @@ if(SDL_SHARED)
|
|||||||
if ("c_std_99" IN_LIST CMAKE_C_COMPILE_FEATURES)
|
if ("c_std_99" IN_LIST CMAKE_C_COMPILE_FEATURES)
|
||||||
target_compile_features(SDL3-shared PRIVATE c_std_99)
|
target_compile_features(SDL3-shared PRIVATE c_std_99)
|
||||||
else()
|
else()
|
||||||
message(WARNING "target_compile_features does not know c_std_99 for C compiler")
|
# tcc does support the subset of C99 used by SDL
|
||||||
|
if (NOT USE_TCC)
|
||||||
|
message(WARNING "target_compile_features does not know c_std_99 for C compiler")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -476,7 +486,9 @@ if(SDL_STATIC)
|
|||||||
if ("c_std_99" IN_LIST CMAKE_C_COMPILE_FEATURES)
|
if ("c_std_99" IN_LIST CMAKE_C_COMPILE_FEATURES)
|
||||||
target_compile_features(SDL3-static PRIVATE c_std_99)
|
target_compile_features(SDL3-static PRIVATE c_std_99)
|
||||||
else()
|
else()
|
||||||
message(WARNING "target_compile_features does not know c_std_99 for C compiler")
|
if (NOT USE_TCC)
|
||||||
|
message(WARNING "target_compile_features does not know c_std_99 for C compiler")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -510,7 +522,10 @@ check_linker_supports_version_file(HAVE_WL_VERSION_SCRIPT)
|
|||||||
if(HAVE_WL_VERSION_SCRIPT)
|
if(HAVE_WL_VERSION_SCRIPT)
|
||||||
sdl_shared_link_options("-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/dynapi/SDL_dynapi.sym")
|
sdl_shared_link_options("-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/dynapi/SDL_dynapi.sym")
|
||||||
else()
|
else()
|
||||||
if((LINUX AND LIBC_IS_GLIBC) OR ANDROID)
|
# When building with tcc on Linux+glibc or Android, avoid emitting an error
|
||||||
|
# for lack of support of the version-script linker flag: the option will be
|
||||||
|
# silently ignored by the compiler and the build will still succeed.
|
||||||
|
if(((LINUX AND LIBC_IS_GLIBC) OR ANDROID) AND (NOT USE_TCC))
|
||||||
message(FATAL_ERROR "Linker does not support '-Wl,--version-script=xxx.sym'. This is required on the current host platform (${SDL_CMAKE_PLATFORM}).")
|
message(FATAL_ERROR "Linker does not support '-Wl,--version-script=xxx.sym'. This is required on the current host platform (${SDL_CMAKE_PLATFORM}).")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -648,12 +663,7 @@ if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(NOT OPENBSD)
|
||||||
check_linker_flag(C "-Wl,-undefined,error" LINKER_SUPPORTS_WL_UNDEFINED_ERROR)
|
|
||||||
if(LINKER_SUPPORTS_WL_UNDEFINED_ERROR)
|
|
||||||
sdl_shared_link_options("-Wl,-undefined,error")
|
|
||||||
endif()
|
|
||||||
elseif(NOT OPENBSD)
|
|
||||||
cmake_push_check_state()
|
cmake_push_check_state()
|
||||||
check_linker_flag(C "-Wl,--no-undefined" LINKER_SUPPORTS_WL_NO_UNDEFINED)
|
check_linker_flag(C "-Wl,--no-undefined" LINKER_SUPPORTS_WL_NO_UNDEFINED)
|
||||||
#FIXME: originally this if had an additional "AND NOT (USE_CLANG AND WINDOWS)"
|
#FIXME: originally this if had an additional "AND NOT (USE_CLANG AND WINDOWS)"
|
||||||
@@ -914,6 +924,7 @@ if(SDL_ASSEMBLY)
|
|||||||
set(HAVE_ALTIVEC TRUE)
|
set(HAVE_ALTIVEC TRUE)
|
||||||
set(SDL_ALTIVEC_BLITTERS 1)
|
set(SDL_ALTIVEC_BLITTERS 1)
|
||||||
sdl_compile_options(PRIVATE "-maltivec")
|
sdl_compile_options(PRIVATE "-maltivec")
|
||||||
|
sdl_compile_options(PRIVATE "-fno-tree-vectorize")
|
||||||
set_property(SOURCE "${SDL3_SOURCE_DIR}/src/video/SDL_blit_N.c" APPEND PROPERTY COMPILE_DEFINITIONS "SDL_ENABLE_ALTIVEC")
|
set_property(SOURCE "${SDL3_SOURCE_DIR}/src/video/SDL_blit_N.c" APPEND PROPERTY COMPILE_DEFINITIONS "SDL_ENABLE_ALTIVEC")
|
||||||
set_property(SOURCE "${SDL3_SOURCE_DIR}/src/video/SDL_blit_N.c" PROPERTY SKIP_PRECOMPILE_HEADERS 1)
|
set_property(SOURCE "${SDL3_SOURCE_DIR}/src/video/SDL_blit_N.c" PROPERTY SKIP_PRECOMPILE_HEADERS 1)
|
||||||
endif()
|
endif()
|
||||||
@@ -931,7 +942,17 @@ if(SDL_ASSEMBLY)
|
|||||||
cmake_pop_check_state()
|
cmake_pop_check_state()
|
||||||
|
|
||||||
if(COMPILER_SUPPORTS_LSX AND HAVE_LSXINTRIN_H)
|
if(COMPILER_SUPPORTS_LSX AND HAVE_LSXINTRIN_H)
|
||||||
set_property(SOURCE "${SDL3_SOURCE_DIR}/src/video/yuv2rgb/yuv_rgb_lsx.c" APPEND PROPERTY COMPILE_OPTIONS "-mlsx")
|
set_property(SOURCE
|
||||||
|
"${SDL3_SOURCE_DIR}/src/video/yuv2rgb/yuv_rgb_lsx.c"
|
||||||
|
"${SDL3_SOURCE_DIR}/src/video/SDL_blit_A.c"
|
||||||
|
"${SDL3_SOURCE_DIR}/src/video/SDL_fillrect.c"
|
||||||
|
APPEND PROPERTY COMPILE_OPTIONS "-mlsx")
|
||||||
|
|
||||||
|
set_property(SOURCE
|
||||||
|
"${SDL3_SOURCE_DIR}/src/video/yuv2rgb/yuv_rgb_lsx.c"
|
||||||
|
"${SDL3_SOURCE_DIR}/src/video/SDL_blit_A.c"
|
||||||
|
"${SDL3_SOURCE_DIR}/src/video/SDL_fillrect.c"
|
||||||
|
PROPERTY SKIP_PRECOMPILE_HEADERS 1)
|
||||||
set(HAVE_LSX TRUE)
|
set(HAVE_LSX TRUE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -1140,6 +1161,8 @@ if(SDL_LIBC)
|
|||||||
check_symbol_exists(fdatasync "unistd.h" HAVE_FDATASYNC)
|
check_symbol_exists(fdatasync "unistd.h" HAVE_FDATASYNC)
|
||||||
check_symbol_exists(gethostname "unistd.h" HAVE_GETHOSTNAME)
|
check_symbol_exists(gethostname "unistd.h" HAVE_GETHOSTNAME)
|
||||||
check_symbol_exists(getpagesize "unistd.h" HAVE_GETPAGESIZE)
|
check_symbol_exists(getpagesize "unistd.h" HAVE_GETPAGESIZE)
|
||||||
|
check_symbol_exists(getresgid "unistd.h" HAVE_GETRESGID)
|
||||||
|
check_symbol_exists(getresuid "unistd.h" HAVE_GETRESUID)
|
||||||
check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
|
check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
|
||||||
check_symbol_exists(sigtimedwait "signal.h" HAVE_SIGTIMEDWAIT)
|
check_symbol_exists(sigtimedwait "signal.h" HAVE_SIGTIMEDWAIT)
|
||||||
check_symbol_exists(setjmp "setjmp.h" HAVE_SETJMP)
|
check_symbol_exists(setjmp "setjmp.h" HAVE_SETJMP)
|
||||||
@@ -1156,34 +1179,33 @@ if(SDL_LIBC)
|
|||||||
check_symbol_exists(posix_fallocate "fcntl.h" HAVE_POSIX_FALLOCATE)
|
check_symbol_exists(posix_fallocate "fcntl.h" HAVE_POSIX_FALLOCATE)
|
||||||
check_symbol_exists(posix_spawn_file_actions_addchdir "spawn.h" HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR)
|
check_symbol_exists(posix_spawn_file_actions_addchdir "spawn.h" HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR)
|
||||||
check_symbol_exists(posix_spawn_file_actions_addchdir_np "spawn.h" HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP)
|
check_symbol_exists(posix_spawn_file_actions_addchdir_np "spawn.h" HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP)
|
||||||
|
endif()
|
||||||
|
if(SDL_SYSTEM_ICONV)
|
||||||
|
check_c_source_compiles("
|
||||||
|
#define LIBICONV_PLUG 1 /* in case libiconv header is in include path */
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <iconv.h>
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
return !iconv_open(NULL,NULL);
|
||||||
|
}" ICONV_IN_LIBC)
|
||||||
|
|
||||||
if(SDL_SYSTEM_ICONV)
|
cmake_push_check_state()
|
||||||
check_c_source_compiles("
|
list(APPEND CMAKE_REQUIRED_LIBRARIES iconv)
|
||||||
#define LIBICONV_PLUG 1 /* in case libiconv header is in include path */
|
check_c_source_compiles("
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
return !iconv_open(NULL,NULL);
|
return !iconv_open(NULL,NULL);
|
||||||
}" ICONV_IN_LIBC)
|
}" ICONV_IN_LIBICONV)
|
||||||
|
cmake_pop_check_state()
|
||||||
|
|
||||||
cmake_push_check_state()
|
if(ICONV_IN_LIBC OR ICONV_IN_LIBICONV)
|
||||||
list(APPEND CMAKE_REQUIRED_LIBRARIES iconv)
|
set(HAVE_ICONV 1)
|
||||||
check_c_source_compiles("
|
set(HAVE_SYSTEM_ICONV TRUE)
|
||||||
#include <stddef.h>
|
if(ICONV_IN_LIBICONV AND (SDL_LIBICONV OR (NOT ICONV_IN_LIBC)))
|
||||||
#include <iconv.h>
|
sdl_link_dependency(iconv LIBS iconv)
|
||||||
int main(int argc, char **argv) {
|
set(SDL_USE_LIBICONV 1)
|
||||||
return !iconv_open(NULL,NULL);
|
set(HAVE_LIBICONV TRUE)
|
||||||
}" ICONV_IN_LIBICONV)
|
|
||||||
cmake_pop_check_state()
|
|
||||||
|
|
||||||
if(ICONV_IN_LIBC OR ICONV_IN_LIBICONV)
|
|
||||||
set(HAVE_ICONV 1)
|
|
||||||
set(HAVE_SYSTEM_ICONV TRUE)
|
|
||||||
if(ICONV_IN_LIBICONV AND (SDL_LIBICONV OR (NOT ICONV_IN_LIBC)))
|
|
||||||
sdl_link_dependency(iconv LIBS iconv)
|
|
||||||
set(SDL_USE_LIBICONV 1)
|
|
||||||
set(HAVE_LIBICONV TRUE)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -1271,22 +1293,25 @@ sdl_glob_sources(
|
|||||||
"${SDL3_SOURCE_DIR}/src/video/yuv2rgb/*.h"
|
"${SDL3_SOURCE_DIR}/src/video/yuv2rgb/*.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Build uclibc as a static library such that non-used symbols don't end up in the SDL3 shared library.
|
|
||||||
file(GLOB SDL_UCLIBC_SOURCES "${SDL3_SOURCE_DIR}/src/libm/*.c")
|
file(GLOB SDL_UCLIBC_SOURCES "${SDL3_SOURCE_DIR}/src/libm/*.c")
|
||||||
add_library(SDL_uclibc STATIC "${SDL_UCLIBC_SOURCES}")
|
|
||||||
target_compile_definitions(SDL_uclibc PRIVATE USING_GENERATED_CONFIG_H)
|
|
||||||
target_include_directories(SDL_uclibc PRIVATE "${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>/build_config")
|
|
||||||
target_include_directories(SDL_uclibc PRIVATE "${SDL3_SOURCE_DIR}/src")
|
|
||||||
target_include_directories(SDL_uclibc PRIVATE "${SDL3_SOURCE_DIR}/include")
|
|
||||||
SDL_AddCommonCompilerFlags(SDL_uclibc)
|
|
||||||
target_compile_definitions(SDL_uclibc PRIVATE "$<$<CONFIG:Debug>:DEBUG>")
|
|
||||||
sdl_sources(STATIC "$<TARGET_OBJECTS:SDL_uclibc>")
|
|
||||||
set_property(TARGET SDL_uclibc PROPERTY UNITY_BUILD OFF)
|
|
||||||
if(TARGET SDL3-shared)
|
if(TARGET SDL3-shared)
|
||||||
|
# Build uclibc as a static library such that non-used symbols don't end up in the SDL3 shared library.
|
||||||
|
add_library(SDL_uclibc STATIC ${SDL_UCLIBC_SOURCES})
|
||||||
|
set_property(TARGET SDL_uclibc PROPERTY POSITION_INDEPENDENT_CODE TRUE)
|
||||||
|
target_compile_definitions(SDL_uclibc PRIVATE USING_GENERATED_CONFIG_H)
|
||||||
|
target_include_directories(SDL_uclibc PRIVATE "${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>/build_config")
|
||||||
|
target_include_directories(SDL_uclibc PRIVATE "${SDL3_SOURCE_DIR}/src")
|
||||||
|
target_include_directories(SDL_uclibc PRIVATE "${SDL3_SOURCE_DIR}/include")
|
||||||
|
SDL_AddCommonCompilerFlags(SDL_uclibc)
|
||||||
|
target_compile_definitions(SDL_uclibc PRIVATE "$<$<CONFIG:Debug>:DEBUG>")
|
||||||
|
set_property(TARGET SDL_uclibc PROPERTY UNITY_BUILD OFF)
|
||||||
target_link_libraries(SDL3-shared PRIVATE SDL_uclibc)
|
target_link_libraries(SDL3-shared PRIVATE SDL_uclibc)
|
||||||
|
if(HAVE_GCC_FVISIBILITY)
|
||||||
|
set_property(TARGET SDL_uclibc PROPERTY C_VISIBILITY_PRESET "hidden")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(HAVE_GCC_FVISIBILITY)
|
if(TARGET SDL3-static)
|
||||||
set_property(TARGET SDL_uclibc PROPERTY C_VISIBILITY_PRESET "hidden")
|
target_sources(SDL3-static PRIVATE ${SDL_UCLIBC_SOURCES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Enable/disable various subsystems of the SDL library
|
# Enable/disable various subsystems of the SDL library
|
||||||
@@ -1396,8 +1421,6 @@ if(ANDROID)
|
|||||||
"${SDL3_SOURCE_DIR}/src/core/android/*.c"
|
"${SDL3_SOURCE_DIR}/src/core/android/*.c"
|
||||||
"${SDL3_SOURCE_DIR}/src/core/android/*.h"
|
"${SDL3_SOURCE_DIR}/src/core/android/*.h"
|
||||||
)
|
)
|
||||||
sdl_sources("${CMAKE_ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c")
|
|
||||||
set_property(SOURCE "${CMAKE_ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-declaration-after-statement")
|
|
||||||
|
|
||||||
sdl_glob_sources(
|
sdl_glob_sources(
|
||||||
"${SDL3_SOURCE_DIR}/src/misc/android/*.c"
|
"${SDL3_SOURCE_DIR}/src/misc/android/*.c"
|
||||||
@@ -1632,6 +1655,11 @@ elseif(EMSCRIPTEN)
|
|||||||
# project. Uncomment at will for verbose cross-compiling -I/../ path info.
|
# project. Uncomment at will for verbose cross-compiling -I/../ path info.
|
||||||
sdl_compile_options(PRIVATE "-Wno-warn-absolute-paths")
|
sdl_compile_options(PRIVATE "-Wno-warn-absolute-paths")
|
||||||
|
|
||||||
|
if(NOT SDL_EMSCRIPTEN_PERSISTENT_PATH STREQUAL "")
|
||||||
|
set(SDL_EMSCRIPTEN_PERSISTENT_PATH_STRING "${SDL_EMSCRIPTEN_PERSISTENT_PATH}")
|
||||||
|
sdl_link_dependency(idbfs LIBS idbfs.js)
|
||||||
|
endif()
|
||||||
|
|
||||||
sdl_glob_sources(
|
sdl_glob_sources(
|
||||||
"${SDL3_SOURCE_DIR}/src/main/emscripten/*.c"
|
"${SDL3_SOURCE_DIR}/src/main/emscripten/*.c"
|
||||||
"${SDL3_SOURCE_DIR}/src/main/emscripten/*.h"
|
"${SDL3_SOURCE_DIR}/src/main/emscripten/*.h"
|
||||||
@@ -1715,6 +1743,15 @@ elseif(EMSCRIPTEN)
|
|||||||
set(HAVE_CLOCK_GETTIME 1)
|
set(HAVE_CLOCK_GETTIME 1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(SDL_SENSOR)
|
||||||
|
set(SDL_SENSOR_EMSCRIPTEN 1)
|
||||||
|
set(HAVE_SDL_SENSORS TRUE)
|
||||||
|
sdl_glob_sources(
|
||||||
|
"${SDL3_SOURCE_DIR}/src/sensor/emscripten/*.c"
|
||||||
|
"${SDL3_SOURCE_DIR}/src/sensor/emscripten/*.h"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(SDL_VIDEO)
|
if(SDL_VIDEO)
|
||||||
set(SDL_VIDEO_DRIVER_EMSCRIPTEN 1)
|
set(SDL_VIDEO_DRIVER_EMSCRIPTEN 1)
|
||||||
sdl_glob_sources(
|
sdl_glob_sources(
|
||||||
@@ -1736,6 +1773,7 @@ elseif(EMSCRIPTEN)
|
|||||||
|
|
||||||
elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||||
|
|
||||||
|
set(SDL_DISABLE_DLOPEN_NOTES TRUE)
|
||||||
if(SDL_DLOPEN_NOTES)
|
if(SDL_DLOPEN_NOTES)
|
||||||
set(CHECK_ELF_DLNOTES_SRC [==[
|
set(CHECK_ELF_DLNOTES_SRC [==[
|
||||||
#ifndef __ELF__
|
#ifndef __ELF__
|
||||||
@@ -1748,10 +1786,10 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
|||||||
return argc + dlnote.hdr.a;
|
return argc + dlnote.hdr.a;
|
||||||
}
|
}
|
||||||
]==])
|
]==])
|
||||||
set(SDL_DISABLE_DLOPEN_NOTES FALSE)
|
|
||||||
check_c_source_compiles("${CHECK_ELF_DLNOTES_SRC}" COMPILER_SUPPORTS_ELFNOTES)
|
check_c_source_compiles("${CHECK_ELF_DLNOTES_SRC}" COMPILER_SUPPORTS_ELFNOTES)
|
||||||
if(NOT COMPILER_SUPPORTS_ELFNOTES)
|
if(COMPILER_SUPPORTS_ELFNOTES)
|
||||||
set(SDL_DISABLE_DLOPEN_NOTES TRUE)
|
set(SDL_DISABLE_DLOPEN_NOTES FALSE)
|
||||||
|
set(HAVE_DLOPEN_NOTES TRUE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -1787,6 +1825,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
|||||||
CheckROCKCHIP()
|
CheckROCKCHIP()
|
||||||
CheckX11()
|
CheckX11()
|
||||||
CheckFribidi()
|
CheckFribidi()
|
||||||
|
CheckLibThai()
|
||||||
# Need to check for EGL first because KMSDRM and Wayland depend on it.
|
# Need to check for EGL first because KMSDRM and Wayland depend on it.
|
||||||
CheckEGL()
|
CheckEGL()
|
||||||
CheckKMSDRM()
|
CheckKMSDRM()
|
||||||
@@ -2679,13 +2718,6 @@ elseif(APPLE)
|
|||||||
set(SDL_VIDEO_RENDER_METAL 1)
|
set(SDL_VIDEO_RENDER_METAL 1)
|
||||||
set(HAVE_RENDER_METAL TRUE)
|
set(HAVE_RENDER_METAL TRUE)
|
||||||
endif()
|
endif()
|
||||||
if (SDL_GPU)
|
|
||||||
set(SDL_GPU_METAL 1)
|
|
||||||
sdl_glob_sources(
|
|
||||||
"${SDL3_SOURCE_DIR}/src/gpu/metal/*.m"
|
|
||||||
"${SDL3_SOURCE_DIR}/src/gpu/metal/*.h"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -3202,6 +3234,7 @@ elseif(PS2)
|
|||||||
gskit
|
gskit
|
||||||
dmakit
|
dmakit
|
||||||
ps2_drivers
|
ps2_drivers
|
||||||
|
atomic
|
||||||
)
|
)
|
||||||
elseif(N3DS)
|
elseif(N3DS)
|
||||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/main/n3ds/*.c")
|
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/main/n3ds/*.c")
|
||||||
@@ -3452,7 +3485,10 @@ int main(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
" HAVE_POSIX_SPAWN)
|
" HAVE_POSIX_SPAWN)
|
||||||
if(HAVE_POSIX_SPAWN)
|
if(NOT APPLE)
|
||||||
|
check_symbol_exists(vfork "unistd.h" LIBC_HAS_VFORK)
|
||||||
|
endif()
|
||||||
|
if(HAVE_POSIX_SPAWN AND (APPLE OR LIBC_HAS_VFORK))
|
||||||
sdl_glob_sources(
|
sdl_glob_sources(
|
||||||
"${SDL3_SOURCE_DIR}/src/process/posix/*.c"
|
"${SDL3_SOURCE_DIR}/src/process/posix/*.c"
|
||||||
"${SDL3_SOURCE_DIR}/src/process/posix/*.h"
|
"${SDL3_SOURCE_DIR}/src/process/posix/*.h"
|
||||||
@@ -3495,6 +3531,14 @@ if(SDL_GPU)
|
|||||||
set(SDL_GPU_VULKAN 1)
|
set(SDL_GPU_VULKAN 1)
|
||||||
set(HAVE_SDL_GPU TRUE)
|
set(HAVE_SDL_GPU TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
if(SDL_VIDEO_METAL)
|
||||||
|
sdl_glob_sources(
|
||||||
|
"${SDL3_SOURCE_DIR}/src/gpu/metal/*.m"
|
||||||
|
"${SDL3_SOURCE_DIR}/src/gpu/metal/*.h"
|
||||||
|
)
|
||||||
|
set(SDL_GPU_METAL 1)
|
||||||
|
set(HAVE_SDL_GPU TRUE)
|
||||||
|
endif()
|
||||||
if(SDL_RENDER_GPU AND HAVE_SDL_GPU)
|
if(SDL_RENDER_GPU AND HAVE_SDL_GPU)
|
||||||
set(SDL_VIDEO_RENDER_GPU 1)
|
set(SDL_VIDEO_RENDER_GPU 1)
|
||||||
set(HAVE_RENDER_GPU TRUE)
|
set(HAVE_RENDER_GPU TRUE)
|
||||||
@@ -3796,10 +3840,6 @@ else()
|
|||||||
set(ARCH_64 FALSE)
|
set(ARCH_64 FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ANDROID)
|
|
||||||
sdl_include_directories(PRIVATE SYSTEM "${CMAKE_ANDROID_NDK}/sources/android/cpufeatures")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
cmake_push_check_state(RESET)
|
cmake_push_check_state(RESET)
|
||||||
check_c_compiler_flag(-fobjc-arc COMPILER_SUPPORTS_FOBJC_ARC)
|
check_c_compiler_flag(-fobjc-arc COMPILER_SUPPORTS_FOBJC_ARC)
|
||||||
@@ -3952,6 +3992,7 @@ if(SDL_SHARED)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(SDL3-shared PRIVATE ${SDL_CMAKE_DEPENDS})
|
target_link_libraries(SDL3-shared PRIVATE ${SDL_CMAKE_DEPENDS})
|
||||||
target_include_directories(SDL3-shared
|
target_include_directories(SDL3-shared
|
||||||
PRIVATE
|
PRIVATE
|
||||||
@@ -3969,6 +4010,8 @@ if(SDL_SHARED)
|
|||||||
set_property(TARGET SDL3-shared PROPERTY INTERFACE_SDL3_SHARED TRUE)
|
set_property(TARGET SDL3-shared PROPERTY INTERFACE_SDL3_SHARED TRUE)
|
||||||
set_property(TARGET SDL3-shared APPEND PROPERTY COMPATIBLE_INTERFACE_STRING "SDL_VERSION")
|
set_property(TARGET SDL3-shared APPEND PROPERTY COMPATIBLE_INTERFACE_STRING "SDL_VERSION")
|
||||||
set_property(TARGET SDL3-shared PROPERTY INTERFACE_SDL_VERSION "SDL${SDL3_VERSION_MAJOR}")
|
set_property(TARGET SDL3-shared PROPERTY INTERFACE_SDL_VERSION "SDL${SDL3_VERSION_MAJOR}")
|
||||||
|
set_property(TARGET SDL3-shared APPEND PROPERTY EXPORT_PROPERTIES "SDL_FULL_VERSION")
|
||||||
|
set_property(TARGET SDL3-shared PROPERTY SDL_FULL_VERSION "${PROJECT_VERSION}")
|
||||||
if(NOT CMAKE_VERSION VERSION_LESS "3.16")
|
if(NOT CMAKE_VERSION VERSION_LESS "3.16")
|
||||||
target_precompile_headers(SDL3-shared PRIVATE "$<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:${PROJECT_SOURCE_DIR}/src/SDL_internal.h>")
|
target_precompile_headers(SDL3-shared PRIVATE "$<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:${PROJECT_SOURCE_DIR}/src/SDL_internal.h>")
|
||||||
endif()
|
endif()
|
||||||
@@ -3993,6 +4036,8 @@ if(SDL_STATIC)
|
|||||||
set_property(TARGET SDL3-static PROPERTY INTERFACE_SDL3_SHARED FALSE)
|
set_property(TARGET SDL3-static PROPERTY INTERFACE_SDL3_SHARED FALSE)
|
||||||
set_property(TARGET SDL3-static APPEND PROPERTY COMPATIBLE_INTERFACE_STRING "SDL_VERSION")
|
set_property(TARGET SDL3-static APPEND PROPERTY COMPATIBLE_INTERFACE_STRING "SDL_VERSION")
|
||||||
set_property(TARGET SDL3-static PROPERTY INTERFACE_SDL_VERSION "SDL${SDL3_VERSION_MAJOR}")
|
set_property(TARGET SDL3-static PROPERTY INTERFACE_SDL_VERSION "SDL${SDL3_VERSION_MAJOR}")
|
||||||
|
set_property(TARGET SDL3-static APPEND PROPERTY EXPORT_PROPERTIES "SDL_FULL_VERSION")
|
||||||
|
set_property(TARGET SDL3-static PROPERTY SDL_FULL_VERSION "${PROJECT_VERSION}")
|
||||||
if(NOT CMAKE_VERSION VERSION_LESS "3.16")
|
if(NOT CMAKE_VERSION VERSION_LESS "3.16")
|
||||||
target_precompile_headers(SDL3-static PRIVATE "$<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:${PROJECT_SOURCE_DIR}/src/SDL_internal.h>")
|
target_precompile_headers(SDL3-static PRIVATE "$<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:${PROJECT_SOURCE_DIR}/src/SDL_internal.h>")
|
||||||
endif()
|
endif()
|
||||||
@@ -4008,7 +4053,7 @@ sdl_compile_definitions(
|
|||||||
##### Tests #####
|
##### Tests #####
|
||||||
|
|
||||||
if(SDL_TEST_LIBRARY)
|
if(SDL_TEST_LIBRARY)
|
||||||
file(GLOB TEST_SOURCES "${SDL3_SOURCE_DIR}/src/test/*.c")
|
file(GLOB TEST_SOURCES "${SDL3_SOURCE_DIR}/src/test/*.c" "${SDL3_SOURCE_DIR}/src/test/*.h")
|
||||||
target_sources(SDL3_test PRIVATE ${TEST_SOURCES})
|
target_sources(SDL3_test PRIVATE ${TEST_SOURCES})
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set_target_properties(SDL3_test PROPERTIES
|
set_target_properties(SDL3_test PROPERTIES
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
@@ -469,6 +469,7 @@
|
|||||||
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||||
|
<ClInclude Include="..\..\src\joystick\hidapi\SDL_report_descriptor.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_c.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_gamepad_c.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||||
@@ -735,6 +736,7 @@
|
|||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam_hori.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam_hori.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c" />
|
||||||
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam_triton.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch2.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch2.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
|
||||||
@@ -743,6 +745,7 @@
|
|||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_zuiki.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_zuiki.c" />
|
||||||
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_report_descriptor.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||||
|
|||||||
@@ -79,6 +79,7 @@
|
|||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam_hori.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam_hori.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c" />
|
||||||
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam_triton.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch2.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch2.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
|
||||||
@@ -87,6 +88,7 @@
|
|||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_zuiki.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_zuiki.c" />
|
||||||
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_report_descriptor.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||||
@@ -371,6 +373,7 @@
|
|||||||
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||||
|
<ClInclude Include="..\..\src\joystick\hidapi\SDL_report_descriptor.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_c.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_gamepad_c.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||||
|
|||||||
@@ -195,6 +195,9 @@
|
|||||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\src\test\SDL_test_internal.h" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\..\src\test\SDL_test_assert.c" />
|
<ClCompile Include="..\..\src\test\SDL_test_assert.c" />
|
||||||
<ClCompile Include="..\..\src\test\SDL_test_common.c" />
|
<ClCompile Include="..\..\src\test\SDL_test_common.c" />
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -291,9 +291,8 @@ static void DrawSprites(SDL_Renderer * renderer, SDL_Texture * sprite)
|
|||||||
SDL_RenderPresent(renderer);
|
SDL_RenderPresent(renderer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void loop()
|
static void update()
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
|
|
||||||
/* Check for events */
|
/* Check for events */
|
||||||
@@ -310,20 +309,39 @@ static void loop()
|
|||||||
SDLTest_CommonEvent(state, &event, &done);
|
SDLTest_CommonEvent(state, &event, &done);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
fillerup();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void draw()
|
||||||
|
{
|
||||||
|
int i;
|
||||||
for (i = 0; i < state->num_windows; ++i) {
|
for (i = 0; i < state->num_windows; ++i) {
|
||||||
if (state->windows[i] == NULL) {
|
if (state->windows[i] == NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
DrawSprites(state->renderers[i], sprites[i]);
|
DrawSprites(state->renderers[i], sprites[i]);
|
||||||
}
|
}
|
||||||
fillerup();
|
}
|
||||||
|
|
||||||
|
static bool SDLCALL GDKEventWatch(void* userdata, SDL_Event* event)
|
||||||
|
{
|
||||||
|
bool *suppressdraw = (bool *)userdata;
|
||||||
|
SDL_assert(suppressdraw != NULL);
|
||||||
|
if (event->type == SDL_EVENT_DID_ENTER_BACKGROUND) {
|
||||||
|
*suppressdraw = true;
|
||||||
|
SDL_GDKSuspendComplete();
|
||||||
|
} else if (event->type == SDL_EVENT_WILL_ENTER_FOREGROUND) {
|
||||||
|
*suppressdraw = false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
const char *icon = "icon.bmp";
|
const char *icon = "icon.png";
|
||||||
char *soundname = NULL;
|
char *soundname = NULL;
|
||||||
|
bool suppressdraw = false;
|
||||||
|
|
||||||
/* Initialize parameters */
|
/* Initialize parameters */
|
||||||
num_sprites = NUM_SPRITES;
|
num_sprites = NUM_SPRITES;
|
||||||
@@ -390,6 +408,9 @@ int main(int argc, char *argv[])
|
|||||||
quit(2);
|
quit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* By this point the renderers are made, so we can now add this watcher */
|
||||||
|
SDL_AddEventWatch(GDKEventWatch, &suppressdraw);
|
||||||
|
|
||||||
/* Create the windows, initialize the renderers, and load the textures */
|
/* Create the windows, initialize the renderers, and load the textures */
|
||||||
sprites =
|
sprites =
|
||||||
(SDL_Texture **) SDL_malloc(state->num_windows * sizeof(*sprites));
|
(SDL_Texture **) SDL_malloc(state->num_windows * sizeof(*sprites));
|
||||||
@@ -441,7 +462,10 @@ int main(int argc, char *argv[])
|
|||||||
AddUserSilent();
|
AddUserSilent();
|
||||||
|
|
||||||
while (!done) {
|
while (!done) {
|
||||||
loop();
|
update();
|
||||||
|
if (!suppressdraw) {
|
||||||
|
draw();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
quit(0);
|
quit(0);
|
||||||
|
|||||||
@@ -82,16 +82,16 @@
|
|||||||
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;$(LibraryPath)</LibraryPath>
|
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;$(LibraryPath)</LibraryPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<IncludePath>$(ProjectDir)/../../src;$(IncludePath)</IncludePath>
|
<IncludePath>$(ProjectDir)/../../src;$(ProjectDir)/../../src/core/windows;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<IncludePath>$(ProjectDir)/../../src;$(IncludePath)</IncludePath>
|
<IncludePath>$(ProjectDir)/../../src;$(ProjectDir)/../../src/core/windows;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<IncludePath>$(ProjectDir)/../../src;$(IncludePath)</IncludePath>
|
<IncludePath>$(ProjectDir)/../../src;$(ProjectDir)/../../src/core/windows;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<IncludePath>$(ProjectDir)/../../src;$(IncludePath)</IncludePath>
|
<IncludePath>$(ProjectDir)/../../src;$(ProjectDir)/../../src/core/windows;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
@@ -383,6 +383,7 @@
|
|||||||
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||||
|
<ClInclude Include="..\..\src\joystick\hidapi\SDL_report_descriptor.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_c.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_gamepad_c.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||||
@@ -625,6 +626,7 @@
|
|||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_stadia.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_stadia.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam_hori.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam_hori.c" />
|
||||||
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam_triton.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch2.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch2.c" />
|
||||||
@@ -634,6 +636,7 @@
|
|||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_zuiki.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_zuiki.c" />
|
||||||
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_report_descriptor.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||||
|
|||||||
@@ -675,6 +675,9 @@
|
|||||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h">
|
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h">
|
||||||
<Filter>joystick\hidapi</Filter>
|
<Filter>joystick\hidapi</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\src\joystick\hidapi\SDL_report_descriptor.h">
|
||||||
|
<Filter>joystick\hidapi</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h">
|
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h">
|
||||||
<Filter>joystick\windows</Filter>
|
<Filter>joystick\windows</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -1305,6 +1308,9 @@
|
|||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c">
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c">
|
||||||
<Filter>joystick\hidapi</Filter>
|
<Filter>joystick\hidapi</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_report_descriptor.c">
|
||||||
|
<Filter>joystick\hidapi</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c">
|
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c">
|
||||||
<Filter>joystick\windows</Filter>
|
<Filter>joystick\windows</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -1538,8 +1544,6 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\sensor\windows\SDL_windowssensor.c">
|
<ClCompile Include="..\..\src\sensor\windows\SDL_windowssensor.c">
|
||||||
<Filter>sensor\windows</Filter>
|
<Filter>sensor\windows</Filter>
|
||||||
</ClCompile>
|
|
||||||
<Filter>render</Filter>
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\render\SDL_render.c">
|
<ClCompile Include="..\..\src\render\SDL_render.c">
|
||||||
<Filter>render</Filter>
|
<Filter>render</Filter>
|
||||||
@@ -1660,6 +1664,9 @@
|
|||||||
<ClCompile Include="..\..\src\storage\generic\SDL_genericstorage.c" />
|
<ClCompile Include="..\..\src\storage\generic\SDL_genericstorage.c" />
|
||||||
<ClCompile Include="..\..\src\storage\steam\SDL_steamstorage.c" />
|
<ClCompile Include="..\..\src\storage\steam\SDL_steamstorage.c" />
|
||||||
<ClCompile Include="..\..\src\storage\SDL_storage.c" />
|
<ClCompile Include="..\..\src\storage\SDL_storage.c" />
|
||||||
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam_triton.c">
|
||||||
|
<Filter>joystick\hidapi</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\events\SDL_eventwatch.c" />
|
<ClCompile Include="..\..\src\events\SDL_eventwatch.c" />
|
||||||
<ClCompile Include="..\..\src\core\windows\pch_cpp.cpp">
|
<ClCompile Include="..\..\src\core\windows\pch_cpp.cpp">
|
||||||
<Filter>core\windows</Filter>
|
<Filter>core\windows</Filter>
|
||||||
|
|||||||
@@ -161,6 +161,9 @@
|
|||||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\src\test\SDL_test_internal.h" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\..\src\test\SDL_test_assert.c" />
|
<ClCompile Include="..\..\src\test\SDL_test_assert.c" />
|
||||||
<ClCompile Include="..\..\src\test\SDL_test_common.c" />
|
<ClCompile Include="..\..\src\test\SDL_test_common.c" />
|
||||||
|
|||||||
63
WhatsNew.txt
63
WhatsNew.txt
@@ -7,69 +7,128 @@ This is a list of major changes in SDL's version history.
|
|||||||
|
|
||||||
General:
|
General:
|
||||||
* Added SDL_CreateAnimatedCursor() to create animated color cursors
|
* Added SDL_CreateAnimatedCursor() to create animated color cursors
|
||||||
|
* Added SDL_HINT_MOUSE_DPI_SCALE_CURSORS to automatically scale cursors based on the display scale
|
||||||
* Added SDL_SetWindowProgressState(), SDL_SetWindowProgressValue(), SDL_GetWindowProgressState(), and SDL_GetWindowProgressValue() to show progress in the window's taskbar icon on Windows and Linux
|
* Added SDL_SetWindowProgressState(), SDL_SetWindowProgressValue(), SDL_GetWindowProgressState(), and SDL_GetWindowProgressValue() to show progress in the window's taskbar icon on Windows and Linux
|
||||||
* Added SDL_GetGPUDeviceProperties() to get the properties of an SDL GPU device
|
* Added GPU device creation properties to enable the GPU API on older hardware if you're not using these features:
|
||||||
|
- SDL_PROP_GPU_DEVICE_CREATE_FEATURE_CLIP_DISTANCE_BOOLEAN
|
||||||
|
- SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN
|
||||||
|
- SDL_PROP_GPU_DEVICE_CREATE_FEATURE_INDIRECT_DRAW_FIRST_INSTANCE_BOOLEAN
|
||||||
|
- SDL_PROP_GPU_DEVICE_CREATE_FEATURE_ANISOTROPY_BOOLEAN
|
||||||
|
- SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN
|
||||||
|
* Added SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER to enable configuring Vulkan features when creating a GPU device
|
||||||
|
* Added SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN to allow requiring Vulkan hardware acceleration when creating a GPU device
|
||||||
|
* Added SDL_GetGPUDeviceProperties() to query information from a GPU device:
|
||||||
|
- SDL_PROP_GPU_DEVICE_NAME_STRING
|
||||||
|
- SDL_PROP_GPU_DEVICE_DRIVER_NAME_STRING
|
||||||
|
- SDL_PROP_GPU_DEVICE_DRIVER_VERSION_STRING
|
||||||
|
- SDL_PROP_GPU_DEVICE_DRIVER_INFO_STRING
|
||||||
* Added SDL_GetPixelFormatFromGPUTextureFormat() and SDL_GetGPUTextureFormatFromPixelFormat()
|
* Added SDL_GetPixelFormatFromGPUTextureFormat() and SDL_GetGPUTextureFormatFromPixelFormat()
|
||||||
* Added SDL_CreateGPURenderer() and SDL_GetGPURendererDevice() to create a 2D renderer for use with GPU rendering.
|
* Added SDL_CreateGPURenderer() and SDL_GetGPURendererDevice() to create a 2D renderer for use with GPU rendering.
|
||||||
* Added SDL_CreateGPURenderState(), SDL_SetGPURenderStateFragmentUniforms(), SDL_SetGPURenderState(), and SDL_DestroyGPURenderState() to use fragment shaders with a GPU 2D renderer
|
* Added SDL_CreateGPURenderState(), SDL_SetGPURenderStateFragmentUniforms(), SDL_SetGPURenderState(), and SDL_DestroyGPURenderState() to use fragment shaders with a GPU 2D renderer
|
||||||
|
* Added SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_POINTER to create a 2D texture from an existing GPU texture
|
||||||
|
* Added SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER to get the GPU texture from a 2D texture when using the GPU 2D renderer
|
||||||
* Added support for YUV textures and HDR colorspaces to the GPU 2D renderer
|
* Added support for YUV textures and HDR colorspaces to the GPU 2D renderer
|
||||||
* Added support for textures with palettes, and SDL_GetTexturePalette() and SDL_SetTexturePalette() to interact with them
|
* Added support for textures with palettes, and SDL_GetTexturePalette() and SDL_SetTexturePalette() to interact with them
|
||||||
* Added SDL_RenderTexture9GridTiled() to do tiled instead of stretched 9-grid texture rendering
|
* Added SDL_RenderTexture9GridTiled() to do tiled instead of stretched 9-grid texture rendering
|
||||||
* Added SDL_GetDefaultTextureScaleMode() and SDL_SetDefaultTextureScaleMode() to set the texture scale mode for new textures
|
* Added SDL_GetDefaultTextureScaleMode() and SDL_SetDefaultTextureScaleMode() to set the texture scale mode for new textures
|
||||||
* Added SDL_GetRenderTextureAddressMode() and SDL_SetRenderTextureAddressMode() to change the texture addressing mode
|
* Added SDL_GetRenderTextureAddressMode() and SDL_SetRenderTextureAddressMode() to change the texture addressing mode
|
||||||
* Added SDL_TEXTURE_ADDRESS_WRAP to allow wrapping of textures if the renderer has SDL_PROP_RENDERER_TEXTURE_WRAPPING_BOOLEAN set
|
* Added SDL_TEXTURE_ADDRESS_WRAP to allow wrapping of textures if the renderer has SDL_PROP_RENDERER_TEXTURE_WRAPPING_BOOLEAN set
|
||||||
|
* The default YUV colorspace is BT.601 limited range, for compatibility with SDL2
|
||||||
|
* Added SDL_SCALEMODE_PIXELART as an improved scaling algorithm for pixel art without introducing blurring
|
||||||
|
* Added SDL_FLIP_HORIZONTAL_AND_VERTICAL to flip a surface both horizontally and vertically
|
||||||
* Added SDL_LoadPNG(), SDL_LoadPNG_IO(), SDL_SavePNG(), and SDL_SavePNG_IO() to load and save PNG images
|
* Added SDL_LoadPNG(), SDL_LoadPNG_IO(), SDL_SavePNG(), and SDL_SavePNG_IO() to load and save PNG images
|
||||||
|
* Added SDL_LoadSurface() and SDL_LoadSurface_IO() to detect BMP and PNG formats and load them as surfaces
|
||||||
|
* Added SDL_PROP_SURFACE_ROTATION_FLOAT to indicate the rotation needed to display camera images upright
|
||||||
* Added SDL_RotateSurface() to create a rotated copy of a surface
|
* Added SDL_RotateSurface() to create a rotated copy of a surface
|
||||||
|
* SDL_EVENT_WINDOW_EXPOSED now sets data1 to true if it is sent during live resizing
|
||||||
|
* Added SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED, which is sent when the usable desktop bounds change
|
||||||
|
* Added SDL_EVENT_SCREEN_KEYBOARD_SHOWN, which is sent when the on-screen keyboard has been shown
|
||||||
|
* Added SDL_EVENT_SCREEN_KEYBOARD_HIDDEN, which is sent when the on-screen keyboard has been hidden
|
||||||
|
* Added pinch gesture events: SDL_EVENT_PINCH_BEGIN, SDL_EVENT_PINCH_UPDATE, SDL_EVENT_PINCH_END
|
||||||
|
* SDL_EVENT_AUDIO_DEVICE_ADDED will be sent during initialization for each audio device
|
||||||
|
* SDL_GetCameraPermissionState() returns SDL_CameraPermissionState instead of int
|
||||||
* Added SDL_PutAudioStreamDataNoCopy() to do more efficient audio stream processing in some cases
|
* Added SDL_PutAudioStreamDataNoCopy() to do more efficient audio stream processing in some cases
|
||||||
* Added SDL_PutAudioStreamPlanarData() to add planar audio data instead of interleaved data to an audio stream
|
* Added SDL_PutAudioStreamPlanarData() to add planar audio data instead of interleaved data to an audio stream
|
||||||
* Added SDL_HINT_AUDIO_DEVICE_RAW_STREAM to signal that the OS shouldn't do further audio processing, useful for applications that handle noise canceling, etc.
|
* Added SDL_HINT_AUDIO_DEVICE_RAW_STREAM to signal that the OS shouldn't do further audio processing, useful for applications that handle noise canceling, etc.
|
||||||
|
* Added SDL_PROP_AUDIOSTREAM_AUTO_CLEANUP_BOOLEAN to allow streams that persist beyond the audio subsystem lifetime.
|
||||||
* Added enhanced support for 8BitDo controllers
|
* Added enhanced support for 8BitDo controllers
|
||||||
* Added enhanced support for FlyDigi controllers
|
* Added enhanced support for FlyDigi controllers
|
||||||
* Added enhanced support for Hand Held Legend SInput controllers
|
* Added enhanced support for Hand Held Legend SInput controllers
|
||||||
|
* Added support for wired Nintendo Switch 2 controllers when built with libusb
|
||||||
* Added SDL_hid_get_properties() to associate SDL properties with HID devices
|
* Added SDL_hid_get_properties() to associate SDL properties with HID devices
|
||||||
|
* Added SDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER to query the libusb handle from an SDL_hid_device, if it's been opened with libusb
|
||||||
* Added SDL_SetRelativeMouseTransform() to add custom mouse input transformation
|
* Added SDL_SetRelativeMouseTransform() to add custom mouse input transformation
|
||||||
* Added SDL_GetPenDeviceType() to determine whether a pen is on the screen or on a separate touchpad
|
* Added SDL_GetPenDeviceType() to determine whether a pen is on the screen or on a separate touchpad
|
||||||
|
* SDL_HINT_MAIN_CALLBACK_RATE may be set to a floating point callback rate
|
||||||
* Added SDL_GetEventDescription() to get an English description of an event, suitable for logging
|
* Added SDL_GetEventDescription() to get an English description of an event, suitable for logging
|
||||||
|
* Added SDL_PROP_IOSTREAM_MEMORY_FREE_FUNC_POINTER to allow custom freeing of the memory used by SDL_IOFromMem() and SDL_IOFromConstMem()
|
||||||
|
* Added SDL_PROP_PROCESS_CREATE_WORKING_DIRECTORY_STRING to set the working directory for new processes
|
||||||
* Added verbose log output when the DEBUG_INVOCATION environment variable is set to "1"
|
* Added verbose log output when the DEBUG_INVOCATION environment variable is set to "1"
|
||||||
* Added SDL_AddAtomicU32()
|
* Added SDL_AddAtomicU32()
|
||||||
* Added SDL_GetSystemPageSize() to get the system page size
|
* Added SDL_GetSystemPageSize() to get the system page size
|
||||||
|
* Added SDL_ALIGNED() to signal that data should have a specific alignment
|
||||||
|
|
||||||
Windows:
|
Windows:
|
||||||
* Added SDL_HINT_RENDER_DIRECT3D11_WARP to enable D3D11 software rasterization
|
* Added SDL_HINT_RENDER_DIRECT3D11_WARP to enable D3D11 software rasterization
|
||||||
|
* Using SDL_InsertGPUDebugLabel(), SDL_PushGPUDebugGroup(), and SDL_PopGPUDebugGroup() requires WinPixEventRuntime.dll to be in your PATH or in the same directory as your executable
|
||||||
|
* Added SDL_PROP_DISPLAY_WINDOWS_HMONITOR_POINTER so you can query the HMONITOR associated with a display
|
||||||
* SDL_HINT_AUDIO_DEVICE_STREAM_ROLE is used by the WASAPI audio driver to set the audio stream category
|
* SDL_HINT_AUDIO_DEVICE_STREAM_ROLE is used by the WASAPI audio driver to set the audio stream category
|
||||||
|
* Added SDL_HINT_AUDIO_DEVICE_RAW_STREAM to signal whether the OS audio driver should do additional signal processing
|
||||||
|
* Added SDL_HINT_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS to allow disabling some system hotkeys when in raw input mode
|
||||||
* SDL_HINT_WINDOWS_GAMEINPUT is disabled by default
|
* SDL_HINT_WINDOWS_GAMEINPUT is disabled by default
|
||||||
|
|
||||||
|
macOS:
|
||||||
|
* Added SDL_HINT_MAC_PRESS_AND_HOLD to control whether holding down a key will repeat the pressed key or open the accents menu
|
||||||
|
|
||||||
Linux:
|
Linux:
|
||||||
* Added atomic support for KMSDRM
|
* Added atomic support for KMSDRM
|
||||||
* Added SDL_HINT_KMSDRM_ATOMIC to control whether KMSDRM will use atomic functionality
|
* Added SDL_HINT_KMSDRM_ATOMIC to control whether KMSDRM will use atomic functionality
|
||||||
|
* Added SDL_PROP_DISPLAY_WAYLAND_WL_OUTPUT_POINTER so you can query the wl_output associated with a display
|
||||||
|
|
||||||
Emscripten:
|
Emscripten:
|
||||||
* Added SDL_HINT_EMSCRIPTEN_FILL_DOCUMENT for applications that don't want to be fullscreen, but would like to fill the window
|
* Added SDL_WINDOW_FILL_DOCUMENT to indicate that windows expand to fill the whole browser window
|
||||||
|
* Added SDL_SetWindowFillDocument() to change whether windows expand to fill the whole browser window
|
||||||
|
* Added SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_CANVAS_ID_STRING to allow setting the SDL canvas ID, and SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING to query it on existing windows
|
||||||
|
* Added SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING to specify where keyboard input is bound, and SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING to query it on existing windows
|
||||||
|
|
||||||
|
iOS:
|
||||||
|
* SDL now supports window scenes, fixing the warning "CLIENT OF UIKIT REQUIRES UPDATE"
|
||||||
|
* Added SDL_PROP_WINDOW_CREATE_WINDOWSCENE_POINTER to specify the window scene for a window
|
||||||
|
|
||||||
|
visionOS:
|
||||||
|
* The default refresh rate has been increased to 90Hz
|
||||||
|
* SDL_SetWindowSize() changes the size of the window on Vision Pro headsets
|
||||||
|
|
||||||
PlayStation 2:
|
PlayStation 2:
|
||||||
* Added the following hints to control the display parameters: SDL_HINT_PS2_GS_WIDTH, SDL_HINT_PS2_GS_HEIGHT, SDL_HINT_PS2_GS_PROGRESSIVE, SDL_HINT_PS2_GS_MODE
|
* Added the following hints to control the display parameters: SDL_HINT_PS2_GS_WIDTH, SDL_HINT_PS2_GS_HEIGHT, SDL_HINT_PS2_GS_PROGRESSIVE, SDL_HINT_PS2_GS_MODE
|
||||||
|
|
||||||
|
Note: On Unix platforms SDL provides ELF notes describing its non-mandatory library dependencies in the format described by https://systemd.io/ELF_DLOPEN_METADATA/. Some of these libraries are quite important, so distribution vendors who package SDL should parse the ELF notes and consider generating dependencies at the packaging level, for example by using https://github.com/systemd/package-notes. Other libraries and games can add similar ELF notes to describe their own dependencies by using the SDL_ELF_NOTE_DLOPEN macro.
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
3.2.22:
|
3.2.22:
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
* SDL_HINT_JOYSTICK_WGI is disabled by default
|
* SDL_HINT_JOYSTICK_WGI is disabled by default
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
3.2.16:
|
3.2.16:
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
* SDL_HINT_JOYSTICK_RAWINPUT is disabled by default
|
* SDL_HINT_JOYSTICK_RAWINPUT is disabled by default
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
3.2.10:
|
3.2.10:
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
* Added SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT to control whether XSelectInput() should be called on external windows to enable input events.
|
* Added SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT to control whether XSelectInput() should be called on external windows to enable input events.
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
3.2.4:
|
3.2.4:
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
* Added SDL_StretchSurface()
|
* Added SDL_StretchSurface()
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
3.2.0:
|
3.2.0:
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -19,10 +19,10 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>3.3.2</string>
|
<string>3.4.6</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>SDLX</string>
|
<string>SDLX</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>3.3.2</string>
|
<string>3.4.6</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 54;
|
objectVersion = 55;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXAggregateTarget section */
|
/* Begin PBXAggregateTarget section */
|
||||||
@@ -414,6 +414,7 @@
|
|||||||
F386F6F02884663E001840AA /* SDL_utils_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F386F6E52884663E001840AA /* SDL_utils_c.h */; };
|
F386F6F02884663E001840AA /* SDL_utils_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F386F6E52884663E001840AA /* SDL_utils_c.h */; };
|
||||||
F386F6F92884663E001840AA /* SDL_utils.c in Sources */ = {isa = PBXBuildFile; fileRef = F386F6E62884663E001840AA /* SDL_utils.c */; };
|
F386F6F92884663E001840AA /* SDL_utils.c in Sources */ = {isa = PBXBuildFile; fileRef = F386F6E62884663E001840AA /* SDL_utils.c */; };
|
||||||
F388C95528B5F6F700661ECF /* SDL_hidapi_ps3.c in Sources */ = {isa = PBXBuildFile; fileRef = F388C95428B5F6F600661ECF /* SDL_hidapi_ps3.c */; };
|
F388C95528B5F6F700661ECF /* SDL_hidapi_ps3.c in Sources */ = {isa = PBXBuildFile; fileRef = F388C95428B5F6F600661ECF /* SDL_hidapi_ps3.c */; };
|
||||||
|
F38C72492CEEB1DE000B0A90 /* SDL_hidapi_steam_triton.c in Sources */ = {isa = PBXBuildFile; fileRef = F38C72482CEEB1DE000B0A90 /* SDL_hidapi_steam_triton.c */; };
|
||||||
F39344CE2E99771B0056986F /* SDL_dlopennote.h in Headers */ = {isa = PBXBuildFile; fileRef = F39344CD2E99771B0056986F /* SDL_dlopennote.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
F39344CE2E99771B0056986F /* SDL_dlopennote.h in Headers */ = {isa = PBXBuildFile; fileRef = F39344CD2E99771B0056986F /* SDL_dlopennote.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
F395BF6525633B2400942BFF /* SDL_crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = F395BF6425633B2400942BFF /* SDL_crc32.c */; };
|
F395BF6525633B2400942BFF /* SDL_crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = F395BF6425633B2400942BFF /* SDL_crc32.c */; };
|
||||||
F395C1932569C68F00942BFF /* SDL_iokitjoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F395C1912569C68E00942BFF /* SDL_iokitjoystick_c.h */; };
|
F395C1932569C68F00942BFF /* SDL_iokitjoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F395C1912569C68E00942BFF /* SDL_iokitjoystick_c.h */; };
|
||||||
@@ -529,6 +530,10 @@
|
|||||||
F3DDCC5B2AFD42B600B0842B /* SDL_video_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3DDCC522AFD42B600B0842B /* SDL_video_c.h */; };
|
F3DDCC5B2AFD42B600B0842B /* SDL_video_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3DDCC522AFD42B600B0842B /* SDL_video_c.h */; };
|
||||||
F3DDCC5D2AFD42B600B0842B /* SDL_rect_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = F3DDCC542AFD42B600B0842B /* SDL_rect_impl.h */; };
|
F3DDCC5D2AFD42B600B0842B /* SDL_rect_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = F3DDCC542AFD42B600B0842B /* SDL_rect_impl.h */; };
|
||||||
F3E5A6EB2AD5E0E600293D83 /* SDL_properties.c in Sources */ = {isa = PBXBuildFile; fileRef = F3E5A6EA2AD5E0E600293D83 /* SDL_properties.c */; };
|
F3E5A6EB2AD5E0E600293D83 /* SDL_properties.c in Sources */ = {isa = PBXBuildFile; fileRef = F3E5A6EA2AD5E0E600293D83 /* SDL_properties.c */; };
|
||||||
|
F3E6C3932EE9F20000A6B39E /* SDL_report_descriptor.c in Sources */ = {isa = PBXBuildFile; fileRef = F3E6C3922EE9F20000A6B39E /* SDL_report_descriptor.c */; };
|
||||||
|
F3E6C3942EE9F20000A6B39E /* SDL_hidapi_flydigi.h in Headers */ = {isa = PBXBuildFile; fileRef = F3E6C38F2EE9F20000A6B39E /* SDL_hidapi_flydigi.h */; };
|
||||||
|
F3E6C3952EE9F20000A6B39E /* SDL_hidapi_sinput.h in Headers */ = {isa = PBXBuildFile; fileRef = F3E6C3902EE9F20000A6B39E /* SDL_hidapi_sinput.h */; };
|
||||||
|
F3E6C3962EE9F20000A6B39E /* SDL_report_descriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = F3E6C3912EE9F20000A6B39E /* SDL_report_descriptor.h */; };
|
||||||
F3EFA5ED2D5AB97300BCF22F /* SDL_stb_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3EFA5EA2D5AB97300BCF22F /* SDL_stb_c.h */; };
|
F3EFA5ED2D5AB97300BCF22F /* SDL_stb_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3EFA5EA2D5AB97300BCF22F /* SDL_stb_c.h */; };
|
||||||
F3EFA5EE2D5AB97300BCF22F /* stb_image.h in Headers */ = {isa = PBXBuildFile; fileRef = F3EFA5EC2D5AB97300BCF22F /* stb_image.h */; };
|
F3EFA5EE2D5AB97300BCF22F /* stb_image.h in Headers */ = {isa = PBXBuildFile; fileRef = F3EFA5EC2D5AB97300BCF22F /* stb_image.h */; };
|
||||||
F3EFA5EF2D5AB97300BCF22F /* SDL_surface_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3EFA5EB2D5AB97300BCF22F /* SDL_surface_c.h */; };
|
F3EFA5EF2D5AB97300BCF22F /* SDL_surface_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3EFA5EB2D5AB97300BCF22F /* SDL_surface_c.h */; };
|
||||||
@@ -997,6 +1002,7 @@
|
|||||||
F386F6E52884663E001840AA /* SDL_utils_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_utils_c.h; sourceTree = "<group>"; };
|
F386F6E52884663E001840AA /* SDL_utils_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_utils_c.h; sourceTree = "<group>"; };
|
||||||
F386F6E62884663E001840AA /* SDL_utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_utils.c; sourceTree = "<group>"; };
|
F386F6E62884663E001840AA /* SDL_utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_utils.c; sourceTree = "<group>"; };
|
||||||
F388C95428B5F6F600661ECF /* SDL_hidapi_ps3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_ps3.c; sourceTree = "<group>"; };
|
F388C95428B5F6F600661ECF /* SDL_hidapi_ps3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_ps3.c; sourceTree = "<group>"; };
|
||||||
|
F38C72482CEEB1DE000B0A90 /* SDL_hidapi_steam_triton.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_steam_triton.c; sourceTree = "<group>"; };
|
||||||
F39344CD2E99771B0056986F /* SDL_dlopennote.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_dlopennote.h; sourceTree = "<group>"; };
|
F39344CD2E99771B0056986F /* SDL_dlopennote.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_dlopennote.h; sourceTree = "<group>"; };
|
||||||
F395BF6425633B2400942BFF /* SDL_crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_crc32.c; sourceTree = "<group>"; };
|
F395BF6425633B2400942BFF /* SDL_crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_crc32.c; sourceTree = "<group>"; };
|
||||||
F395C1912569C68E00942BFF /* SDL_iokitjoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_iokitjoystick_c.h; sourceTree = "<group>"; };
|
F395C1912569C68E00942BFF /* SDL_iokitjoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_iokitjoystick_c.h; sourceTree = "<group>"; };
|
||||||
@@ -1111,6 +1117,10 @@
|
|||||||
F3DDCC522AFD42B600B0842B /* SDL_video_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_video_c.h; sourceTree = "<group>"; };
|
F3DDCC522AFD42B600B0842B /* SDL_video_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_video_c.h; sourceTree = "<group>"; };
|
||||||
F3DDCC542AFD42B600B0842B /* SDL_rect_impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_rect_impl.h; sourceTree = "<group>"; };
|
F3DDCC542AFD42B600B0842B /* SDL_rect_impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_rect_impl.h; sourceTree = "<group>"; };
|
||||||
F3E5A6EA2AD5E0E600293D83 /* SDL_properties.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_properties.c; sourceTree = "<group>"; };
|
F3E5A6EA2AD5E0E600293D83 /* SDL_properties.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_properties.c; sourceTree = "<group>"; };
|
||||||
|
F3E6C38F2EE9F20000A6B39E /* SDL_hidapi_flydigi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_hidapi_flydigi.h; sourceTree = "<group>"; };
|
||||||
|
F3E6C3902EE9F20000A6B39E /* SDL_hidapi_sinput.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_hidapi_sinput.h; sourceTree = "<group>"; };
|
||||||
|
F3E6C3912EE9F20000A6B39E /* SDL_report_descriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_report_descriptor.h; sourceTree = "<group>"; };
|
||||||
|
F3E6C3922EE9F20000A6B39E /* SDL_report_descriptor.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SDL_report_descriptor.c; sourceTree = "<group>"; };
|
||||||
F3EFA5E92D5AB97300BCF22F /* SDL_stb.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SDL_stb.c; sourceTree = "<group>"; };
|
F3EFA5E92D5AB97300BCF22F /* SDL_stb.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SDL_stb.c; sourceTree = "<group>"; };
|
||||||
F3EFA5EA2D5AB97300BCF22F /* SDL_stb_c.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_stb_c.h; sourceTree = "<group>"; };
|
F3EFA5EA2D5AB97300BCF22F /* SDL_stb_c.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_stb_c.h; sourceTree = "<group>"; };
|
||||||
F3EFA5EB2D5AB97300BCF22F /* SDL_surface_c.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_surface_c.h; sourceTree = "<group>"; };
|
F3EFA5EB2D5AB97300BCF22F /* SDL_surface_c.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_surface_c.h; sourceTree = "<group>"; };
|
||||||
@@ -1946,6 +1956,7 @@
|
|||||||
children = (
|
children = (
|
||||||
F3395BA72D9A5971007246C8 /* SDL_hidapi_8bitdo.c */,
|
F3395BA72D9A5971007246C8 /* SDL_hidapi_8bitdo.c */,
|
||||||
F32305FE28939F6400E66D30 /* SDL_hidapi_combined.c */,
|
F32305FE28939F6400E66D30 /* SDL_hidapi_combined.c */,
|
||||||
|
F3E6C38F2EE9F20000A6B39E /* SDL_hidapi_flydigi.h */,
|
||||||
F3395BA72D9A5971007246C9 /* SDL_hidapi_flydigi.c */,
|
F3395BA72D9A5971007246C9 /* SDL_hidapi_flydigi.c */,
|
||||||
A7D8A7C923E2513E00DCD162 /* SDL_hidapi_gamecube.c */,
|
A7D8A7C923E2513E00DCD162 /* SDL_hidapi_gamecube.c */,
|
||||||
F3B6B8092DC3EA54004954FD /* SDL_hidapi_gip.c */,
|
F3B6B8092DC3EA54004954FD /* SDL_hidapi_gip.c */,
|
||||||
@@ -1958,10 +1969,12 @@
|
|||||||
A75FDBC323EA380300529352 /* SDL_hidapi_rumble.h */,
|
A75FDBC323EA380300529352 /* SDL_hidapi_rumble.h */,
|
||||||
A75FDBC423EA380300529352 /* SDL_hidapi_rumble.c */,
|
A75FDBC423EA380300529352 /* SDL_hidapi_rumble.c */,
|
||||||
9846B07B287A9020000C35C8 /* SDL_hidapi_shield.c */,
|
9846B07B287A9020000C35C8 /* SDL_hidapi_shield.c */,
|
||||||
|
F3E6C3902EE9F20000A6B39E /* SDL_hidapi_sinput.h */,
|
||||||
02D6A1C128A84B8F00A7F001 /* SDL_hidapi_sinput.c */,
|
02D6A1C128A84B8F00A7F001 /* SDL_hidapi_sinput.c */,
|
||||||
F3984CCF25BCC92800374F43 /* SDL_hidapi_stadia.c */,
|
F3984CCF25BCC92800374F43 /* SDL_hidapi_stadia.c */,
|
||||||
A75FDAAC23E2795C00529352 /* SDL_hidapi_steam.c */,
|
A75FDAAC23E2795C00529352 /* SDL_hidapi_steam.c */,
|
||||||
F3FD042D2C9B755700824C4C /* SDL_hidapi_steam_hori.c */,
|
F3FD042D2C9B755700824C4C /* SDL_hidapi_steam_hori.c */,
|
||||||
|
F38C72482CEEB1DE000B0A90 /* SDL_hidapi_steam_triton.c */,
|
||||||
A797456F2B2E9D39009D224A /* SDL_hidapi_steamdeck.c */,
|
A797456F2B2E9D39009D224A /* SDL_hidapi_steamdeck.c */,
|
||||||
A7D8A7C623E2513E00DCD162 /* SDL_hidapi_switch.c */,
|
A7D8A7C623E2513E00DCD162 /* SDL_hidapi_switch.c */,
|
||||||
A7D8A7C623E2513E00DCD163 /* SDL_hidapi_switch2.c */,
|
A7D8A7C623E2513E00DCD163 /* SDL_hidapi_switch2.c */,
|
||||||
@@ -1972,6 +1985,8 @@
|
|||||||
63124A412E5C357500A53610 /* SDL_hidapi_zuiki.c */,
|
63124A412E5C357500A53610 /* SDL_hidapi_zuiki.c */,
|
||||||
A7D8A7C423E2513E00DCD162 /* SDL_hidapijoystick.c */,
|
A7D8A7C423E2513E00DCD162 /* SDL_hidapijoystick.c */,
|
||||||
A7D8A7C723E2513E00DCD162 /* SDL_hidapijoystick_c.h */,
|
A7D8A7C723E2513E00DCD162 /* SDL_hidapijoystick_c.h */,
|
||||||
|
F3E6C3912EE9F20000A6B39E /* SDL_report_descriptor.h */,
|
||||||
|
F3E6C3922EE9F20000A6B39E /* SDL_report_descriptor.c */,
|
||||||
);
|
);
|
||||||
path = hidapi;
|
path = hidapi;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -2551,6 +2566,9 @@
|
|||||||
F3D46ADB2D20625800D9CBDF /* SDL_pen.h in Headers */,
|
F3D46ADB2D20625800D9CBDF /* SDL_pen.h in Headers */,
|
||||||
F3D46ADC2D20625800D9CBDF /* SDL_render.h in Headers */,
|
F3D46ADC2D20625800D9CBDF /* SDL_render.h in Headers */,
|
||||||
F3D46ADD2D20625800D9CBDF /* SDL_assert.h in Headers */,
|
F3D46ADD2D20625800D9CBDF /* SDL_assert.h in Headers */,
|
||||||
|
F3E6C3942EE9F20000A6B39E /* SDL_hidapi_flydigi.h in Headers */,
|
||||||
|
F3E6C3952EE9F20000A6B39E /* SDL_hidapi_sinput.h in Headers */,
|
||||||
|
F3E6C3962EE9F20000A6B39E /* SDL_report_descriptor.h in Headers */,
|
||||||
F3D46ADE2D20625800D9CBDF /* SDL_atomic.h in Headers */,
|
F3D46ADE2D20625800D9CBDF /* SDL_atomic.h in Headers */,
|
||||||
F3D46ADF2D20625800D9CBDF /* SDL_begin_code.h in Headers */,
|
F3D46ADF2D20625800D9CBDF /* SDL_begin_code.h in Headers */,
|
||||||
F3D46AE02D20625800D9CBDF /* SDL_log.h in Headers */,
|
F3D46AE02D20625800D9CBDF /* SDL_log.h in Headers */,
|
||||||
@@ -2920,6 +2938,7 @@
|
|||||||
F3C1BD752D1F1A3000846529 /* SDL_tray_utils.c in Sources */,
|
F3C1BD752D1F1A3000846529 /* SDL_tray_utils.c in Sources */,
|
||||||
F382071D284F362F004DD584 /* SDL_guid.c in Sources */,
|
F382071D284F362F004DD584 /* SDL_guid.c in Sources */,
|
||||||
A7D8BB8D23E2514500DCD162 /* SDL_touch.c in Sources */,
|
A7D8BB8D23E2514500DCD162 /* SDL_touch.c in Sources */,
|
||||||
|
F3E6C3932EE9F20000A6B39E /* SDL_report_descriptor.c in Sources */,
|
||||||
F31A92D228D4CB39003BFD6A /* SDL_offscreenopengles.c in Sources */,
|
F31A92D228D4CB39003BFD6A /* SDL_offscreenopengles.c in Sources */,
|
||||||
A1626A3E2617006A003F1973 /* SDL_triangle.c in Sources */,
|
A1626A3E2617006A003F1973 /* SDL_triangle.c in Sources */,
|
||||||
A7D8B3F223E2514300DCD162 /* SDL_thread.c in Sources */,
|
A7D8B3F223E2514300DCD162 /* SDL_thread.c in Sources */,
|
||||||
@@ -3009,6 +3028,7 @@
|
|||||||
F316ABD92B5C3185002EF551 /* SDL_memcpy.c in Sources */,
|
F316ABD92B5C3185002EF551 /* SDL_memcpy.c in Sources */,
|
||||||
A7D8B97A23E2514400DCD162 /* SDL_render.c in Sources */,
|
A7D8B97A23E2514400DCD162 /* SDL_render.c in Sources */,
|
||||||
A7D8ABD323E2514100DCD162 /* SDL_stretch.c in Sources */,
|
A7D8ABD323E2514100DCD162 /* SDL_stretch.c in Sources */,
|
||||||
|
F38C72492CEEB1DE000B0A90 /* SDL_hidapi_steam_triton.c in Sources */,
|
||||||
A7D8AC3923E2514100DCD162 /* SDL_blit_copy.c in Sources */,
|
A7D8AC3923E2514100DCD162 /* SDL_blit_copy.c in Sources */,
|
||||||
A7D8B5CF23E2514300DCD162 /* SDL_syspower.m in Sources */,
|
A7D8B5CF23E2514300DCD162 /* SDL_syspower.m in Sources */,
|
||||||
F3B439512C935C2400792030 /* SDL_dummyprocess.c in Sources */,
|
F3B439512C935C2400792030 /* SDL_dummyprocess.c in Sources */,
|
||||||
@@ -3141,8 +3161,8 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
DEPLOYMENT_POSTPROCESSING = YES;
|
DEPLOYMENT_POSTPROCESSING = YES;
|
||||||
DYLIB_COMPATIBILITY_VERSION = 303.0.0;
|
DYLIB_COMPATIBILITY_VERSION = 401.0.0;
|
||||||
DYLIB_CURRENT_VERSION = 303.0.0;
|
DYLIB_CURRENT_VERSION = 401.6.0;
|
||||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
GCC_ALTIVEC_EXTENSIONS = YES;
|
GCC_ALTIVEC_EXTENSIONS = YES;
|
||||||
@@ -3177,7 +3197,7 @@
|
|||||||
"@loader_path/Frameworks",
|
"@loader_path/Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||||
MARKETING_VERSION = 3.3.2;
|
MARKETING_VERSION = 3.4.6;
|
||||||
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
|
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
|
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
|
||||||
PRODUCT_NAME = SDL3;
|
PRODUCT_NAME = SDL3;
|
||||||
@@ -3207,8 +3227,8 @@
|
|||||||
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
|
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
DYLIB_COMPATIBILITY_VERSION = 303.0.0;
|
DYLIB_COMPATIBILITY_VERSION = 401.0.0;
|
||||||
DYLIB_CURRENT_VERSION = 303.0.0;
|
DYLIB_CURRENT_VERSION = 401.6.0;
|
||||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
ENABLE_TESTABILITY = YES;
|
ENABLE_TESTABILITY = YES;
|
||||||
@@ -3240,7 +3260,7 @@
|
|||||||
"@loader_path/Frameworks",
|
"@loader_path/Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||||
MARKETING_VERSION = 3.3.2;
|
MARKETING_VERSION = 3.4.6;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
|
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
|
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Title SDL 3.3.2
|
Title SDL 3.4.6
|
||||||
Version 1
|
Version 1
|
||||||
Description SDL Library for macOS (http://www.libsdl.org)
|
Description SDL Library for macOS (http://www.libsdl.org)
|
||||||
DefaultLocation /Library/Frameworks
|
DefaultLocation /Library/Frameworks
|
||||||
|
|||||||
@@ -31,9 +31,11 @@ if(_sdl_major_re AND _sdl_minor_re AND _sdl_micro_re)
|
|||||||
set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_micro}")
|
set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_micro}")
|
||||||
else()
|
else()
|
||||||
message(AUTHOR_WARNING "Could not extract version from SDL_version.h.")
|
message(AUTHOR_WARNING "Could not extract version from SDL_version.h.")
|
||||||
|
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
unset(_sdl_version_h)
|
||||||
unset(_sdl_version_h_path)
|
unset(_sdl_version_h_path)
|
||||||
unset(_sdl_major_re)
|
unset(_sdl_major_re)
|
||||||
unset(_sdl_major)
|
unset(_sdl_major)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ set(_sdl3_version_h "${_sdl3_framework}/Headers/SDL_version.h")
|
|||||||
|
|
||||||
if(NOT EXISTS "${_sdl3_version_h}")
|
if(NOT EXISTS "${_sdl3_version_h}")
|
||||||
message(AUTHOR_WARNING "Cannot not find ${_sdl3_framework}. This script is meant to be placed in share/cmake/SDL3, next to SDL3.xcframework")
|
message(AUTHOR_WARNING "Cannot not find ${_sdl3_framework}. This script is meant to be placed in share/cmake/SDL3, next to SDL3.xcframework")
|
||||||
|
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -36,6 +37,7 @@ if(_sdl_major_re AND _sdl_minor_re AND _sdl_micro_re)
|
|||||||
set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_micro}")
|
set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_micro}")
|
||||||
else()
|
else()
|
||||||
message(AUTHOR_WARNING "Could not extract version from SDL_version.h.")
|
message(AUTHOR_WARNING "Could not extract version from SDL_version.h.")
|
||||||
|
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -1991,7 +1991,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testatomic;
|
name = testatomic;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 0017958C10741F7900F5D044 /* testatomic.app */;
|
productReference = 0017958C10741F7900F5D044 /* testatomic.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2008,7 +2007,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testaudioinfo;
|
name = testaudioinfo;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 001795AD107421BF00F5D044 /* testaudioinfo.app */;
|
productReference = 001795AD107421BF00F5D044 /* testaudioinfo.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2025,7 +2023,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testgl;
|
name = testgl;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 0017972110742F3200F5D044 /* testgl.app */;
|
productReference = 0017972110742F3200F5D044 /* testgl.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2042,7 +2039,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testhaptic;
|
name = testhaptic;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 00179748107430D600F5D044 /* testhaptic.app */;
|
productReference = 00179748107430D600F5D044 /* testhaptic.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2059,7 +2055,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testdraw;
|
name = testdraw;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 0017976E107431B300F5D044 /* testdraw.app */;
|
productReference = 0017976E107431B300F5D044 /* testdraw.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2077,7 +2072,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testime;
|
name = testime;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 0017978E107432AE00F5D044 /* testime.app */;
|
productReference = 0017978E107432AE00F5D044 /* testime.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2094,7 +2088,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testintersections;
|
name = testintersections;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 001797AE1074334C00F5D044 /* testintersections.app */;
|
productReference = 001797AE1074334C00F5D044 /* testintersections.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2111,7 +2104,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testloadso;
|
name = testloadso;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 001797D0107433C600F5D044 /* testloadso.app */;
|
productReference = 001797D0107433C600F5D044 /* testloadso.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2129,7 +2121,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testmultiaudio;
|
name = testmultiaudio;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 001798121074355200F5D044 /* testmultiaudio.app */;
|
productReference = 001798121074355200F5D044 /* testmultiaudio.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2147,7 +2138,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testnative;
|
name = testnative;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 001798941074392D00F5D044 /* testnative.app */;
|
productReference = 001798941074392D00F5D044 /* testnative.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2164,7 +2154,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testpower;
|
name = testpower;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 001798B5107439DF00F5D044 /* testpower.app */;
|
productReference = 001798B5107439DF00F5D044 /* testpower.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2181,7 +2170,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testresample;
|
name = testresample;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 001798F210743BEC00F5D044 /* testresample.app */;
|
productReference = 001798F210743BEC00F5D044 /* testresample.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2199,7 +2187,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testsprite;
|
name = testsprite;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 0017991610743F1000F5D044 /* testsprite.app */;
|
productReference = 0017991610743F1000F5D044 /* testsprite.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2216,7 +2203,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testwm;
|
name = testwm;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 0017993810743FB700F5D044 /* testwm.app */;
|
productReference = 0017993810743FB700F5D044 /* testwm.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2233,7 +2219,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testfile;
|
name = testfile;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 002F341209CA1BFF00EBEB88 /* testfile.app */;
|
productReference = 002F341209CA1BFF00EBEB88 /* testfile.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2251,7 +2236,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testiconv;
|
name = testiconv;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 002F343109CA1F0300EBEB88 /* testiconv.app */;
|
productReference = 002F343109CA1F0300EBEB88 /* testiconv.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2269,7 +2253,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testoverlay;
|
name = testoverlay;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 002F344D09CA1FB300EBEB88 /* testoverlay.app */;
|
productReference = 002F344D09CA1FB300EBEB88 /* testoverlay.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2286,7 +2269,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testplatform;
|
name = testplatform;
|
||||||
productName = testalpha;
|
|
||||||
productReference = 002F346A09CA204F00EBEB88 /* testplatform.app */;
|
productReference = 002F346A09CA204F00EBEB88 /* testplatform.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2509,7 +2491,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testdrawchessboard;
|
name = testdrawchessboard;
|
||||||
productName = testalpha;
|
|
||||||
productReference = DB0F48EC17CA51E5008798C5 /* testdrawchessboard.app */;
|
productReference = DB0F48EC17CA51E5008798C5 /* testdrawchessboard.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2526,7 +2507,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testfilesystem;
|
name = testfilesystem;
|
||||||
productName = testalpha;
|
|
||||||
productReference = DB0F490117CA5212008798C5 /* testfilesystem.app */;
|
productReference = DB0F490117CA5212008798C5 /* testfilesystem.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2560,7 +2540,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testmessage;
|
name = testmessage;
|
||||||
productName = testalpha;
|
|
||||||
productReference = DB166DD516A1D36A00A1396C /* testmessage.app */;
|
productReference = DB166DD516A1D36A00A1396C /* testmessage.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2577,7 +2556,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testrelative;
|
name = testrelative;
|
||||||
productName = testalpha;
|
|
||||||
productReference = DB166DEE16A1D50C00A1396C /* testrelative.app */;
|
productReference = DB166DEE16A1D50C00A1396C /* testrelative.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2595,7 +2573,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testrendercopyex;
|
name = testrendercopyex;
|
||||||
productName = testalpha;
|
|
||||||
productReference = DB166E0516A1D57C00A1396C /* testrendercopyex.app */;
|
productReference = DB166E0516A1D57C00A1396C /* testrendercopyex.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2613,7 +2590,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testrendertarget;
|
name = testrendertarget;
|
||||||
productName = testalpha;
|
|
||||||
productReference = DB166E1C16A1D5AD00A1396C /* testrendertarget.app */;
|
productReference = DB166E1C16A1D5AD00A1396C /* testrendertarget.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2630,7 +2606,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testrumble;
|
name = testrumble;
|
||||||
productName = testalpha;
|
|
||||||
productReference = DB166E3816A1D64D00A1396C /* testrumble.app */;
|
productReference = DB166E3816A1D64D00A1396C /* testrumble.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2648,7 +2623,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testscale;
|
name = testscale;
|
||||||
productName = testalpha;
|
|
||||||
productReference = DB166E5216A1D69000A1396C /* testscale.app */;
|
productReference = DB166E5216A1D69000A1396C /* testscale.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2717,7 +2691,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testhotplug;
|
name = testhotplug;
|
||||||
productName = testalpha;
|
|
||||||
productReference = DB89957E18A19ABA0092407C /* testhotplug.app */;
|
productReference = DB89957E18A19ABA0092407C /* testhotplug.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2734,7 +2707,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testautomation;
|
name = testautomation;
|
||||||
productName = testalpha;
|
|
||||||
productReference = F35E56AA298312CB00A43A5F /* testautomation.app */;
|
productReference = F35E56AA298312CB00A43A5F /* testautomation.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2751,7 +2723,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testcamera;
|
name = testcamera;
|
||||||
productName = testalpha;
|
|
||||||
productReference = F36C34272C0F85DB00991150 /* testcamera.app */;
|
productReference = F36C34272C0F85DB00991150 /* testcamera.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2768,7 +2739,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testpen;
|
name = testpen;
|
||||||
productName = testalpha;
|
|
||||||
productReference = F3B7FD6A2D73FC630086D1D0 /* testpen.app */;
|
productReference = F3B7FD6A2D73FC630086D1D0 /* testpen.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -2803,7 +2773,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testyuv;
|
name = testyuv;
|
||||||
productName = testalpha;
|
|
||||||
productReference = F3DB65E92E9DA90000568044 /* testyuv.app */;
|
productReference = F3DB65E92E9DA90000568044 /* testyuv.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
@@ -4045,7 +4014,7 @@
|
|||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
HEADER_SEARCH_PATHS = ../../include;
|
HEADER_SEARCH_PATHS = ../../include;
|
||||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
|
||||||
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
|
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||||
@@ -4056,7 +4025,8 @@
|
|||||||
SUPPORTED_PLATFORMS = "xrsimulator xros macosx iphonesimulator iphoneos appletvsimulator appletvos";
|
SUPPORTED_PLATFORMS = "xrsimulator xros macosx iphonesimulator iphoneos appletvsimulator appletvos";
|
||||||
SUPPORTS_MACCATALYST = YES;
|
SUPPORTS_MACCATALYST = YES;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2,3";
|
TARGETED_DEVICE_FAMILY = "1,2,3";
|
||||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
TVOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
|
XROS_DEPLOYMENT_TARGET = 1.3;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -4219,7 +4189,7 @@
|
|||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
HEADER_SEARCH_PATHS = ../../include;
|
HEADER_SEARCH_PATHS = ../../include;
|
||||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
|
||||||
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
|
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||||
@@ -4229,7 +4199,8 @@
|
|||||||
SUPPORTED_PLATFORMS = "xrsimulator xros macosx iphonesimulator iphoneos appletvsimulator appletvos";
|
SUPPORTED_PLATFORMS = "xrsimulator xros macosx iphonesimulator iphoneos appletvsimulator appletvos";
|
||||||
SUPPORTS_MACCATALYST = YES;
|
SUPPORTS_MACCATALYST = YES;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2,3";
|
TARGETED_DEVICE_FAMILY = "1,2,3";
|
||||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
TVOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
|
XROS_DEPLOYMENT_TARGET = 1.3;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@@ -4726,6 +4697,25 @@
|
|||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
F37E49E22EB5250B00E508F7 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
F37E49E32EB5250B00E508F7 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
COPY_PHASE_STRIP = YES;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
F3B7FD682D73FC630086D1D0 /* Debug */ = {
|
F3B7FD682D73FC630086D1D0 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
@@ -5213,8 +5203,8 @@
|
|||||||
F3DB65E62E9DA90000568044 /* Build configuration list for PBXNativeTarget "testyuv" */ = {
|
F3DB65E62E9DA90000568044 /* Build configuration list for PBXNativeTarget "testyuv" */ = {
|
||||||
isa = XCConfigurationList;
|
isa = XCConfigurationList;
|
||||||
buildConfigurations = (
|
buildConfigurations = (
|
||||||
F3DB65E72E9DA90000568044 /* Debug */,
|
F37E49E22EB5250B00E508F7 /* Debug */,
|
||||||
F3DB65E82E9DA90000568044 /* Release */,
|
F37E49E32EB5250B00E508F7 /* Release */,
|
||||||
);
|
);
|
||||||
defaultConfigurationIsVisible = 0;
|
defaultConfigurationIsVisible = 0;
|
||||||
defaultConfigurationName = Debug;
|
defaultConfigurationName = Debug;
|
||||||
|
|||||||
@@ -10,5 +10,7 @@
|
|||||||
// This allows you to set DEVELOPMENT_TEAM for all targets, for example.
|
// This allows you to set DEVELOPMENT_TEAM for all targets, for example.
|
||||||
#include? "build.xcconfig"
|
#include? "build.xcconfig"
|
||||||
|
|
||||||
|
INFOPLIST_FILE = test-Info.plist
|
||||||
|
|
||||||
CONFIG_FRAMEWORK_LDFLAGS = -lSDL3_test
|
CONFIG_FRAMEWORK_LDFLAGS = -lSDL3_test
|
||||||
|
|
||||||
|
|||||||
20
Xcode/SDLTest/test-Info.plist
Normal file
20
Xcode/SDLTest/test-Info.plist
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>UILaunchScreen</key>
|
||||||
|
<dict>
|
||||||
|
<key>UIColorName</key>
|
||||||
|
<string></string>
|
||||||
|
<key>UIImageName</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
1
android-project/app/proguard-rules.pro
vendored
1
android-project/app/proguard-rules.pro
vendored
@@ -69,6 +69,7 @@
|
|||||||
|
|
||||||
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLControllerManager {
|
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLControllerManager {
|
||||||
void pollInputDevices();
|
void pollInputDevices();
|
||||||
|
void joystickSetLED(int, int, int, int);
|
||||||
void pollHapticDevices();
|
void pollHapticDevices();
|
||||||
void hapticRun(int, float, int);
|
void hapticRun(int, float, int);
|
||||||
void hapticRumble(int, float, float, int);
|
void hapticRumble(int, float, float, int);
|
||||||
|
|||||||
@@ -256,6 +256,7 @@ public class HIDDeviceManager {
|
|||||||
0x24c6, // PowerA
|
0x24c6, // PowerA
|
||||||
0x2c22, // Qanba
|
0x2c22, // Qanba
|
||||||
0x2dc8, // 8BitDo
|
0x2dc8, // 8BitDo
|
||||||
|
0x37d7, // Flydigi
|
||||||
0x9886, // ASTRO Gaming
|
0x9886, // ASTRO Gaming
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ import java.util.Locale;
|
|||||||
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
|
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
|
||||||
private static final String TAG = "SDL";
|
private static final String TAG = "SDL";
|
||||||
private static final int SDL_MAJOR_VERSION = 3;
|
private static final int SDL_MAJOR_VERSION = 3;
|
||||||
private static final int SDL_MINOR_VERSION = 3;
|
private static final int SDL_MINOR_VERSION = 4;
|
||||||
private static final int SDL_MICRO_VERSION = 2;
|
private static final int SDL_MICRO_VERSION = 6;
|
||||||
/*
|
/*
|
||||||
// Display InputType.SOURCE/CLASS of events and devices
|
// Display InputType.SOURCE/CLASS of events and devices
|
||||||
//
|
//
|
||||||
@@ -570,7 +570,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
public static int getNaturalOrientation() {
|
public static int getNaturalOrientation() {
|
||||||
int result = SDL_ORIENTATION_UNKNOWN;
|
int result = SDL_ORIENTATION_UNKNOWN;
|
||||||
|
|
||||||
Activity activity = (Activity)getContext();
|
Activity activity = getContext();
|
||||||
if (activity != null) {
|
if (activity != null) {
|
||||||
Configuration config = activity.getResources().getConfiguration();
|
Configuration config = activity.getResources().getConfiguration();
|
||||||
Display display = activity.getWindowManager().getDefaultDisplay();
|
Display display = activity.getWindowManager().getDefaultDisplay();
|
||||||
@@ -590,7 +590,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
public static int getCurrentRotation() {
|
public static int getCurrentRotation() {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
Activity activity = (Activity)getContext();
|
Activity activity = getContext();
|
||||||
if (activity != null) {
|
if (activity != null) {
|
||||||
Display display = activity.getWindowManager().getDefaultDisplay();
|
Display display = activity.getWindowManager().getDefaultDisplay();
|
||||||
switch (display.getRotation()) {
|
switch (display.getRotation()) {
|
||||||
@@ -1270,10 +1270,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
if (Build.MANUFACTURER.equals("MINIX") && Build.MODEL.equals("NEO-U1")) {
|
if (Build.MANUFACTURER.equals("MINIX") && Build.MODEL.equals("NEO-U1")) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.equals("X96-W")) {
|
if (Build.MANUFACTURER.equals("Amlogic") &&
|
||||||
return true;
|
(Build.MODEL.startsWith("TV") ||
|
||||||
}
|
Build.MODEL.equals("X96-W") ||
|
||||||
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.startsWith("TV")) {
|
Build.MODEL.equals("A95X-R1"))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -1292,7 +1292,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
public static double getDiagonal()
|
public static double getDiagonal()
|
||||||
{
|
{
|
||||||
DisplayMetrics metrics = new DisplayMetrics();
|
DisplayMetrics metrics = new DisplayMetrics();
|
||||||
Activity activity = (Activity)getContext();
|
Activity activity = getContext();
|
||||||
if (activity == null) {
|
if (activity == null) {
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
@@ -1940,7 +1940,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Activity activity = (Activity)getContext();
|
Activity activity = getContext();
|
||||||
if (activity.checkSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) {
|
if (activity.checkSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) {
|
||||||
activity.requestPermissions(new String[]{permission}, requestCode);
|
activity.requestPermissions(new String[]{permission}, requestCode);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -6,6 +6,11 @@ import java.util.Comparator;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.hardware.lights.Light;
|
||||||
|
import android.hardware.lights.LightsRequest;
|
||||||
|
import android.hardware.lights.LightsManager;
|
||||||
|
import android.hardware.lights.LightState;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.VibrationEffect;
|
import android.os.VibrationEffect;
|
||||||
import android.os.Vibrator;
|
import android.os.Vibrator;
|
||||||
@@ -25,7 +30,7 @@ public class SDLControllerManager
|
|||||||
static native void nativeAddJoystick(int device_id, String name, String desc,
|
static native void nativeAddJoystick(int device_id, String name, String desc,
|
||||||
int vendor_id, int product_id,
|
int vendor_id, int product_id,
|
||||||
int button_mask,
|
int button_mask,
|
||||||
int naxes, int axis_mask, int nhats, boolean can_rumble);
|
int naxes, int axis_mask, int nhats, boolean can_rumble, boolean has_rgb_led);
|
||||||
static native void nativeRemoveJoystick(int device_id);
|
static native void nativeRemoveJoystick(int device_id);
|
||||||
static native void nativeAddHaptic(int device_id, String name);
|
static native void nativeAddHaptic(int device_id, String name);
|
||||||
static native void nativeRemoveHaptic(int device_id);
|
static native void nativeRemoveHaptic(int device_id);
|
||||||
@@ -69,6 +74,13 @@ public class SDLControllerManager
|
|||||||
mJoystickHandler.pollInputDevices();
|
mJoystickHandler.pollInputDevices();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is called by SDL using JNI.
|
||||||
|
*/
|
||||||
|
static void joystickSetLED(int device_id, int red, int green, int blue) {
|
||||||
|
mJoystickHandler.setLED(device_id, red, green, blue);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is called by SDL using JNI.
|
* This method is called by SDL using JNI.
|
||||||
*/
|
*/
|
||||||
@@ -139,6 +151,8 @@ class SDLJoystickHandler {
|
|||||||
String desc;
|
String desc;
|
||||||
ArrayList<InputDevice.MotionRange> axes;
|
ArrayList<InputDevice.MotionRange> axes;
|
||||||
ArrayList<InputDevice.MotionRange> hats;
|
ArrayList<InputDevice.MotionRange> hats;
|
||||||
|
ArrayList<Light> lights;
|
||||||
|
LightsManager.LightsSession lightsSession;
|
||||||
}
|
}
|
||||||
static class RangeComparator implements Comparator<InputDevice.MotionRange> {
|
static class RangeComparator implements Comparator<InputDevice.MotionRange> {
|
||||||
@Override
|
@Override
|
||||||
@@ -197,7 +211,7 @@ class SDLJoystickHandler {
|
|||||||
/**
|
/**
|
||||||
* Handles adding and removing of input devices.
|
* Handles adding and removing of input devices.
|
||||||
*/
|
*/
|
||||||
void pollInputDevices() {
|
synchronized void pollInputDevices() {
|
||||||
int[] deviceIds = InputDevice.getDeviceIds();
|
int[] deviceIds = InputDevice.getDeviceIds();
|
||||||
|
|
||||||
for (int device_id : deviceIds) {
|
for (int device_id : deviceIds) {
|
||||||
@@ -211,6 +225,7 @@ class SDLJoystickHandler {
|
|||||||
joystick.desc = getJoystickDescriptor(joystickDevice);
|
joystick.desc = getJoystickDescriptor(joystickDevice);
|
||||||
joystick.axes = new ArrayList<InputDevice.MotionRange>();
|
joystick.axes = new ArrayList<InputDevice.MotionRange>();
|
||||||
joystick.hats = new ArrayList<InputDevice.MotionRange>();
|
joystick.hats = new ArrayList<InputDevice.MotionRange>();
|
||||||
|
joystick.lights = new ArrayList<Light>();
|
||||||
|
|
||||||
List<InputDevice.MotionRange> ranges = joystickDevice.getMotionRanges();
|
List<InputDevice.MotionRange> ranges = joystickDevice.getMotionRanges();
|
||||||
Collections.sort(ranges, new RangeComparator());
|
Collections.sort(ranges, new RangeComparator());
|
||||||
@@ -225,18 +240,30 @@ class SDLJoystickHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean can_rumble = false;
|
boolean can_rumble = false;
|
||||||
|
boolean has_rgb_led = false;
|
||||||
if (Build.VERSION.SDK_INT >= 31 /* Android 12.0 (S) */) {
|
if (Build.VERSION.SDK_INT >= 31 /* Android 12.0 (S) */) {
|
||||||
VibratorManager manager = joystickDevice.getVibratorManager();
|
VibratorManager vibratorManager = joystickDevice.getVibratorManager();
|
||||||
int[] vibrators = manager.getVibratorIds();
|
int[] vibrators = vibratorManager.getVibratorIds();
|
||||||
if (vibrators.length > 0) {
|
if (vibrators.length > 0) {
|
||||||
can_rumble = true;
|
can_rumble = true;
|
||||||
}
|
}
|
||||||
|
LightsManager lightsManager = joystickDevice.getLightsManager();
|
||||||
|
List<Light> lights = lightsManager.getLights();
|
||||||
|
for (Light light : lights) {
|
||||||
|
if (light.hasRgbControl()) {
|
||||||
|
joystick.lights.add(light);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!joystick.lights.isEmpty()) {
|
||||||
|
joystick.lightsSession = lightsManager.openSession();
|
||||||
|
has_rgb_led = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mJoysticks.add(joystick);
|
mJoysticks.add(joystick);
|
||||||
SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc,
|
SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc,
|
||||||
getVendorId(joystickDevice), getProductId(joystickDevice),
|
getVendorId(joystickDevice), getProductId(joystickDevice),
|
||||||
getButtonMask(joystickDevice), joystick.axes.size(), getAxisMask(joystick.axes), joystick.hats.size()/2, can_rumble);
|
getButtonMask(joystickDevice), joystick.axes.size(), getAxisMask(joystick.axes), joystick.hats.size()/2, can_rumble, has_rgb_led);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -262,6 +289,16 @@ class SDLJoystickHandler {
|
|||||||
SDLControllerManager.nativeRemoveJoystick(device_id);
|
SDLControllerManager.nativeRemoveJoystick(device_id);
|
||||||
for (int i = 0; i < mJoysticks.size(); i++) {
|
for (int i = 0; i < mJoysticks.size(); i++) {
|
||||||
if (mJoysticks.get(i).device_id == device_id) {
|
if (mJoysticks.get(i).device_id == device_id) {
|
||||||
|
if (Build.VERSION.SDK_INT >= 31 /* Android 12.0 (S) */) {
|
||||||
|
if (mJoysticks.get(i).lightsSession != null) {
|
||||||
|
try {
|
||||||
|
mJoysticks.get(i).lightsSession.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
// Session may already be unregistered when device disconnects
|
||||||
|
}
|
||||||
|
mJoysticks.get(i).lightsSession = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
mJoysticks.remove(i);
|
mJoysticks.remove(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -270,7 +307,7 @@ class SDLJoystickHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected SDLJoystick getJoystick(int device_id) {
|
synchronized protected SDLJoystick getJoystick(int device_id) {
|
||||||
for (SDLJoystick joystick : mJoysticks) {
|
for (SDLJoystick joystick : mJoysticks) {
|
||||||
if (joystick.device_id == device_id) {
|
if (joystick.device_id == device_id) {
|
||||||
return joystick;
|
return joystick;
|
||||||
@@ -453,6 +490,24 @@ class SDLJoystickHandler {
|
|||||||
}
|
}
|
||||||
return button_mask;
|
return button_mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setLED(int device_id, int red, int green, int blue) {
|
||||||
|
if (Build.VERSION.SDK_INT < 31 /* Android 12.0 (S) */) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SDLJoystick joystick = getJoystick(device_id);
|
||||||
|
if (joystick == null || joystick.lights.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
LightsRequest.Builder lightsRequest = new LightsRequest.Builder();
|
||||||
|
LightState lightState = new LightState.Builder().setColor(Color.rgb(red, green, blue)).build();
|
||||||
|
for (Light light : joystick.lights) {
|
||||||
|
if (light.hasRgbControl()) {
|
||||||
|
lightsRequest.addLight(light, lightState);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
joystick.lightsSession.requestLights(lightsRequest.build());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SDLHapticHandler_API31 extends SDLHapticHandler {
|
class SDLHapticHandler_API31 extends SDLHapticHandler {
|
||||||
@@ -587,7 +642,7 @@ class SDLHapticHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void pollHapticDevices() {
|
synchronized void pollHapticDevices() {
|
||||||
|
|
||||||
final int deviceId_VIBRATOR_SERVICE = 999999;
|
final int deviceId_VIBRATOR_SERVICE = 999999;
|
||||||
boolean hasVibratorService = false;
|
boolean hasVibratorService = false;
|
||||||
@@ -635,7 +690,7 @@ class SDLHapticHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected SDLHaptic getHaptic(int device_id) {
|
synchronized protected SDLHaptic getHaptic(int device_id) {
|
||||||
for (SDLHaptic haptic : mHaptics) {
|
for (SDLHaptic haptic : mHaptics) {
|
||||||
if (haptic.device_id == device_id) {
|
if (haptic.device_id == device_id) {
|
||||||
return haptic;
|
return haptic;
|
||||||
@@ -700,6 +755,9 @@ class SDLGenericMotionListener_API14 implements View.OnGenericMotionListener {
|
|||||||
|
|
||||||
// BUTTON_STYLUS_PRIMARY is 2^5, so shift by 4, and apply SDL_PEN_INPUT_DOWN/SDL_PEN_INPUT_ERASER_TIP
|
// 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));
|
int buttons = (event.getButtonState() >> 4) | (1 << (toolType == MotionEvent.TOOL_TYPE_STYLUS ? 0 : 30));
|
||||||
|
if ((event.getButtonState() & MotionEvent.BUTTON_TERTIARY) != 0) {
|
||||||
|
buttons |= 0x08;
|
||||||
|
}
|
||||||
|
|
||||||
SDLActivity.onNativePen(event.getPointerId(i), getPenDeviceType(event.getDevice()), buttons, action, x, y, p);
|
SDLActivity.onNativePen(event.getPointerId(i), getPenDeviceType(event.getDevice()), buttons, action, x, y, p);
|
||||||
consumed = true;
|
consumed = true;
|
||||||
|
|||||||
@@ -65,17 +65,15 @@ class SDLInputConnection extends BaseInputConnection
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean deleteSurroundingText(int beforeLength, int afterLength) {
|
public boolean deleteSurroundingText(int beforeLength, int afterLength) {
|
||||||
if (Build.VERSION.SDK_INT <= 29 /* Android 10.0 (Q) */) {
|
// Workaround to capture backspace key. Ref: http://stackoverflow.com/questions>/14560344/android-backspace-in-webview-baseinputconnection
|
||||||
// Workaround to capture backspace key. Ref: http://stackoverflow.com/questions>/14560344/android-backspace-in-webview-baseinputconnection
|
// and https://bugzilla.libsdl.org/show_bug.cgi?id=2265
|
||||||
// and https://bugzilla.libsdl.org/show_bug.cgi?id=2265
|
if (beforeLength > 0 && afterLength == 0) {
|
||||||
if (beforeLength > 0 && afterLength == 0) {
|
// backspace(s)
|
||||||
// backspace(s)
|
while (beforeLength-- > 0) {
|
||||||
while (beforeLength-- > 0) {
|
nativeGenerateScancodeForUnichar('\b');
|
||||||
nativeGenerateScancodeForUnichar('\b');
|
}
|
||||||
}
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!super.deleteSurroundingText(beforeLength, afterLength)) {
|
if (!super.deleteSurroundingText(beforeLength, afterLength)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||||||
// Is SurfaceView ready for rendering
|
// Is SurfaceView ready for rendering
|
||||||
protected boolean mIsSurfaceReady;
|
protected boolean mIsSurfaceReady;
|
||||||
|
|
||||||
|
// Is on-screen keyboard visible
|
||||||
|
protected boolean mKeyboardVisible;
|
||||||
|
|
||||||
// Pinch events
|
// Pinch events
|
||||||
private final ScaleGestureDetector scaleGestureDetector;
|
private final ScaleGestureDetector scaleGestureDetector;
|
||||||
|
|
||||||
@@ -208,6 +211,18 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||||||
WindowInsets.Type.displayCutout());
|
WindowInsets.Type.displayCutout());
|
||||||
|
|
||||||
SDLActivity.onNativeInsetsChanged(combined.left, combined.right, combined.top, combined.bottom);
|
SDLActivity.onNativeInsetsChanged(combined.left, combined.right, combined.top, combined.bottom);
|
||||||
|
|
||||||
|
if (insets.isVisible(WindowInsets.Type.ime())) {
|
||||||
|
if (!mKeyboardVisible) {
|
||||||
|
mKeyboardVisible = true;
|
||||||
|
SDLActivity.onNativeScreenKeyboardShown();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (mKeyboardVisible) {
|
||||||
|
mKeyboardVisible = false;
|
||||||
|
SDLActivity.onNativeScreenKeyboardHidden();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pass these to any child views in case they need them
|
// Pass these to any child views in case they need them
|
||||||
@@ -280,6 +295,9 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||||||
|
|
||||||
// BUTTON_STYLUS_PRIMARY is 2^5, so shift by 4, and apply SDL_PEN_INPUT_DOWN/SDL_PEN_INPUT_ERASER_TIP
|
// BUTTON_STYLUS_PRIMARY is 2^5, so shift by 4, and apply SDL_PEN_INPUT_DOWN/SDL_PEN_INPUT_ERASER_TIP
|
||||||
int buttonState = (event.getButtonState() >> 4) | (1 << (toolType == MotionEvent.TOOL_TYPE_STYLUS ? 0 : 30));
|
int buttonState = (event.getButtonState() >> 4) | (1 << (toolType == MotionEvent.TOOL_TYPE_STYLUS ? 0 : 30));
|
||||||
|
if ((event.getButtonState() & MotionEvent.BUTTON_TERTIARY) != 0) {
|
||||||
|
buttonState |= 0x08;
|
||||||
|
}
|
||||||
|
|
||||||
SDLActivity.onNativePen(pointerId, SDLActivity.getMotionListener().getPenDeviceType(event.getDevice()), buttonState, action, x, y, p);
|
SDLActivity.onNativePen(pointerId, SDLActivity.getMotionListener().getPenDeviceType(event.getDevice()), buttonState, action, x, y, p);
|
||||||
} else { // MotionEvent.TOOL_TYPE_FINGER or MotionEvent.TOOL_TYPE_UNKNOWN
|
} else { // MotionEvent.TOOL_TYPE_FINGER or MotionEvent.TOOL_TYPE_UNKNOWN
|
||||||
|
|||||||
@@ -267,8 +267,12 @@ class Archiver:
|
|||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
# Archiver is intentionally made invalid after this function
|
# Archiver is intentionally made invalid after this function
|
||||||
|
for zf in self._zip_files:
|
||||||
|
zf.close()
|
||||||
del self._zip_files
|
del self._zip_files
|
||||||
self._zip_files = None
|
self._zip_files = None
|
||||||
|
for tf in self._tar_files:
|
||||||
|
tf.close()
|
||||||
del self._tar_files
|
del self._tar_files
|
||||||
self._tar_files = None
|
self._tar_files = None
|
||||||
|
|
||||||
@@ -1028,6 +1032,7 @@ class Releaser:
|
|||||||
# NDK 21e does not support -ffile-prefix-map
|
# NDK 21e does not support -ffile-prefix-map
|
||||||
# f'''-DCMAKE_C_FLAGS="-ffile-prefix-map={self.root}=/src/{self.project}"''',
|
# f'''-DCMAKE_C_FLAGS="-ffile-prefix-map={self.root}=/src/{self.project}"''',
|
||||||
# f'''-DCMAKE_CXX_FLAGS="-ffile-prefix-map={self.root}=/src/{self.project}"''',
|
# f'''-DCMAKE_CXX_FLAGS="-ffile-prefix-map={self.root}=/src/{self.project}"''',
|
||||||
|
f"-DANDROID_USE_LEGACY_TOOLCHAIN=0",
|
||||||
f"-DCMAKE_EXE_LINKER_FLAGS={extra_link_options}",
|
f"-DCMAKE_EXE_LINKER_FLAGS={extra_link_options}",
|
||||||
f"-DCMAKE_SHARED_LINKER_FLAGS={extra_link_options}",
|
f"-DCMAKE_SHARED_LINKER_FLAGS={extra_link_options}",
|
||||||
f"-DCMAKE_TOOLCHAIN_FILE={cmake_toolchain_file}",
|
f"-DCMAKE_TOOLCHAIN_FILE={cmake_toolchain_file}",
|
||||||
@@ -1126,8 +1131,7 @@ class Releaser:
|
|||||||
for dep, depinfo in self.release_info.get("dependencies", {}).items():
|
for dep, depinfo in self.release_info.get("dependencies", {}).items():
|
||||||
startswith = depinfo["startswith"]
|
startswith = depinfo["startswith"]
|
||||||
dep_repo = depinfo["repo"]
|
dep_repo = depinfo["repo"]
|
||||||
# FIXME: dropped "--exclude-pre-releases"
|
dep_string_data = self.executer.check_output(["gh", "-R", dep_repo, "release", "list", "--exclude-drafts", "--exclude-pre-releases", "--json", "name,createdAt,tagName", "--jq", f'[.[]|select(.name|startswith("{startswith}"))]|max_by(.createdAt)']).strip()
|
||||||
dep_string_data = self.executer.check_output(["gh", "-R", dep_repo, "release", "list", "--exclude-drafts", "--json", "name,createdAt,tagName", "--jq", f'[.[]|select(.name|startswith("{startswith}"))]|max_by(.createdAt)']).strip()
|
|
||||||
dep_data = json.loads(dep_string_data)
|
dep_data = json.loads(dep_string_data)
|
||||||
dep_tag = dep_data["tagName"]
|
dep_tag = dep_data["tagName"]
|
||||||
dep_version = dep_data["name"]
|
dep_version = dep_data["name"]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
# Simple DirectMedia Layer
|
# Simple DirectMedia Layer
|
||||||
# Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
# Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
#
|
#
|
||||||
# This software is provided 'as-is', without any express or implied
|
# This software is provided 'as-is', without any express or implied
|
||||||
# warranty. In no event will the authors be held liable for any damages
|
# warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
#
|
#
|
||||||
# Simple DirectMedia Layer
|
# Simple DirectMedia Layer
|
||||||
# Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
# Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
#
|
#
|
||||||
# This software is provided 'as-is', without any express or implied
|
# This software is provided 'as-is', without any express or implied
|
||||||
# warranty. In no event will the authors be held liable for any damages
|
# warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -29,7 +29,7 @@ import sys
|
|||||||
|
|
||||||
SDL_ROOT = pathlib.Path(__file__).resolve().parents[1]
|
SDL_ROOT = pathlib.Path(__file__).resolve().parents[1]
|
||||||
|
|
||||||
STDLIB_SYMBOLS = [
|
STDLIB_SYMBOLS = (
|
||||||
'abs',
|
'abs',
|
||||||
'acos',
|
'acos',
|
||||||
'acosf',
|
'acosf',
|
||||||
@@ -147,8 +147,8 @@ STDLIB_SYMBOLS = [
|
|||||||
'wcsncasecmp',
|
'wcsncasecmp',
|
||||||
'wcsncmp',
|
'wcsncmp',
|
||||||
'wcsstr',
|
'wcsstr',
|
||||||
]
|
)
|
||||||
RE_STDLIB_SYMBOL = re.compile(rf"\b(?P<symbol>{'|'.join(STDLIB_SYMBOLS)})\b\(")
|
RE_STDLIB_SYMBOL = re.compile(rf"(?<!->)\b(?P<symbol>{'|'.join(STDLIB_SYMBOLS)})\b\(")
|
||||||
|
|
||||||
|
|
||||||
def find_symbols_in_file(file: pathlib.Path) -> int:
|
def find_symbols_in_file(file: pathlib.Path) -> int:
|
||||||
@@ -220,13 +220,19 @@ def find_symbols_in_file(file: pathlib.Path) -> int:
|
|||||||
line_comment += line[pos_line_comment:]
|
line_comment += line[pos_line_comment:]
|
||||||
line = line[:pos_line_comment]
|
line = line[:pos_line_comment]
|
||||||
|
|
||||||
if m := RE_STDLIB_SYMBOL.match(line):
|
if matches := tuple(RE_STDLIB_SYMBOL.finditer(line)):
|
||||||
override_string = f"This should NOT be SDL_{m['symbol']}()"
|
text_string = " or ".join(f"SDL_{m.group(1)}" for m in matches)
|
||||||
if override_string not in line_comment:
|
first_quote = line.find("\"")
|
||||||
print(f"{filename}:{line_i}")
|
last_quote = line.rfind("\"")
|
||||||
print(f" {line}")
|
first_occurrence = min(m.span()[0] for m in matches)
|
||||||
print(f"")
|
last_occurrence = max(m.span()[1] for m in matches)
|
||||||
match_count += 1
|
if first_quote == -1 or not (first_quote < first_occurrence and last_quote > last_occurrence):
|
||||||
|
override_string = f"This should NOT be {text_string}"
|
||||||
|
if override_string not in line_comment:
|
||||||
|
print(f"{filename}:{line_i}")
|
||||||
|
print(f" {line}")
|
||||||
|
print(f"")
|
||||||
|
match_count += 1
|
||||||
|
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
print(f"{file} is not text, skipping", file=sys.stderr)
|
print(f"{file} is not text, skipping", file=sys.stderr)
|
||||||
@@ -235,7 +241,7 @@ def find_symbols_in_file(file: pathlib.Path) -> int:
|
|||||||
|
|
||||||
def find_symbols_in_dir(path: pathlib.Path) -> int:
|
def find_symbols_in_dir(path: pathlib.Path) -> int:
|
||||||
match_count = 0
|
match_count = 0
|
||||||
for entry in path.glob("*"):
|
for entry in path.iterdir():
|
||||||
if entry.is_dir():
|
if entry.is_dir():
|
||||||
match_count += find_symbols_in_dir(entry)
|
match_count += find_symbols_in_dir(entry)
|
||||||
else:
|
else:
|
||||||
@@ -249,7 +255,10 @@ def main():
|
|||||||
|
|
||||||
print(f"Looking for stdlib usage in {args.path}...")
|
print(f"Looking for stdlib usage in {args.path}...")
|
||||||
|
|
||||||
match_count = find_symbols_in_dir(args.path)
|
if args.path.is_file():
|
||||||
|
match_count = find_symbols_in_file(args.path)
|
||||||
|
else:
|
||||||
|
match_count = find_symbols_in_dir(args.path)
|
||||||
|
|
||||||
if match_count:
|
if match_count:
|
||||||
print("If the stdlib usage is intentional, add a '// This should NOT be SDL_<symbol>()' line comment.")
|
print("If the stdlib usage is intentional, add a '// This should NOT be SDL_<symbol>()' line comment.")
|
||||||
|
|||||||
142
build-scripts/create_tbds.py
Executable file
142
build-scripts/create_tbds.py
Executable file
@@ -0,0 +1,142 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import dataclasses
|
||||||
|
import enum
|
||||||
|
from pathlib import Path
|
||||||
|
import json
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import tempfile
|
||||||
|
|
||||||
|
|
||||||
|
SDL_ROOT = Path(__file__).resolve().parents[1]
|
||||||
|
|
||||||
|
|
||||||
|
@dataclasses.dataclass
|
||||||
|
class TbdInfo:
|
||||||
|
install_name: str
|
||||||
|
target_infos: list[dict[str, str]]
|
||||||
|
|
||||||
|
|
||||||
|
class TbdPlatform(enum.StrEnum):
|
||||||
|
MACOS = "macOS"
|
||||||
|
IOS = "iOS"
|
||||||
|
|
||||||
|
|
||||||
|
TBDINFOS = {
|
||||||
|
TbdPlatform.MACOS: TbdInfo(
|
||||||
|
install_name="@rpath/SDL3.framework/Versions/A/SDL3",
|
||||||
|
target_infos=[
|
||||||
|
{
|
||||||
|
"min_deployment": "10.13",
|
||||||
|
"target": "arm64-macos",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"min_deployment": "10.13",
|
||||||
|
"target": "x86_64-macos",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
),
|
||||||
|
TbdPlatform.IOS: TbdInfo(
|
||||||
|
install_name="@rpath/SDL3.framework/SDL3",
|
||||||
|
target_infos=[
|
||||||
|
{
|
||||||
|
"min_deployment": "11.0",
|
||||||
|
"target": "arm64-ios",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"min_deployment": "11.0",
|
||||||
|
"target": "arm64-ios-simulator",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"min_deployment": "11.0",
|
||||||
|
"target": "x86_64-ios-simulator",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"min_deployment": "11.0",
|
||||||
|
"target": "arm64-tvos",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"min_deployment": "11.0",
|
||||||
|
"target": "arm64-tvos-simulator",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"min_deployment": "11.0",
|
||||||
|
"target": "x86_64-tvos-simulator",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"min_deployment": "1.3",
|
||||||
|
"target": "arm64-xros",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"min_deployment": "1.3",
|
||||||
|
"target": "arm64-xros-simulator",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
||||||
|
def create_sdl3_tbd(symbols: list[str], tbd_info: TbdInfo):
|
||||||
|
return {
|
||||||
|
"main_library": {
|
||||||
|
"compatibility_versions": [
|
||||||
|
{
|
||||||
|
"version": "201"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"current_versions": [
|
||||||
|
{
|
||||||
|
"version": "201"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"exported_symbols": [
|
||||||
|
{
|
||||||
|
"text": {
|
||||||
|
"global": symbols
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"flags": [
|
||||||
|
{
|
||||||
|
"attributes": [
|
||||||
|
"not_app_extension_safe"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"install_names": [
|
||||||
|
{
|
||||||
|
"name": tbd_info.install_name
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"target_info": tbd_info.target_infos
|
||||||
|
},
|
||||||
|
"tapi_tbd_version": 5
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = argparse.ArgumentParser(allow_abbrev=False)
|
||||||
|
parser.add_argument("--output", "-o", type=Path, help="Output path (default is stdout)")
|
||||||
|
parser.add_argument("--platform", type=TbdPlatform, required=True,
|
||||||
|
choices=[str(e) for e in TbdPlatform], help="Apple Platform")
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
with tempfile.NamedTemporaryFile() as f_temp:
|
||||||
|
f_temp.close()
|
||||||
|
subprocess.check_call([sys.executable,SDL_ROOT / "src/dynapi/gendynapi.py", "--dump", f_temp.name],
|
||||||
|
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||||
|
with open(f_temp.name) as f_json:
|
||||||
|
sdl3_json = json.load(f_json)
|
||||||
|
|
||||||
|
sdl3_macos_symbols = [f"_{symbol_info['name']}" for symbol_info in sdl3_json]
|
||||||
|
sdl3_macos_symbols.sort()
|
||||||
|
|
||||||
|
tbd = create_sdl3_tbd(symbols=sdl3_macos_symbols, tbd_info=TBDINFOS[args.platform])
|
||||||
|
with (args.output.open("w", newline="") if args.output else sys.stdout) as f_out:
|
||||||
|
json.dump(tbd, fp=f_out, indent=2)
|
||||||
|
f_out.write("\n")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -406,7 +406,7 @@ int main(void)
|
|||||||
printf(
|
printf(
|
||||||
"/*\n"
|
"/*\n"
|
||||||
" Simple DirectMedia Layer\n"
|
" Simple DirectMedia Layer\n"
|
||||||
" Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>\n"
|
" Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>\n"
|
||||||
"\n"
|
"\n"
|
||||||
" This software is provided 'as-is', without any express or implied\n"
|
" This software is provided 'as-is', without any express or implied\n"
|
||||||
" warranty. In no event will the authors be held liable for any damages\n"
|
" warranty. In no event will the authors be held liable for any damages\n"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
# Simple DirectMedia Layer
|
# Simple DirectMedia Layer
|
||||||
# Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
# Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
#
|
#
|
||||||
# This software is provided 'as-is', without any express or implied
|
# This software is provided 'as-is', without any express or implied
|
||||||
# warranty. In no event will the authors be held liable for any damages
|
# warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -36,7 +36,7 @@ my $mem_used = 0;
|
|||||||
print <<__EOF__;
|
print <<__EOF__;
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken\@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken\@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
@@ -1,162 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
# mkinstalldirs --- make directory hierarchy
|
|
||||||
|
|
||||||
scriptversion=2020-07-26.22; # UTC
|
|
||||||
|
|
||||||
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
|
||||||
# Created: 1993-05-16
|
|
||||||
# Public domain.
|
|
||||||
#
|
|
||||||
# This file is maintained in Automake, please report
|
|
||||||
# bugs to <bug-automake@gnu.org> or send patches to
|
|
||||||
# <automake-patches@gnu.org>.
|
|
||||||
|
|
||||||
nl='
|
|
||||||
'
|
|
||||||
IFS=" "" $nl"
|
|
||||||
errstatus=0
|
|
||||||
dirmode=
|
|
||||||
|
|
||||||
usage="\
|
|
||||||
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
|
|
||||||
|
|
||||||
Create each directory DIR (with mode MODE, if specified), including all
|
|
||||||
leading file name components.
|
|
||||||
|
|
||||||
Report bugs to <bug-automake@gnu.org>."
|
|
||||||
|
|
||||||
# process command line arguments
|
|
||||||
while test $# -gt 0 ; do
|
|
||||||
case $1 in
|
|
||||||
-h | --help | --h*) # -h for help
|
|
||||||
echo "$usage"
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
-m) # -m PERM arg
|
|
||||||
shift
|
|
||||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
|
||||||
dirmode=$1
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--version)
|
|
||||||
echo "$0 $scriptversion"
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
--) # stop option processing
|
|
||||||
shift
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
-*) # unknown option
|
|
||||||
echo "$usage" 1>&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
*) # first non-opt arg
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
for file
|
|
||||||
do
|
|
||||||
if test -d "$file"; then
|
|
||||||
shift
|
|
||||||
else
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
case $# in
|
|
||||||
0) exit 0 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
|
|
||||||
# mkdir -p a/c at the same time, both will detect that a is missing,
|
|
||||||
# one will create a, then the other will try to create a and die with
|
|
||||||
# a "File exists" error. This is a problem when calling mkinstalldirs
|
|
||||||
# from a parallel make. We use --version in the probe to restrict
|
|
||||||
# ourselves to GNU mkdir, which is thread-safe.
|
|
||||||
case $dirmode in
|
|
||||||
'')
|
|
||||||
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
|
||||||
echo "mkdir -p -- $*"
|
|
||||||
exec mkdir -p -- "$@"
|
|
||||||
else
|
|
||||||
# On NextStep and OpenStep, the 'mkdir' command does not
|
|
||||||
# recognize any option. It will interpret all options as
|
|
||||||
# directories to create, and then abort because '.' already
|
|
||||||
# exists.
|
|
||||||
test -d ./-p && rmdir ./-p
|
|
||||||
test -d ./--version && rmdir ./--version
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
|
|
||||||
test ! -d ./--version; then
|
|
||||||
echo "umask 22"
|
|
||||||
umask 22
|
|
||||||
echo "mkdir -m $dirmode -p -- $*"
|
|
||||||
exec mkdir -m "$dirmode" -p -- "$@"
|
|
||||||
else
|
|
||||||
# Clean up after NextStep and OpenStep mkdir.
|
|
||||||
for d in ./-m ./-p ./--version "./$dirmode";
|
|
||||||
do
|
|
||||||
test -d $d && rmdir $d
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo "umask 22"
|
|
||||||
umask 22
|
|
||||||
|
|
||||||
for file
|
|
||||||
do
|
|
||||||
case $file in
|
|
||||||
/*) pathcomp=/ ;;
|
|
||||||
*) pathcomp= ;;
|
|
||||||
esac
|
|
||||||
oIFS=$IFS
|
|
||||||
IFS=/
|
|
||||||
set fnord $file
|
|
||||||
shift
|
|
||||||
IFS=$oIFS
|
|
||||||
|
|
||||||
for d
|
|
||||||
do
|
|
||||||
test "x$d" = x && continue
|
|
||||||
|
|
||||||
pathcomp=$pathcomp$d
|
|
||||||
case $pathcomp in
|
|
||||||
-*) pathcomp=./$pathcomp ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test ! -d "$pathcomp"; then
|
|
||||||
echo "mkdir $pathcomp"
|
|
||||||
|
|
||||||
mkdir "$pathcomp" || lasterr=$?
|
|
||||||
|
|
||||||
if test ! -d "$pathcomp"; then
|
|
||||||
errstatus=$lasterr
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
pathcomp=$pathcomp/
|
|
||||||
done
|
|
||||||
|
|
||||||
if test ! -z "$dirmode"; then
|
|
||||||
echo "chmod $dirmode $file"
|
|
||||||
chmod "$dirmode" "$file" || errstatus=$?
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
exit $errstatus
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# mode: shell-script
|
|
||||||
# sh-indentation: 2
|
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC0"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -33,9 +33,9 @@
|
|||||||
#cmakedefine SDL_VENDOR_INFO "@SDL_VENDOR_INFO@"
|
#cmakedefine SDL_VENDOR_INFO "@SDL_VENDOR_INFO@"
|
||||||
|
|
||||||
#if defined(SDL_VENDOR_INFO)
|
#if defined(SDL_VENDOR_INFO)
|
||||||
#define SDL_REVISION "@<@PROJECT_REVISION@>@ (" SDL_VENDOR_INFO ")"
|
#define SDL_REVISION "SDL-@<@PROJECT_REVISION@>@ (" SDL_VENDOR_INFO ")"
|
||||||
#else
|
#else
|
||||||
#define SDL_REVISION "@<@PROJECT_REVISION@>@"
|
#define SDL_REVISION "SDL-@<@PROJECT_REVISION@>@"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* SDL_revision_h_ */
|
#endif /* SDL_revision_h_ */
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -48,9 +48,9 @@
|
|||||||
*/
|
*/
|
||||||
#define SDL_REVISION "Some arbitrary string decided at SDL build time"
|
#define SDL_REVISION "Some arbitrary string decided at SDL build time"
|
||||||
#elif defined(SDL_VENDOR_INFO)
|
#elif defined(SDL_VENDOR_INFO)
|
||||||
#define SDL_REVISION "@<@PROJECT_REVISION@>@ (" SDL_VENDOR_INFO ")"
|
#define SDL_REVISION "SDL-@<@PROJECT_REVISION@>@ (" SDL_VENDOR_INFO ")"
|
||||||
#else
|
#else
|
||||||
#define SDL_REVISION "@<@PROJECT_REVISION@>@"
|
#define SDL_REVISION "SDL-@<@PROJECT_REVISION@>@"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* SDL_revision_h_ */
|
#endif /* SDL_revision_h_ */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
# Simple DirectMedia Layer
|
# Simple DirectMedia Layer
|
||||||
# Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
# Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
#
|
#
|
||||||
# This software is provided 'as-is', without any express or implied
|
# This software is provided 'as-is', without any express or implied
|
||||||
# warranty. In no event will the authors be held liable for any damages
|
# warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -37,6 +37,11 @@ my $versionfname = 'include/SDL_version.h';
|
|||||||
my $versionmajorregex = '\A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z';
|
my $versionmajorregex = '\A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z';
|
||||||
my $versionminorregex = '\A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z';
|
my $versionminorregex = '\A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z';
|
||||||
my $versionmicroregex = '\A\#define\s+SDL_MICRO_VERSION\s+(\d+)\Z';
|
my $versionmicroregex = '\A\#define\s+SDL_MICRO_VERSION\s+(\d+)\Z';
|
||||||
|
my $wikidocsectionsym = 'SDL_WIKI_DOCUMENTATION_SECTION';
|
||||||
|
my $forceinlinesym = 'SDL_FORCE_INLINE';
|
||||||
|
my $deprecatedsym = 'SDL_DEPRECATED';
|
||||||
|
my $declspecsym = '(?:SDLMAIN_|SDL_)?DECLSPEC';
|
||||||
|
my $callconvsym = 'SDLCALL';
|
||||||
my $mainincludefname = 'SDL.h';
|
my $mainincludefname = 'SDL.h';
|
||||||
my $selectheaderregex = '\ASDL.*?\.h\Z';
|
my $selectheaderregex = '\ASDL.*?\.h\Z';
|
||||||
my $projecturl = 'https://libsdl.org/';
|
my $projecturl = 'https://libsdl.org/';
|
||||||
@@ -147,6 +152,12 @@ if (defined $optionsfname) {
|
|||||||
$envvardesc = $val, next if $key eq 'envvardesc';
|
$envvardesc = $val, next if $key eq 'envvardesc';
|
||||||
$envvarsymregex = $val, next if $key eq 'envvarsymregex';
|
$envvarsymregex = $val, next if $key eq 'envvarsymregex';
|
||||||
$envvarsymreplace = $val, next if $key eq 'envvarsymreplace';
|
$envvarsymreplace = $val, next if $key eq 'envvarsymreplace';
|
||||||
|
$wikidocsectionsym = $val, next if $key eq 'wikidocsectionsym';
|
||||||
|
$forceinlinesym = $val, next if $key eq 'forceinlinesym';
|
||||||
|
$deprecatedsym = $val, next if $key eq 'deprecatedsym';
|
||||||
|
$declspecsym = $val, next if $key eq 'declspecsym';
|
||||||
|
$callconvsym = $val, next if $key eq 'callconvsym';
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close(OPTIONS);
|
close(OPTIONS);
|
||||||
@@ -750,6 +761,7 @@ sub print_undocumented_section {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# !!! FIXME: generalize this for other libraries to use.
|
||||||
sub strip_fn_declaration_metadata {
|
sub strip_fn_declaration_metadata {
|
||||||
my $decl = shift;
|
my $decl = shift;
|
||||||
$decl =~ s/SDL_(PRINTF|SCANF)_FORMAT_STRING\s*//; # don't want this metadata as part of the documentation.
|
$decl =~ s/SDL_(PRINTF|SCANF)_FORMAT_STRING\s*//; # don't want this metadata as part of the documentation.
|
||||||
@@ -1153,7 +1165,7 @@ while (my $d = readdir(DH)) {
|
|||||||
} elsif ($ignoring_lines) {
|
} elsif ($ignoring_lines) {
|
||||||
push @contents, $_;
|
push @contents, $_;
|
||||||
next;
|
next;
|
||||||
} elsif (/\A\s*\#\s*ifndef\s+SDL_WIKI_DOCUMENTATION_SECTION\s*\Z/) {
|
} elsif (/\A\s*\#\s*ifndef\s+$wikidocsectionsym\s*\Z/) {
|
||||||
$ignoring_lines = 1;
|
$ignoring_lines = 1;
|
||||||
push @contents, $_;
|
push @contents, $_;
|
||||||
next;
|
next;
|
||||||
@@ -1162,13 +1174,13 @@ while (my $d = readdir(DH)) {
|
|||||||
#print("CATEGORY FOR '$dent' CHANGED TO " . (defined($current_wiki_category) ? "'$current_wiki_category'" : '(undef)') . "\n");
|
#print("CATEGORY FOR '$dent' CHANGED TO " . (defined($current_wiki_category) ? "'$current_wiki_category'" : '(undef)') . "\n");
|
||||||
push @contents, $_;
|
push @contents, $_;
|
||||||
next;
|
next;
|
||||||
} elsif (/\A\s*extern\s+(SDL_DEPRECATED\s+|)(SDLMAIN_|SDL_)?DECLSPEC/) { # a function declaration without a doxygen comment?
|
} elsif (/\A\s*extern\s+(?:$deprecatedsym\s+|)$declspecsym/) { # a function declaration without a doxygen comment?
|
||||||
$symtype = 1; # function declaration
|
$symtype = 1; # function declaration
|
||||||
@templines = ();
|
@templines = ();
|
||||||
$decl = $_;
|
$decl = $_;
|
||||||
$str = '';
|
$str = '';
|
||||||
$has_doxygen = 0;
|
$has_doxygen = 0;
|
||||||
} elsif (/\A\s*SDL_FORCE_INLINE/) { # a (forced-inline) function declaration without a doxygen comment?
|
} elsif (/\A\s*$forceinlinesym/) { # a (forced-inline) function declaration without a doxygen comment?
|
||||||
$symtype = 1; # function declaration
|
$symtype = 1; # function declaration
|
||||||
@templines = ();
|
@templines = ();
|
||||||
$decl = $_;
|
$decl = $_;
|
||||||
@@ -1235,9 +1247,9 @@ while (my $d = readdir(DH)) {
|
|||||||
$lineno++ if defined $decl;
|
$lineno++ if defined $decl;
|
||||||
$decl = '' if not defined $decl;
|
$decl = '' if not defined $decl;
|
||||||
chomp($decl);
|
chomp($decl);
|
||||||
if ($decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)(SDLMAIN_|SDL_)?DECLSPEC/) {
|
if ($decl =~ /\A\s*extern\s+(?:$deprecatedsym\s+|)$declspecsym/) {
|
||||||
$symtype = 1; # function declaration
|
$symtype = 1; # function declaration
|
||||||
} elsif ($decl =~ /\A\s*SDL_FORCE_INLINE/) {
|
} elsif ($decl =~ /\A\s*$forceinlinesym/) {
|
||||||
$symtype = 1; # (forced-inline) function declaration
|
$symtype = 1; # (forced-inline) function declaration
|
||||||
} elsif ($decl =~ /\A\s*\#\s*define\s+/) {
|
} elsif ($decl =~ /\A\s*\#\s*define\s+/) {
|
||||||
$symtype = 2; # macro
|
$symtype = 2; # macro
|
||||||
@@ -1274,7 +1286,7 @@ while (my $d = readdir(DH)) {
|
|||||||
}
|
}
|
||||||
$headercategorydocs{$current_wiki_category} = $sym;
|
$headercategorydocs{$current_wiki_category} = $sym;
|
||||||
} elsif ($symtype == 1) { # a function
|
} elsif ($symtype == 1) { # a function
|
||||||
my $is_forced_inline = ($decl =~ /\A\s*SDL_FORCE_INLINE/);
|
my $is_forced_inline = ($decl =~ /\A\s*$forceinlinesym/);
|
||||||
|
|
||||||
if ($is_forced_inline) {
|
if ($is_forced_inline) {
|
||||||
if (not $decl =~ /\)\s*(\{.*|)\s*\Z/) {
|
if (not $decl =~ /\)\s*(\{.*|)\s*\Z/) {
|
||||||
@@ -1311,14 +1323,14 @@ while (my $d = readdir(DH)) {
|
|||||||
|
|
||||||
my $paramsstr = undef;
|
my $paramsstr = undef;
|
||||||
|
|
||||||
if (!$is_forced_inline && $decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)(SDLMAIN_|SDL_)?DECLSPEC\w*\s+(const\s+|)(unsigned\s+|)(.*?)([\*\s]+)(\*?)\s*SDLCALL\s+(.*?)\s*\((.*?)\);/) {
|
if (!$is_forced_inline && $decl =~ /\A\s*extern\s+(?:$deprecatedsym\s+|)$declspecsym\w*\s+(const\s+|)(unsigned\s+|)(.*?)([\*\s]+)(\*?)\s*$callconvsym\s+(.*?)\s*\((.*?)\);/) {
|
||||||
$sym = $8;
|
|
||||||
$rettype = "$3$4$5$6";
|
|
||||||
$paramsstr = $9;
|
|
||||||
} elsif ($is_forced_inline && $decl =~ /\A\s*SDL_FORCE_INLINE\s+(SDL_DEPRECATED\s+|)(const\s+|)(unsigned\s+|)(.*?)([\*\s]+)(.*?)\s*\((.*?)\);/) {
|
|
||||||
$sym = $6;
|
$sym = $6;
|
||||||
$rettype = "$2$3$4$5";
|
$rettype = "$1$2$3$4$5";
|
||||||
$paramsstr = $7;
|
$paramsstr = $7;
|
||||||
|
} elsif ($is_forced_inline && $decl =~ /\A\s*$forceinlinesym\s+(?:$deprecatedsym\s+|)(const\s+|)(unsigned\s+|)(.*?)([\*\s]+)(.*?)\s*\((.*?)\);/) {
|
||||||
|
$sym = $5;
|
||||||
|
$rettype = "$1$2$3$4";
|
||||||
|
$paramsstr = $6;
|
||||||
} else {
|
} else {
|
||||||
#print "Found doxygen but no function sig:\n$str\n\n";
|
#print "Found doxygen but no function sig:\n$str\n\n";
|
||||||
foreach (@templines) {
|
foreach (@templines) {
|
||||||
@@ -1384,7 +1396,7 @@ while (my $d = readdir(DH)) {
|
|||||||
|
|
||||||
$decl = $_;
|
$decl = $_;
|
||||||
$temp = $decl;
|
$temp = $decl;
|
||||||
$temp =~ s/\Aextern\s+(SDL_DEPRECATED\s+|)(SDLMAIN_|SDL_)?DECLSPEC\w*\s+(.*?)\s+(\*?)SDLCALL\s+/$3$4 /;
|
$temp =~ s/\Aextern\s+(?:$deprecatedsym\s+|)$declspecsym\w*\s+(.*?)\s+(\*?)$callconvsym\s+/$1$2 /;
|
||||||
$shrink_length = length($decl) - length($temp);
|
$shrink_length = length($decl) - length($temp);
|
||||||
$decl = $temp;
|
$decl = $temp;
|
||||||
} else {
|
} else {
|
||||||
@@ -1449,7 +1461,7 @@ while (my $d = readdir(DH)) {
|
|||||||
}
|
}
|
||||||
$decl .= $additional_decl;
|
$decl .= $additional_decl;
|
||||||
} elsif ($symtype == 2) { # a macro
|
} elsif ($symtype == 2) { # a macro
|
||||||
if ($decl =~ /\A\s*\#\s*define\s+(.*?)(\(.*?\)|)\s+/) {
|
if ($decl =~ /\A\s*\#\s*define\s+(.*?)(\(.*?\)|)(\s+|\Z)/) {
|
||||||
$sym = $1;
|
$sym = $1;
|
||||||
} else {
|
} else {
|
||||||
#print "Found doxygen but no macro:\n$str\n\n";
|
#print "Found doxygen but no macro:\n$str\n\n";
|
||||||
@@ -2149,7 +2161,7 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
opendir(DH, $wikipath) or die("Can't opendir '$wikipath': $!\n");
|
opendir(DH, $wikipath) or die("Can't opendir '$wikipath': $!\n");
|
||||||
while (readdir(DH)) {
|
while (readdir(DH)) {
|
||||||
my $dent = $_;
|
my $dent = $_;
|
||||||
if ($dent =~ /\AREADME\-.*?\.md\Z/) { # we only bridge Markdown files here that start with "README-".
|
if ($dent =~ /\A(README|INTRO)\-.*?\.md\Z/) { # we only bridge Markdown files here that start with "README-" or "INTRO-".
|
||||||
filecopy("$wikipath/$dent", "$readmepath/$dent", "\n");
|
filecopy("$wikipath/$dent", "$readmepath/$dent", "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2259,10 +2271,10 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
|
|
||||||
$desc =~ s/[\s\n]+\Z//ms;
|
$desc =~ s/[\s\n]+\Z//ms;
|
||||||
|
|
||||||
if (0) { # !!! FIXME: disabled because it's not currently suitable for general use, but for manually inspecting the output, it can be useful.
|
if (0) {
|
||||||
if (($desc =~ /\A[A-Z]/) && (not $desc =~ /\ASDL_/)) {
|
if (($desc =~ /\A[a-z]/) && (not $desc =~ /$apiprefixregex/)) {
|
||||||
print STDERR "WARNING: $sym\'s '\\param $arg' text starts with a capital letter: '$desc'. Fixing.\n";
|
print STDERR "WARNING: $sym\'s '\\param $arg' text starts with a lowercase letter: '$desc'. Fixing.\n";
|
||||||
$desc = lcfirst($desc);
|
$desc = ucfirst($desc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2306,8 +2318,8 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
}
|
}
|
||||||
$desc =~ s/[\s\n]+\Z//ms;
|
$desc =~ s/[\s\n]+\Z//ms;
|
||||||
|
|
||||||
if (0) { # !!! FIXME: disabled because it's not currently suitable for general use, but for manually inspecting the output, it can be useful.
|
if (0) {
|
||||||
if (($desc =~ /\A[A-Z]/) && (not $desc =~ /\ASDL_/)) {
|
if (($desc =~ /\A[A-Z]/) && (not $desc =~ /$apiprefixregex/)) {
|
||||||
print STDERR "WARNING: $sym\'s '\\returns' text starts with a capital letter: '$desc'. Fixing.\n";
|
print STDERR "WARNING: $sym\'s '\\returns' text starts with a capital letter: '$desc'. Fixing.\n";
|
||||||
$desc = lcfirst($desc);
|
$desc = lcfirst($desc);
|
||||||
}
|
}
|
||||||
@@ -2451,7 +2463,7 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
} else {
|
} else {
|
||||||
die("Unexpected symbol type $symtype!");
|
die("Unexpected symbol type $symtype!");
|
||||||
}
|
}
|
||||||
my $str = "This $symtypename is available since SDL 3.0.0.";
|
my $str = "This $symtypename is available since $projectshortname 3.0.0.";
|
||||||
$sections{'Version'} = wordwrap(wikify($wikitype, $str)) . "\n";
|
$sections{'Version'} = wordwrap(wikify($wikitype, $str)) . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2762,7 +2774,7 @@ __EOF__
|
|||||||
opendir(DH, $readmepath) or die("Can't opendir '$readmepath': $!\n");
|
opendir(DH, $readmepath) or die("Can't opendir '$readmepath': $!\n");
|
||||||
while (my $d = readdir(DH)) {
|
while (my $d = readdir(DH)) {
|
||||||
my $dent = $d;
|
my $dent = $d;
|
||||||
if ($dent =~ /\AREADME\-.*?\.md\Z/) { # we only bridge Markdown files here that start with "README-".
|
if ($dent =~ /\A(README|INTRO)\-.*?\.md\Z/) { # we only bridge Markdown files here that start with "README-" or "INTRO".
|
||||||
filecopy("$readmepath/$dent", "$wikipath/$dent", "\n");
|
filecopy("$readmepath/$dent", "$wikipath/$dent", "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2772,7 +2784,7 @@ __EOF__
|
|||||||
opendir(DH, $wikipath) or die("Can't opendir '$wikipath': $!\n");
|
opendir(DH, $wikipath) or die("Can't opendir '$wikipath': $!\n");
|
||||||
while (my $d = readdir(DH)) {
|
while (my $d = readdir(DH)) {
|
||||||
my $dent = $d;
|
my $dent = $d;
|
||||||
if ($dent =~ /\A(README\-.*?)\.md\Z/) {
|
if ($dent =~ /\A((README|INTRO)\-.*?)\.md\Z/) {
|
||||||
push @pages, $1;
|
push @pages, $1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2900,6 +2912,11 @@ __EOF__
|
|||||||
$brief = shift @briefsplit;
|
$brief = shift @briefsplit;
|
||||||
$brief = dewikify($wikitype, $brief);
|
$brief = dewikify($wikitype, $brief);
|
||||||
|
|
||||||
|
# Hack: `apropros` doesn't like escaped character things like `\[char46]` for `.`...since almost every
|
||||||
|
# manpage will end their Brief section with a period and it won't wordwrap to risk being a groff control
|
||||||
|
# character, just replace it.
|
||||||
|
$brief =~ s/\\\[char46\]/./g;
|
||||||
|
|
||||||
if (defined $remarks) {
|
if (defined $remarks) {
|
||||||
$remarks = dewikify($wikitype, join("\n", @briefsplit) . $remarks);
|
$remarks = dewikify($wikitype, join("\n", @briefsplit) . $remarks);
|
||||||
}
|
}
|
||||||
@@ -2916,7 +2933,7 @@ __EOF__
|
|||||||
$str .= ".\\\" Please report issues in this manpage's content at:\n";
|
$str .= ".\\\" Please report issues in this manpage's content at:\n";
|
||||||
$str .= ".\\\" $bugreporturl\n";
|
$str .= ".\\\" $bugreporturl\n";
|
||||||
$str .= ".\\\" Please report issues in the generation of this manpage from the wiki at:\n";
|
$str .= ".\\\" Please report issues in the generation of this manpage from the wiki at:\n";
|
||||||
$str .= ".\\\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20$sym\n";
|
$str .= ".\\\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20$sym\n"; # !!! FIXME: if this becomes a problem for other projects, we'll generalize this.
|
||||||
$str .= ".\\\" $projectshortname can be found at $projecturl\n";
|
$str .= ".\\\" $projectshortname can be found at $projecturl\n";
|
||||||
|
|
||||||
# Define a .URL macro. The "www.tmac" thing decides if we're using GNU roff (which has a .URL macro already), and if so, overrides the macro we just created.
|
# Define a .URL macro. The "www.tmac" thing decides if we're using GNU roff (which has a .URL macro already), and if so, overrides the macro we just created.
|
||||||
|
|||||||
@@ -1,73 +1,73 @@
|
|||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
set(LibUSB_PKG_CONFIG_SPEC libusb-1.0>=1.0.16)
|
set(LibUSB_PKG_CONFIG_SPEC libusb-1.0>=1.0.16)
|
||||||
set(LibUSB_MIN_API_VERSION 0x01000102)
|
set(LibUSB_MIN_API_VERSION 0x01000102)
|
||||||
|
|
||||||
find_package(PkgConfig QUIET)
|
find_package(PkgConfig QUIET)
|
||||||
|
|
||||||
if(PKG_CONFIG_FOUND)
|
if(PKG_CONFIG_FOUND)
|
||||||
pkg_check_modules(PC_LibUSB ${LibUSB_PKG_CONFIG_SPEC})
|
pkg_check_modules(PC_LibUSB ${LibUSB_PKG_CONFIG_SPEC})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_library(LibUSB_LIBRARY
|
find_library(LibUSB_LIBRARY
|
||||||
NAMES usb-1.0 libusb-1.0
|
NAMES usb-1.0 libusb-1.0 usb
|
||||||
HINTS ${PC_LibUSB_LIBRARY_DIRS}
|
HINTS ${PC_LibUSB_LIBRARY_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
find_path(LibUSB_INCLUDE_PATH
|
find_path(LibUSB_INCLUDE_PATH
|
||||||
NAMES libusb.h
|
NAMES libusb.h
|
||||||
PATH_SUFFIXES libusb-1.0
|
PATH_SUFFIXES libusb-1.0
|
||||||
HINTS ${PC_LibUSB_INCLUDE_DIRS}
|
HINTS ${PC_LibUSB_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(LibUSB_API_VERSION "LibUSB_API_VERSION-NOTFOUND")
|
set(LibUSB_API_VERSION "LibUSB_API_VERSION-NOTFOUND")
|
||||||
if(LibUSB_INCLUDE_PATH AND EXISTS "${LibUSB_INCLUDE_PATH}/libusb.h")
|
if(LibUSB_INCLUDE_PATH AND EXISTS "${LibUSB_INCLUDE_PATH}/libusb.h")
|
||||||
file(READ "${LibUSB_INCLUDE_PATH}/libusb.h" LIBUSB_H_TEXT)
|
file(READ "${LibUSB_INCLUDE_PATH}/libusb.h" LIBUSB_H_TEXT)
|
||||||
if("${LIBUSB_H_TEXT}" MATCHES "#define[ \t]+LIBUSBX?_API_VERSION[ \t]+(0x[0-9a-fA-F]+)" )
|
if("${LIBUSB_H_TEXT}" MATCHES "#define[ \t]+LIBUSBX?_API_VERSION[ \t]+(0x[0-9a-fA-F]+)" )
|
||||||
set(LibUSB_API_VERSION "${CMAKE_MATCH_1}")
|
set(LibUSB_API_VERSION "${CMAKE_MATCH_1}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LibUSB_API_VERSION)
|
if(LibUSB_API_VERSION)
|
||||||
math(EXPR LibUSB_MIN_API_VERSION_decimal "${LibUSB_MIN_API_VERSION}")
|
math(EXPR LibUSB_MIN_API_VERSION_decimal "${LibUSB_MIN_API_VERSION}")
|
||||||
math(EXPR LibUSB_API_VERSION_decimal "${LibUSB_API_VERSION}")
|
math(EXPR LibUSB_API_VERSION_decimal "${LibUSB_API_VERSION}")
|
||||||
if(NOT LibUSB_MIN_API_VERSION_decimal LESS_EQUAL LibUSB_API_VERSION_decimal)
|
if(NOT LibUSB_MIN_API_VERSION_decimal LESS_EQUAL LibUSB_API_VERSION_decimal)
|
||||||
set(LibUSB_LIBRARY "LibUSB_LIBRARY-NOTFOUND")
|
set(LibUSB_LIBRARY "LibUSB_LIBRARY-NOTFOUND")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
set(LibUSB_LIBRARY "LibUSB_LIBRARY-NOTFOUND")
|
set(LibUSB_LIBRARY "LibUSB_LIBRARY-NOTFOUND")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(LibUSB_COMPILE_OPTIONS "" CACHE STRING "Extra compile options of LibUSB")
|
set(LibUSB_COMPILE_OPTIONS "" CACHE STRING "Extra compile options of LibUSB")
|
||||||
|
|
||||||
set(LibUSB_LINK_LIBRARIES "" CACHE STRING "Extra link libraries of LibUSB")
|
set(LibUSB_LINK_LIBRARIES "" CACHE STRING "Extra link libraries of LibUSB")
|
||||||
|
|
||||||
set(LibUSB_LINK_FLAGS "" CACHE STRING "Extra link flags of LibUSB")
|
set(LibUSB_LINK_FLAGS "" CACHE STRING "Extra link flags of LibUSB")
|
||||||
|
|
||||||
if(LibUSB_LIBRARY AND LibUSB_INCLUDE_PATH)
|
if(LibUSB_LIBRARY AND LibUSB_INCLUDE_PATH)
|
||||||
if(PC_LibUSB_FOUND)
|
if(PC_LibUSB_FOUND)
|
||||||
set(LibUSB_VERSION "${PC_LibUSB_VERSION}")
|
set(LibUSB_VERSION "${PC_LibUSB_VERSION}")
|
||||||
else()
|
else()
|
||||||
set(LibUSB_VERSION "1.0.16-or-higher")
|
set(LibUSB_VERSION "1.0.16-or-higher")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
set(LibUSB_VERSION "LibUSB_VERSION-NOTFOUND")
|
set(LibUSB_VERSION "LibUSB_VERSION-NOTFOUND")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package_handle_standard_args(LibUSB
|
find_package_handle_standard_args(LibUSB
|
||||||
VERSION_VAR LibUSB_VERSION
|
VERSION_VAR LibUSB_VERSION
|
||||||
REQUIRED_VARS LibUSB_LIBRARY LibUSB_INCLUDE_PATH
|
REQUIRED_VARS LibUSB_LIBRARY LibUSB_INCLUDE_PATH
|
||||||
)
|
)
|
||||||
|
|
||||||
if(LibUSB_FOUND AND NOT TARGET LibUSB::LibUSB)
|
if(LibUSB_FOUND AND NOT TARGET LibUSB::LibUSB)
|
||||||
add_library(LibUSB::LibUSB IMPORTED UNKNOWN)
|
add_library(LibUSB::LibUSB IMPORTED UNKNOWN)
|
||||||
set_target_properties(LibUSB::LibUSB
|
set_target_properties(LibUSB::LibUSB
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
IMPORTED_LOCATION "${LibUSB_LIBRARY}"
|
IMPORTED_LOCATION "${LibUSB_LIBRARY}"
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${LibUSB_INCLUDE_PATH}"
|
INTERFACE_INCLUDE_DIRECTORIES "${LibUSB_INCLUDE_PATH}"
|
||||||
INTERFACE_COMPILE_OPTIONS "${LibUSB_COMPILE_OPTIONS}"
|
INTERFACE_COMPILE_OPTIONS "${LibUSB_COMPILE_OPTIONS}"
|
||||||
INTERFACE_LINK_LIBRARIES "${LibUSB_LINK_LIBRARIES}"
|
INTERFACE_LINK_LIBRARIES "${LibUSB_LINK_LIBRARIES}"
|
||||||
INTERFACE_LINK_OPTIONS "${LibUSB_LINK_OPTIONS}"
|
INTERFACE_LINK_OPTIONS "${LibUSB_LINK_OPTIONS}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -164,6 +164,22 @@ function(get_git_head_revision _refspecvar _hashvar)
|
|||||||
"${GIT_DATA}/grabRef.cmake" @ONLY)
|
"${GIT_DATA}/grabRef.cmake" @ONLY)
|
||||||
include("${GIT_DATA}/grabRef.cmake")
|
include("${GIT_DATA}/grabRef.cmake")
|
||||||
|
|
||||||
|
# Fallback for reftable or other storage formats
|
||||||
|
if(NOT HEAD_HASH OR HEAD_HASH STREQUAL "")
|
||||||
|
find_package(Git QUIET)
|
||||||
|
if(GIT_FOUND)
|
||||||
|
execute_process(
|
||||||
|
COMMAND "${GIT_EXECUTABLE}" rev-parse HEAD
|
||||||
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
RESULT_VARIABLE res
|
||||||
|
OUTPUT_VARIABLE HEAD_HASH
|
||||||
|
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
if(NOT res EQUAL 0)
|
||||||
|
set(HEAD_HASH "")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
set(${_refspecvar}
|
set(${_refspecvar}
|
||||||
"${HEAD_REF}"
|
"${HEAD_REF}"
|
||||||
PARENT_SCOPE)
|
PARENT_SCOPE)
|
||||||
|
|||||||
@@ -25,19 +25,21 @@ if(HEAD_CONTENTS MATCHES "ref")
|
|||||||
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
|
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
|
||||||
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
|
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
|
||||||
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
||||||
else()
|
elseif(EXISTS "@GIT_DIR@/packed-refs")
|
||||||
configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY)
|
configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY)
|
||||||
file(READ "@GIT_DATA@/packed-refs" PACKED_REFS)
|
file(READ "@GIT_DATA@/packed-refs" PACKED_REFS)
|
||||||
if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}")
|
if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}")
|
||||||
set(HEAD_HASH "${CMAKE_MATCH_1}")
|
set(HEAD_HASH "${CMAKE_MATCH_1}")
|
||||||
endif()
|
endif()
|
||||||
|
elseif(EXISTS "@GIT_DIR@/reftable/tables.list")
|
||||||
|
configure_file("@GIT_DIR@/reftable/tables.list" "@GIT_DATA@/reftable-tables.list" COPYONLY)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
# detached HEAD
|
# detached HEAD
|
||||||
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
|
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT HEAD_HASH)
|
if(NOT HEAD_HASH AND EXISTS "@GIT_DATA@/head-ref")
|
||||||
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
|
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
|
||||||
string(STRIP "${HEAD_HASH}" HEAD_HASH)
|
string(STRIP "${HEAD_HASH}" HEAD_HASH)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ if(EMSCRIPTEN)
|
|||||||
set(HAVE_O_CLOEXEC "1" CACHE INTERNAL "Test HAVE_O_CLOEXEC")
|
set(HAVE_O_CLOEXEC "1" CACHE INTERNAL "Test HAVE_O_CLOEXEC")
|
||||||
set(COMPILER_SUPPORTS_FDIAGNOSTICS_COLOR "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_FDIAGNOSTICS_COLOR")
|
set(COMPILER_SUPPORTS_FDIAGNOSTICS_COLOR "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_FDIAGNOSTICS_COLOR")
|
||||||
set(COMPILER_SUPPORTS_GCC_ATOMICS "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_GCC_ATOMICS")
|
set(COMPILER_SUPPORTS_GCC_ATOMICS "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_GCC_ATOMICS")
|
||||||
set(LINKER_SUPPORTS_VERSION_SCRIPT "" CACHE INTERNAL "Test LINKER_SUPPORTS_VERSION_SCRIPT")
|
set(HAVE_WL_VERSION_SCRIPT "" CACHE INTERNAL "Test HAVE_WL_VERSION_SCRIPT")
|
||||||
set(LINKER_SUPPORTS_WL_NO_UNDEFINED "" CACHE INTERNAL "Test LINKER_SUPPORTS_WL_NO_UNDEFINED")
|
set(LINKER_SUPPORTS_WL_NO_UNDEFINED "" CACHE INTERNAL "Test LINKER_SUPPORTS_WL_NO_UNDEFINED")
|
||||||
set(ICONV_IN_LIBC "1" CACHE INTERNAL "Test ICONV_IN_LIBC")
|
set(ICONV_IN_LIBC "1" CACHE INTERNAL "Test ICONV_IN_LIBC")
|
||||||
set(ICONV_IN_LIBICONV "" CACHE INTERNAL "Test ICONV_IN_LIBICONV")
|
set(ICONV_IN_LIBICONV "" CACHE INTERNAL "Test ICONV_IN_LIBICONV")
|
||||||
@@ -175,5 +175,11 @@ if(EMSCRIPTEN)
|
|||||||
set(HAVE_MEMFD_CREATE "" CACHE INTERNAL "Have symbol memfd_create")
|
set(HAVE_MEMFD_CREATE "" CACHE INTERNAL "Have symbol memfd_create")
|
||||||
set(HAVE_POSIX_FALLOCATE "1" CACHE INTERNAL "Have symbol posix_fallocate")
|
set(HAVE_POSIX_FALLOCATE "1" CACHE INTERNAL "Have symbol posix_fallocate")
|
||||||
set(HAVE_DLOPEN_IN_LIBC "1" CACHE INTERNAL "Have symbol dlopen")
|
set(HAVE_DLOPEN_IN_LIBC "1" CACHE INTERNAL "Have symbol dlopen")
|
||||||
|
set(HAVE_FDATASYNC "1" CACHE INTERNAL "Have symbol fdatasync")
|
||||||
|
set(HAVE_GETHOSTNAME "1" CACHE INTERNAL "Have symbol gethostname")
|
||||||
|
set(HAVE_SIGTIMEDWAIT "1" CACHE INTERNAL "Have symbol sigtimedwait")
|
||||||
|
set(HAVE_PPOLL "" CACHE INTERNAL "Have symbol ppoll")
|
||||||
|
set(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR "" CACHE INTERNAL "Have symbol posix_spawn_file_actions_addchdir")
|
||||||
|
set(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP "1" CACHE INTERNAL "Have symbol posix_spawn_file_actions_addchdir_np")
|
||||||
endfunction()
|
endfunction()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ if(NGAGESDK)
|
|||||||
#set(HAVE_O_CLOEXEC "" CACHE INTERNAL "Test HAVE_O_CLOEXEC")
|
#set(HAVE_O_CLOEXEC "" CACHE INTERNAL "Test HAVE_O_CLOEXEC")
|
||||||
#set(COMPILER_SUPPORTS_FDIAGNOSTICS_COLOR "" CACHE INTERNAL "Test COMPILER_SUPPORTS_FDIAGNOSTICS_COLOR")
|
#set(COMPILER_SUPPORTS_FDIAGNOSTICS_COLOR "" CACHE INTERNAL "Test COMPILER_SUPPORTS_FDIAGNOSTICS_COLOR")
|
||||||
set(COMPILER_SUPPORTS_GCC_ATOMICS "" CACHE INTERNAL "Test COMPILER_SUPPORTS_GCC_ATOMICS")
|
set(COMPILER_SUPPORTS_GCC_ATOMICS "" CACHE INTERNAL "Test COMPILER_SUPPORTS_GCC_ATOMICS")
|
||||||
set(LINKER_SUPPORTS_VERSION_SCRIPT "" CACHE INTERNAL "Test LINKER_SUPPORTS_VERSION_SCRIPT")
|
set(HAVE_WL_VERSION_SCRIPT "" CACHE INTERNAL "Test HAVE_WL_VERSION_SCRIPT")
|
||||||
set(LINKER_SUPPORTS_WL_NO_UNDEFINED "" CACHE INTERNAL "Test LINKER_SUPPORTS_WL_NO_UNDEFINED")
|
set(LINKER_SUPPORTS_WL_NO_UNDEFINED "" CACHE INTERNAL "Test LINKER_SUPPORTS_WL_NO_UNDEFINED")
|
||||||
set(ICONV_IN_LIBC "" CACHE INTERNAL "Test ICONV_IN_LIBC")
|
set(ICONV_IN_LIBC "" CACHE INTERNAL "Test ICONV_IN_LIBC")
|
||||||
set(ICONV_IN_LIBICONV "" CACHE INTERNAL "Test ICONV_IN_LIBICONV")
|
set(ICONV_IN_LIBICONV "" CACHE INTERNAL "Test ICONV_IN_LIBICONV")
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ macro(option_string _NAME _DESC _VALUE)
|
|||||||
add_to_alloptions(${_NAME})
|
add_to_alloptions(${_NAME})
|
||||||
set(${_NAME} ${_VALUE} CACHE STRING "${_DESC}")
|
set(${_NAME} ${_VALUE} CACHE STRING "${_DESC}")
|
||||||
set(HAVE_${_NAME} ${_VALUE})
|
set(HAVE_${_NAME} ${_VALUE})
|
||||||
ENDMACRO()
|
endmacro()
|
||||||
|
|
||||||
macro(message_bool_option _NAME _VALUE)
|
macro(message_bool_option _NAME _VALUE)
|
||||||
set(_PAD "\t")
|
set(_PAD "\t")
|
||||||
@@ -296,15 +296,15 @@ endfunction()
|
|||||||
function(check_linker_supports_version_file VAR)
|
function(check_linker_supports_version_file VAR)
|
||||||
SDL_detect_linker()
|
SDL_detect_linker()
|
||||||
if(CMAKE_C_COMPILER_LINKER_ID MATCHES "^(MSVC)$")
|
if(CMAKE_C_COMPILER_LINKER_ID MATCHES "^(MSVC)$")
|
||||||
set(LINKER_SUPPORTS_VERSION_SCRIPT FALSE)
|
set(${VAR} FALSE)
|
||||||
else()
|
else()
|
||||||
cmake_push_check_state(RESET)
|
cmake_push_check_state(RESET)
|
||||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/dummy.sym" "n_0 {\n global:\n func;\n local: *;\n};\n")
|
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/dummy.sym" "n_0 {\n global:\n func;\n local: *;\n};\n")
|
||||||
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/dummy.sym")
|
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/dummy.sym")
|
||||||
check_c_source_compiles("int func(void) {return 0;} int main(int argc,char*argv[]){(void)argc;(void)argv;return func();}" LINKER_SUPPORTS_VERSION_SCRIPT FAIL_REGEX "(unsupported|syntax error|unrecognized option)")
|
check_c_source_compiles("int func(void) {return 0;} int main(int argc,char*argv[]){(void)argc;(void)argv;return func();}" ${VAR} FAIL_REGEX "(unsupported|syntax error|unrecognized option)")
|
||||||
cmake_pop_check_state()
|
cmake_pop_check_state()
|
||||||
endif()
|
endif()
|
||||||
set(${VAR} "${LINKER_SUPPORTS_VERSION_SCRIPT}" PARENT_SCOPE)
|
set(${VAR} "${${VAR}}" PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.18)
|
if(CMAKE_VERSION VERSION_LESS 3.18)
|
||||||
@@ -399,6 +399,7 @@ function(SDL_PrintSummary)
|
|||||||
PrintEnabledBackends("GPU drivers" "^SDL_GPU_([A-Z0-9]*)$")
|
PrintEnabledBackends("GPU drivers" "^SDL_GPU_([A-Z0-9]*)$")
|
||||||
PrintEnabledBackends("Audio drivers" "^SDL_AUDIO_DRIVER_([A-Z0-9]*)$")
|
PrintEnabledBackends("Audio drivers" "^SDL_AUDIO_DRIVER_([A-Z0-9]*)$")
|
||||||
PrintEnabledBackends("Joystick drivers" "^SDL_JOYSTICK_([A-Z0-9]*)$")
|
PrintEnabledBackends("Joystick drivers" "^SDL_JOYSTICK_([A-Z0-9]*)$")
|
||||||
|
PrintEnabledBackends("Camera drivers" "^SDL_CAMERA_DRIVER_([A-Z0-9]*)$")
|
||||||
message(STATUS "")
|
message(STATUS "")
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
@@ -417,7 +418,7 @@ function(SDL_PrintSummary)
|
|||||||
"Most likely, this is not wanted."
|
"Most likely, this is not wanted."
|
||||||
"\n"
|
"\n"
|
||||||
"On Linux, install the packages listed at "
|
"On Linux, install the packages listed at "
|
||||||
"https://github.com/libsdl-org/SDL/blob/main/docs/README-linux.md#build-dependencies "
|
"https://wiki.libsdl.org/SDL3/README-linux#build-dependencies "
|
||||||
"\n"
|
"\n"
|
||||||
"If you really don't need desktop windows, the documentation tells you how to skip this check. "
|
"If you really don't need desktop windows, the documentation tells you how to skip this check. "
|
||||||
"https://github.com/libsdl-org/SDL/blob/main/docs/README-cmake.md#cmake-fails-to-build-without-x11-or-wayland-support\n"
|
"https://github.com/libsdl-org/SDL/blob/main/docs/README-cmake.md#cmake-fails-to-build-without-x11-or-wayland-support\n"
|
||||||
@@ -427,6 +428,22 @@ function(SDL_PrintSummary)
|
|||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
function(SDL_missing_dependency NAME OPTION)
|
||||||
|
if(LINUX)
|
||||||
|
message( FATAL_ERROR
|
||||||
|
"Couldn't find dependency package for ${NAME}. Please install the needed packages or configure with -D${OPTION}=OFF"
|
||||||
|
"\n"
|
||||||
|
"The full set of dependencies is available at "
|
||||||
|
"https://wiki.libsdl.org/SDL3/README-linux#build-dependencies "
|
||||||
|
"\n"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
message( FATAL_ERROR
|
||||||
|
"Couldn't find dependency package for ${NAME}. Please install the needed packages or configure with -D${OPTION}=OFF"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
function(SDL_install_pdb TARGET DIRECTORY)
|
function(SDL_install_pdb TARGET DIRECTORY)
|
||||||
get_property(type TARGET ${TARGET} PROPERTY TYPE)
|
get_property(type TARGET ${TARGET} PROPERTY TYPE)
|
||||||
if(type MATCHES "^(SHARED_LIBRARY|EXECUTABLE)$")
|
if(type MATCHES "^(SHARED_LIBRARY|EXECUTABLE)$")
|
||||||
|
|||||||
@@ -392,72 +392,83 @@ macro(CheckX11)
|
|||||||
|
|
||||||
check_include_file("X11/XKBlib.h" SDL_VIDEO_DRIVER_X11_HAS_XKBLIB)
|
check_include_file("X11/XKBlib.h" SDL_VIDEO_DRIVER_X11_HAS_XKBLIB)
|
||||||
|
|
||||||
if(SDL_X11_XCURSOR AND HAVE_XCURSOR_H AND XCURSOR_LIB)
|
if(SDL_X11_XCURSOR)
|
||||||
set(HAVE_X11_XCURSOR TRUE)
|
if (HAVE_XCURSOR_H AND XCURSOR_LIB)
|
||||||
if(HAVE_X11_SHARED)
|
set(HAVE_X11_XCURSOR TRUE)
|
||||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR "\"${XCURSOR_LIB_SONAME}\"")
|
if(HAVE_X11_SHARED)
|
||||||
|
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR "\"${XCURSOR_LIB_SONAME}\"")
|
||||||
|
else()
|
||||||
|
sdl_link_dependency(xcursor LIBS X11::Xcursor CMAKE_MODULE X11 PKG_CONFIG_SPECS ${Xcursor_PKG_CONFIG_SPEC})
|
||||||
|
endif()
|
||||||
|
set(SDL_VIDEO_DRIVER_X11_XCURSOR 1)
|
||||||
else()
|
else()
|
||||||
sdl_link_dependency(xcursor LIBS X11::Xcursor CMAKE_MODULE X11 PKG_CONFIG_SPECS ${Xcursor_PKG_CONFIG_SPEC})
|
SDL_missing_dependency(XCURSOR SDL_X11_XCURSOR)
|
||||||
endif()
|
endif()
|
||||||
set(SDL_VIDEO_DRIVER_X11_XCURSOR 1)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SDL_X11_XDBE AND HAVE_XDBE_H)
|
if(SDL_X11_XDBE)
|
||||||
set(HAVE_X11_XDBE TRUE)
|
if(HAVE_XDBE_H)
|
||||||
set(SDL_VIDEO_DRIVER_X11_XDBE 1)
|
set(HAVE_X11_XDBE TRUE)
|
||||||
|
set(SDL_VIDEO_DRIVER_X11_XDBE 1)
|
||||||
|
else()
|
||||||
|
SDL_missing_dependency(XDBE SDL_X11_XDBE)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SDL_X11_XINPUT AND HAVE_XINPUT2_H AND XI_LIB)
|
if(SDL_X11_XINPUT)
|
||||||
set(HAVE_X11_XINPUT TRUE)
|
if(HAVE_XINPUT2_H AND XI_LIB)
|
||||||
if(HAVE_X11_SHARED)
|
set(HAVE_X11_XINPUT TRUE)
|
||||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "\"${XI_LIB_SONAME}\"")
|
if(HAVE_X11_SHARED)
|
||||||
|
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "\"${XI_LIB_SONAME}\"")
|
||||||
|
else()
|
||||||
|
sdl_link_dependency(xi LIBS X11::Xi CMAKE_MODULE X11 PKG_CONFIG_SPECS ${Xi_PKG_CONFIG_SPEC})
|
||||||
|
endif()
|
||||||
|
set(SDL_VIDEO_DRIVER_X11_XINPUT2 1)
|
||||||
|
|
||||||
|
# Check for scroll info
|
||||||
|
check_c_source_compiles("
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xproto.h>
|
||||||
|
#include <X11/extensions/XInput2.h>
|
||||||
|
XIScrollClassInfo *s;
|
||||||
|
int main(int argc, char **argv) {}" HAVE_XINPUT2_SCROLLINFO)
|
||||||
|
if(HAVE_XINPUT2_SCROLLINFO)
|
||||||
|
set(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_SCROLLINFO 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Check for multitouch
|
||||||
|
check_c_source_compiles_static("
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xproto.h>
|
||||||
|
#include <X11/extensions/XInput2.h>
|
||||||
|
int event_type = XI_TouchBegin;
|
||||||
|
XITouchClassInfo *t;
|
||||||
|
Status XIAllowTouchEvents(Display *a,int b,unsigned int c,Window d,int f) {
|
||||||
|
return (Status)0;
|
||||||
|
}
|
||||||
|
int main(int argc, char **argv) { return 0; }" HAVE_XINPUT2_MULTITOUCH)
|
||||||
|
if(HAVE_XINPUT2_MULTITOUCH)
|
||||||
|
set(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Check for gesture
|
||||||
|
check_c_source_compiles("
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xproto.h>
|
||||||
|
#include <X11/extensions/XInput2.h>
|
||||||
|
int event_type = XI_GesturePinchBegin;
|
||||||
|
XIGesturePinchEvent *t;
|
||||||
|
Status XIAllowTouchEvents(Display *a,int b,unsigned int c,Window d,int f) {
|
||||||
|
return (Status)0;
|
||||||
|
}
|
||||||
|
int main(int argc, char **argv) { return 0; }" HAVE_XINPUT2_GESTURE)
|
||||||
|
if(HAVE_XINPUT2_GESTURE)
|
||||||
|
set(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_GESTURE 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
else()
|
else()
|
||||||
sdl_link_dependency(xi LIBS X11::Xi CMAKE_MODULE X11 PKG_CONFIG_SPECS ${Xi_PKG_CONFIG_SPEC})
|
SDL_missing_dependency(XINPUT SDL_X11_XINPUT)
|
||||||
endif()
|
endif()
|
||||||
set(SDL_VIDEO_DRIVER_X11_XINPUT2 1)
|
|
||||||
|
|
||||||
# Check for scroll info
|
|
||||||
check_c_source_compiles("
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/Xproto.h>
|
|
||||||
#include <X11/extensions/XInput2.h>
|
|
||||||
XIScrollClassInfo *s;
|
|
||||||
int main(int argc, char **argv) {}" HAVE_XINPUT2_SCROLLINFO)
|
|
||||||
if(HAVE_XINPUT2_SCROLLINFO)
|
|
||||||
set(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_SCROLLINFO 1)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Check for multitouch
|
|
||||||
check_c_source_compiles_static("
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/Xproto.h>
|
|
||||||
#include <X11/extensions/XInput2.h>
|
|
||||||
int event_type = XI_TouchBegin;
|
|
||||||
XITouchClassInfo *t;
|
|
||||||
Status XIAllowTouchEvents(Display *a,int b,unsigned int c,Window d,int f) {
|
|
||||||
return (Status)0;
|
|
||||||
}
|
|
||||||
int main(int argc, char **argv) { return 0; }" HAVE_XINPUT2_MULTITOUCH)
|
|
||||||
if(HAVE_XINPUT2_MULTITOUCH)
|
|
||||||
set(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH 1)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Check for gesture
|
|
||||||
check_c_source_compiles("
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/Xproto.h>
|
|
||||||
#include <X11/extensions/XInput2.h>
|
|
||||||
int event_type = XI_GesturePinchBegin;
|
|
||||||
XITouchClassInfo *t;
|
|
||||||
Status XIAllowTouchEvents(Display *a,int b,unsigned int c,Window d,int f) {
|
|
||||||
return (Status)0;
|
|
||||||
}
|
|
||||||
int main(int argc, char **argv) { return 0; }" HAVE_XINPUT2_GESTURE)
|
|
||||||
if(HAVE_XINPUT2_GESTURE)
|
|
||||||
set(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_GESTURE 1)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# check along with XInput2.h because we use Xfixes with XIBarrierReleasePointer
|
# check along with XInput2.h because we use Xfixes with XIBarrierReleasePointer
|
||||||
@@ -470,54 +481,78 @@ macro(CheckX11)
|
|||||||
BarrierEventID b;
|
BarrierEventID b;
|
||||||
int main(int argc, char **argv) { return 0; }" HAVE_XFIXES_H)
|
int main(int argc, char **argv) { return 0; }" HAVE_XFIXES_H)
|
||||||
endif()
|
endif()
|
||||||
if(SDL_X11_XFIXES AND HAVE_XFIXES_H AND HAVE_XINPUT2_H AND XFIXES_LIB)
|
if(SDL_X11_XFIXES)
|
||||||
if(HAVE_X11_SHARED)
|
if (HAVE_XFIXES_H AND HAVE_XINPUT2_H AND XFIXES_LIB)
|
||||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES "\"${XFIXES_LIB_SONAME}\"")
|
if(HAVE_X11_SHARED)
|
||||||
|
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES "\"${XFIXES_LIB_SONAME}\"")
|
||||||
|
else()
|
||||||
|
sdl_link_dependency(xfixes LIBS X11::Xfixes CMAKE_MODULE X11 PKG_CONFIG_SPECS ${Xfixes_PKG_CONFIG_SPEC})
|
||||||
|
endif()
|
||||||
|
set(SDL_VIDEO_DRIVER_X11_XFIXES 1)
|
||||||
|
set(HAVE_X11_XFIXES TRUE)
|
||||||
else()
|
else()
|
||||||
sdl_link_dependency(xfixes LIBS X11::Xfixes CMAKE_MODULE X11 PKG_CONFIG_SPECS ${Xfixes_PKG_CONFIG_SPEC})
|
SDL_missing_dependency(XFIXES SDL_X11_XFIXES)
|
||||||
endif()
|
endif()
|
||||||
set(SDL_VIDEO_DRIVER_X11_XFIXES 1)
|
|
||||||
set(HAVE_X11_XFIXES TRUE)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SDL_X11_XSYNC AND HAVE_XSYNC_H AND XEXT_LIB)
|
if(SDL_X11_XSYNC)
|
||||||
set(SDL_VIDEO_DRIVER_X11_XSYNC 1)
|
if(HAVE_XSYNC_H AND XEXT_LIB)
|
||||||
set(HAVE_X11_XSYNC TRUE)
|
set(SDL_VIDEO_DRIVER_X11_XSYNC 1)
|
||||||
endif()
|
set(HAVE_X11_XSYNC TRUE)
|
||||||
|
|
||||||
if(SDL_X11_XRANDR AND HAVE_XRANDR_H AND XRANDR_LIB)
|
|
||||||
if(HAVE_X11_SHARED)
|
|
||||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "\"${XRANDR_LIB_SONAME}\"")
|
|
||||||
else()
|
else()
|
||||||
sdl_link_dependency(xrandr LIBS X11::Xrandr CMAKE_MODULE X11 PKG_CONFIG_SPECS ${Xrandr_PKG_CONFIG_SPEC})
|
SDL_missing_dependency(XSYNC SDL_X11_XSYNC)
|
||||||
endif()
|
endif()
|
||||||
set(SDL_VIDEO_DRIVER_X11_XRANDR 1)
|
|
||||||
set(HAVE_X11_XRANDR TRUE)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SDL_X11_XSCRNSAVER AND HAVE_XSS_H AND XSS_LIB)
|
if(SDL_X11_XRANDR)
|
||||||
if(HAVE_X11_SHARED)
|
if(HAVE_XRANDR_H AND XRANDR_LIB)
|
||||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "\"${XSS_LIB_SONAME}\"")
|
if(HAVE_X11_SHARED)
|
||||||
|
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "\"${XRANDR_LIB_SONAME}\"")
|
||||||
|
else()
|
||||||
|
sdl_link_dependency(xrandr LIBS X11::Xrandr CMAKE_MODULE X11 PKG_CONFIG_SPECS ${Xrandr_PKG_CONFIG_SPEC})
|
||||||
|
endif()
|
||||||
|
set(SDL_VIDEO_DRIVER_X11_XRANDR 1)
|
||||||
|
set(HAVE_X11_XRANDR TRUE)
|
||||||
else()
|
else()
|
||||||
sdl_link_dependency(xss LIBS X11::Xss CMAKE_MODULE X11 PKG_CONFIG_SPECS ${Xss_PKG_CONFIG_SPEC})
|
SDL_missing_dependency(XRANDR SDL_X11_XRANDR)
|
||||||
endif()
|
endif()
|
||||||
set(SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1)
|
|
||||||
set(HAVE_X11_XSCRNSAVER TRUE)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SDL_X11_XSHAPE AND HAVE_XSHAPE_H)
|
if(SDL_X11_XSCRNSAVER)
|
||||||
set(SDL_VIDEO_DRIVER_X11_XSHAPE 1)
|
if(HAVE_XSS_H AND XSS_LIB)
|
||||||
set(HAVE_X11_XSHAPE TRUE)
|
if(HAVE_X11_SHARED)
|
||||||
endif()
|
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "\"${XSS_LIB_SONAME}\"")
|
||||||
|
else()
|
||||||
if(SDL_X11_XTEST AND HAVE_XTEST_H AND XTST_LIB)
|
sdl_link_dependency(xss LIBS X11::Xss CMAKE_MODULE X11 PKG_CONFIG_SPECS ${Xss_PKG_CONFIG_SPEC})
|
||||||
if(HAVE_X11_SHARED)
|
endif()
|
||||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XTEST "\"${XTST_LIB_SONAME}\"")
|
set(SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1)
|
||||||
|
set(HAVE_X11_XSCRNSAVER TRUE)
|
||||||
else()
|
else()
|
||||||
sdl_link_dependency(xtst LIBS X11::Xtst CMAKE_MODULE X11 PKG_CONFIG_SPECS ${Xtst_PKG_CONFIG_SPEC})
|
SDL_missing_dependency(XSCRNSAVER SDL_X11_XSCRNSAVER)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(SDL_X11_XSHAPE)
|
||||||
|
if(HAVE_XSHAPE_H)
|
||||||
|
set(SDL_VIDEO_DRIVER_X11_XSHAPE 1)
|
||||||
|
set(HAVE_X11_XSHAPE TRUE)
|
||||||
|
else()
|
||||||
|
SDL_missing_dependency(XSHAPE SDL_X11_XSHAPE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(SDL_X11_XTEST)
|
||||||
|
if(HAVE_XTEST_H AND XTST_LIB)
|
||||||
|
if(HAVE_X11_SHARED)
|
||||||
|
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XTEST "\"${XTST_LIB_SONAME}\"")
|
||||||
|
else()
|
||||||
|
sdl_link_dependency(xtst LIBS X11::Xtst CMAKE_MODULE X11 PKG_CONFIG_SPECS ${Xtst_PKG_CONFIG_SPEC})
|
||||||
|
endif()
|
||||||
|
set(SDL_VIDEO_DRIVER_X11_XTEST 1)
|
||||||
|
set(HAVE_X11_XTEST TRUE)
|
||||||
|
else()
|
||||||
|
SDL_missing_dependency(XTEST SDL_X11_XTEST)
|
||||||
endif()
|
endif()
|
||||||
set(SDL_VIDEO_DRIVER_X11_XTEST 1)
|
|
||||||
set(HAVE_X11_XTEST TRUE)
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -553,6 +588,31 @@ macro(CheckFribidi)
|
|||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
macro(CheckLibThai)
|
||||||
|
if(SDL_LIBTHAI)
|
||||||
|
set(LIBTHAI_PKG_CONFIG_SPEC libthai)
|
||||||
|
set(PC_LIBTHAI_FOUND FALSE)
|
||||||
|
if(PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(PC_LIBTHAI IMPORTED_TARGET ${LIBTHAI_PKG_CONFIG_SPEC})
|
||||||
|
endif()
|
||||||
|
if(PC_LIBTHAI_FOUND)
|
||||||
|
set(HAVE_LIBTHAI TRUE)
|
||||||
|
set(HAVE_LIBTHAI_H 1)
|
||||||
|
if(SDL_LIBTHAI_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||||
|
message(WARNING "You must have SDL_LoadObject() support for dynamic libthai loading")
|
||||||
|
endif()
|
||||||
|
FindLibraryAndSONAME("thai" LIBDIRS ${PC_LIBTHAI_LIBRARY_DIRS})
|
||||||
|
if(SDL_LIBTHAI_SHARED AND THAI_LIB AND HAVE_SDL_LOADSO)
|
||||||
|
set(SDL_LIBTHAI_DYNAMIC "\"${THAI_LIB_SONAME}\"")
|
||||||
|
set(HAVE_LIBTHAI_SHARED TRUE)
|
||||||
|
sdl_include_directories(PRIVATE SYSTEM $<TARGET_PROPERTY:PkgConfig::PC_LIBTHAI,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||||
|
else()
|
||||||
|
sdl_link_dependency(libthai LIBS PkgConfig::PC_LIBTHAI PKG_CONFIG_PREFIX PC_LIBTHAI PKG_CONFIG_SPECS ${LIBTHAI_PKG_CONFIG_SPEC})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
macro(WaylandProtocolGen _SCANNER _CODE_MODE _XML _PROTL)
|
macro(WaylandProtocolGen _SCANNER _CODE_MODE _XML _PROTL)
|
||||||
set(_WAYLAND_PROT_C_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-protocol.c")
|
set(_WAYLAND_PROT_C_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-protocol.c")
|
||||||
set(_WAYLAND_PROT_H_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-client-protocol.h")
|
set(_WAYLAND_PROT_H_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-client-protocol.h")
|
||||||
@@ -765,13 +825,29 @@ macro(CheckOpenVR)
|
|||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
# Requires
|
||||||
|
# - N/A
|
||||||
|
macro(FindOpenGLHeaders)
|
||||||
|
find_package(OpenGL MODULE)
|
||||||
|
# OPENGL_INCLUDE_DIRS is preferred over OPENGL_INCLUDE_DIR, but was only added in 3.29,
|
||||||
|
# If the CMake minimum version is changed to be >= 3.29, the second check should be removed.
|
||||||
|
if(OPENGL_INCLUDE_DIRS)
|
||||||
|
list(APPEND CMAKE_REQUIRED_INCLUDES ${OPENGL_INCLUDE_DIRS})
|
||||||
|
elseif(OPENGL_INCLUDE_DIR)
|
||||||
|
list(APPEND CMAKE_REQUIRED_INCLUDES ${OPENGL_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
# Requires:
|
# Requires:
|
||||||
# - nada
|
# - nada
|
||||||
macro(CheckGLX)
|
macro(CheckGLX)
|
||||||
if(SDL_OPENGL)
|
if(SDL_OPENGL)
|
||||||
|
cmake_push_check_state()
|
||||||
|
FindOpenGLHeaders()
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include <GL/glx.h>
|
#include <GL/glx.h>
|
||||||
int main(int argc, char** argv) { return 0; }" HAVE_OPENGL_GLX)
|
int main(int argc, char** argv) { return 0; }" HAVE_OPENGL_GLX)
|
||||||
|
cmake_pop_check_state()
|
||||||
if(HAVE_OPENGL_GLX AND NOT HAVE_ROCKCHIP)
|
if(HAVE_OPENGL_GLX AND NOT HAVE_ROCKCHIP)
|
||||||
set(SDL_VIDEO_OPENGL_GLX 1)
|
set(SDL_VIDEO_OPENGL_GLX 1)
|
||||||
endif()
|
endif()
|
||||||
@@ -805,10 +881,13 @@ endmacro()
|
|||||||
# - nada
|
# - nada
|
||||||
macro(CheckOpenGL)
|
macro(CheckOpenGL)
|
||||||
if(SDL_OPENGL)
|
if(SDL_OPENGL)
|
||||||
|
cmake_push_check_state()
|
||||||
|
FindOpenGLHeaders()
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
int main(int argc, char** argv) { return 0; }" HAVE_OPENGL)
|
int main(int argc, char** argv) { return 0; }" HAVE_OPENGL)
|
||||||
|
cmake_pop_check_state()
|
||||||
if(HAVE_OPENGL)
|
if(HAVE_OPENGL)
|
||||||
set(SDL_VIDEO_OPENGL 1)
|
set(SDL_VIDEO_OPENGL 1)
|
||||||
set(SDL_VIDEO_RENDER_OGL 1)
|
set(SDL_VIDEO_RENDER_OGL 1)
|
||||||
@@ -821,6 +900,7 @@ endmacro()
|
|||||||
macro(CheckOpenGLES)
|
macro(CheckOpenGLES)
|
||||||
if(SDL_OPENGLES)
|
if(SDL_OPENGLES)
|
||||||
cmake_push_check_state()
|
cmake_push_check_state()
|
||||||
|
FindOpenGLHeaders()
|
||||||
list(APPEND CMAKE_REQUIRED_INCLUDES "${SDL3_SOURCE_DIR}/src/video/khronos")
|
list(APPEND CMAKE_REQUIRED_INCLUDES "${SDL3_SOURCE_DIR}/src/video/khronos")
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include <GLES/gl.h>
|
#include <GLES/gl.h>
|
||||||
@@ -1033,22 +1113,22 @@ macro(CheckUSBHID)
|
|||||||
cmake_push_check_state()
|
cmake_push_check_state()
|
||||||
check_library_exists(usbhid hid_init "" LIBUSBHID)
|
check_library_exists(usbhid hid_init "" LIBUSBHID)
|
||||||
if(LIBUSBHID)
|
if(LIBUSBHID)
|
||||||
check_include_file(usbhid.h HAVE_USBHID_H)
|
check_include_files("stdint.h;usbhid.h" HAVE_USBHID_H)
|
||||||
if(HAVE_USBHID_H)
|
if(HAVE_USBHID_H)
|
||||||
set(USB_CFLAGS "-DHAVE_USBHID_H")
|
set(USB_CFLAGS "-DHAVE_USBHID_H")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
check_include_file(libusbhid.h HAVE_LIBUSBHID_H)
|
check_include_files("stdint.h;libusbhid.h" HAVE_LIBUSBHID_H)
|
||||||
if(HAVE_LIBUSBHID_H)
|
if(HAVE_LIBUSBHID_H)
|
||||||
string(APPEND USB_CFLAGS " -DHAVE_LIBUSBHID_H")
|
string(APPEND USB_CFLAGS " -DHAVE_LIBUSBHID_H")
|
||||||
endif()
|
endif()
|
||||||
set(USB_LIBS ${USB_LIBS} usbhid)
|
set(USB_LIBS ${USB_LIBS} usbhid)
|
||||||
else()
|
else()
|
||||||
check_include_file(usb.h HAVE_USB_H)
|
check_include_files("stdint.h;usb.h" HAVE_USB_H)
|
||||||
if(HAVE_USB_H)
|
if(HAVE_USB_H)
|
||||||
set(USB_CFLAGS "-DHAVE_USB_H")
|
set(USB_CFLAGS "-DHAVE_USB_H")
|
||||||
endif()
|
endif()
|
||||||
check_include_file(libusb.h HAVE_LIBUSB_H)
|
check_include_files("stdint.h;libusb.h" HAVE_LIBUSB_H)
|
||||||
if(HAVE_LIBUSB_H)
|
if(HAVE_LIBUSB_H)
|
||||||
string(APPEND USB_CFLAGS " -DHAVE_LIBUSB_H")
|
string(APPEND USB_CFLAGS " -DHAVE_LIBUSB_H")
|
||||||
endif()
|
endif()
|
||||||
@@ -1061,7 +1141,7 @@ macro(CheckUSBHID)
|
|||||||
string(APPEND CMAKE_REQUIRED_FLAGS " ${USB_CFLAGS}")
|
string(APPEND CMAKE_REQUIRED_FLAGS " ${USB_CFLAGS}")
|
||||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${USB_LIBS})
|
list(APPEND CMAKE_REQUIRED_LIBRARIES ${USB_LIBS})
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include <sys/types.h>
|
#include <stdint.h>
|
||||||
#if defined(HAVE_USB_H)
|
#if defined(HAVE_USB_H)
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -1087,7 +1167,7 @@ macro(CheckUSBHID)
|
|||||||
}" HAVE_USBHID)
|
}" HAVE_USBHID)
|
||||||
if(HAVE_USBHID)
|
if(HAVE_USBHID)
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include <sys/types.h>
|
#include <stdint.h>
|
||||||
#if defined(HAVE_USB_H)
|
#if defined(HAVE_USB_H)
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -1115,7 +1195,7 @@ macro(CheckUSBHID)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include <sys/types.h>
|
#include <stdint.h>
|
||||||
#if defined(HAVE_USB_H)
|
#if defined(HAVE_USB_H)
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -1190,12 +1270,15 @@ macro(CheckHIDAPI)
|
|||||||
cmake_pop_check_state()
|
cmake_pop_check_state()
|
||||||
if(HAVE_LIBUSB_H)
|
if(HAVE_LIBUSB_H)
|
||||||
set(HAVE_LIBUSB TRUE)
|
set(HAVE_LIBUSB TRUE)
|
||||||
target_get_dynamic_library(dynamic_libusb LibUSB::LibUSB)
|
if(SDL_HIDAPI_LIBUSB_SHARED)
|
||||||
if(SDL_HIDAPI_LIBUSB_SHARED AND dynamic_libusb)
|
target_get_dynamic_library(dynamic_libusb LibUSB::LibUSB)
|
||||||
set(HAVE_HIDAPI_LIBUSB_SHARED ON)
|
if(dynamic_libusb)
|
||||||
set(SDL_LIBUSB_DYNAMIC "\"${dynamic_libusb}\"")
|
set(HAVE_HIDAPI_LIBUSB_SHARED ON)
|
||||||
sdl_link_dependency(hidapi INCLUDES $<TARGET_PROPERTY:LibUSB::LibUSB,INTERFACE_INCLUDE_DIRECTORIES>)
|
set(SDL_LIBUSB_DYNAMIC "\"${dynamic_libusb}\"")
|
||||||
else()
|
sdl_link_dependency(hidapi INCLUDES $<TARGET_PROPERTY:LibUSB::LibUSB,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(NOT HAVE_HIDAPI_LIBUSB_SHARED)
|
||||||
sdl_link_dependency(hidapi LIBS LibUSB::LibUSB PKG_CONFIG_SPECS "${LibUSB_PKG_CONFIG_SPEC}" CMAKE_MODULE LibUSB)
|
sdl_link_dependency(hidapi LIBS LibUSB::LibUSB PKG_CONFIG_SPECS "${LibUSB_PKG_CONFIG_SPEC}" CMAKE_MODULE LibUSB)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ macro(SDL_DetectCompiler)
|
|||||||
set(USE_GCC FALSE)
|
set(USE_GCC FALSE)
|
||||||
set(USE_INTELCC FALSE)
|
set(USE_INTELCC FALSE)
|
||||||
set(USE_QCC FALSE)
|
set(USE_QCC FALSE)
|
||||||
|
set(USE_TCC FALSE)
|
||||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang|IntelLLVM")
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang|IntelLLVM")
|
||||||
set(USE_CLANG TRUE)
|
set(USE_CLANG TRUE)
|
||||||
# Visual Studio 2019 v16.2 added support for Clang/LLVM.
|
# Visual Studio 2019 v16.2 added support for Clang/LLVM.
|
||||||
@@ -10,12 +11,14 @@ macro(SDL_DetectCompiler)
|
|||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(MSVC_CLANG TRUE)
|
set(MSVC_CLANG TRUE)
|
||||||
endif()
|
endif()
|
||||||
elseif(CMAKE_COMPILER_IS_GNUCC)
|
elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||||
set(USE_GCC TRUE)
|
set(USE_GCC TRUE)
|
||||||
elseif(CMAKE_C_COMPILER_ID MATCHES "^Intel$")
|
elseif(CMAKE_C_COMPILER_ID MATCHES "^Intel$")
|
||||||
set(USE_INTELCC TRUE)
|
set(USE_INTELCC TRUE)
|
||||||
elseif(CMAKE_C_COMPILER_ID MATCHES "QCC")
|
elseif(CMAKE_C_COMPILER_ID MATCHES "QCC")
|
||||||
set(USE_QCC TRUE)
|
set(USE_QCC TRUE)
|
||||||
|
elseif(CMAKE_C_COMPILER_ID MATCHES "TinyCC")
|
||||||
|
set(USE_TCC TRUE)
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
@@ -39,7 +42,7 @@ function(SDL_AddCommonCompilerFlags TARGET)
|
|||||||
cmake_pop_check_state()
|
cmake_pop_check_state()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC)
|
if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC OR USE_TCC)
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
# See if GCC's -gdwarf-4 is supported
|
# See if GCC's -gdwarf-4 is supported
|
||||||
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101377 for why this is needed on Windows
|
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101377 for why this is needed on Windows
|
||||||
@@ -159,6 +162,10 @@ function(SDL_AddCommonCompilerFlags TARGET)
|
|||||||
sdl_target_compile_option_all_languages(${TARGET} "-fdiagnostics-color=always")
|
sdl_target_compile_option_all_languages(${TARGET} "-fdiagnostics-color=always")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(USE_TCC)
|
||||||
|
sdl_target_compile_option_all_languages(${TARGET} "-DSTBI_NO_SIMD")
|
||||||
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(check_x86_source_compiles BODY VAR)
|
function(check_x86_source_compiles BODY VAR)
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ SDL_LDFLAGS="$( pkg-config sdl3 --libs )"
|
|||||||
SDL_STATIC_LDFLAGS="$( pkg-config sdl3 --libs --static )"
|
SDL_STATIC_LDFLAGS="$( pkg-config sdl3 --libs --static )"
|
||||||
|
|
||||||
compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_pkgconfig.c.o $SDL_CFLAGS $CFLAGS"
|
compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_pkgconfig.c.o $SDL_CFLAGS $CFLAGS"
|
||||||
link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig${EXESUFFIX} $SDL_LDFLAGS $LDFLAGS"
|
link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig${EXESUFFIX} $SDL_CFLAGS $CFLAGS $SDL_LDFLAGS $LDFLAGS"
|
||||||
static_link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig_static${EXESUFFIX} $SDL_STATIC_LDFLAGS $LDFLAGS"
|
static_link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig_static${EXESUFFIX} $SDL_CFLAGS $CFLAGS $SDL_STATIC_LDFLAGS $LDFLAGS"
|
||||||
|
|
||||||
echo "-- CC: $CC"
|
echo "-- CC: $CC"
|
||||||
echo "-- CFLAGS: $CFLAGS"
|
echo "-- CFLAGS: $CFLAGS"
|
||||||
echo "-- LDFLASG: $LDFLAGS"
|
echo "-- LDFLAGS: $LDFLAGS"
|
||||||
echo "-- SDL_CFLAGS: $SDL_CFLAGS"
|
echo "-- SDL_CFLAGS: $SDL_CFLAGS"
|
||||||
echo "-- SDL_LDFLAGS: $SDL_LDFLAGS"
|
echo "-- SDL_LDFLAGS: $SDL_LDFLAGS"
|
||||||
echo "-- SDL_STATIC_LDFLAGS: $SDL_STATIC_LDFLAGS"
|
echo "-- SDL_STATIC_LDFLAGS: $SDL_STATIC_LDFLAGS"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/$<CONFIGURATION>")
|
|||||||
# This assumes the SDL source is available in vendored/SDL
|
# This assumes the SDL source is available in vendored/SDL
|
||||||
add_subdirectory(vendored/SDL EXCLUDE_FROM_ALL)
|
add_subdirectory(vendored/SDL EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
# on Web targets, we need CMake to generate a HTML webpage.
|
# on Web targets, we need CMake to generate a HTML webpage.
|
||||||
if(EMSCRIPTEN)
|
if(EMSCRIPTEN)
|
||||||
set(CMAKE_EXECUTABLE_SUFFIX ".html" CACHE INTERNAL "")
|
set(CMAKE_EXECUTABLE_SUFFIX ".html" CACHE INTERNAL "")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Introduction to SDL with MinGW
|
# Introduction to SDL with MinGW
|
||||||
|
|
||||||
Without getting deep into the history, MinGW is a long running project that aims to bring gcc to Windows. That said, there's many distributions, versions, and forks floating around. We recommend installing [MSYS2](https://www.msys2.org/), as it's the easiest way to get a modern toolchain with a package manager to help with dependency management. This would allow you to follow the MSYS2 section below.
|
Without getting deep into the history, MinGW is a long running project that aims to bring gcc to Windows. That said, there's many distributions, versions, and forks floating around. We recommend installing [MSYS2](https://www.msys2.org/), as it's the easiest way to get a modern toolchain with a package manager to help with dependency management. This would allow you to follow the MSYS2 section below.
|
||||||
|
|
||||||
Otherwise you'll want to follow the "Other Distributions" section below.
|
Otherwise you'll want to follow the "Other Distributions" section below.
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ This should print out which library directory we'll need to use when compiling,
|
|||||||
Now we should have everything needed to compile and run our program. You'll need to ensure to replace `<version>` with the version of the release of SDL3 you downloaded, as well as use the `<arch>` we learned in the previous section.
|
Now we should have everything needed to compile and run our program. You'll need to ensure to replace `<version>` with the version of the release of SDL3 you downloaded, as well as use the `<arch>` we learned in the previous section.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
gcc hello.c -o hello.exe -I SDL3-<version>/<arch>/include -L SDL3-<version>/<arch>/lib -lSDL3 -mwindows
|
gcc hello.c -o hello.exe -I SDL3-<version>/<arch>/include -L SDL3-<version>/<arch>/lib -lSDL3 -mwindows
|
||||||
cp SDL3-<version>/<arch>/bin/SDL3.dll SDL3.dll
|
cp SDL3-<version>/<arch>/bin/SDL3.dll SDL3.dll
|
||||||
./hello.exe
|
./hello.exe
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ build-scripts/create-android-project.py --variant aar com.yourcompany.yourapp <
|
|||||||
Customizing your application name
|
Customizing your application name
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
To customize your application name, edit AndroidManifest.xml and build.gradle to replace
|
To customize your application name, edit build.gradle to replace
|
||||||
"org.libsdl.app" with an identifier for your product package.
|
"org.libsdl.app" with an identifier for your product package.
|
||||||
|
|
||||||
Then create a Java class extending SDLActivity and place it in a directory
|
Then create a Java class extending SDLActivity and place it in a directory
|
||||||
@@ -194,6 +194,8 @@ Here's an example of a minimal class file:
|
|||||||
Then replace "SDLActivity" in AndroidManifest.xml with the name of your
|
Then replace "SDLActivity" in AndroidManifest.xml with the name of your
|
||||||
class, .e.g. "MyGame"
|
class, .e.g. "MyGame"
|
||||||
|
|
||||||
|
Then edit app/src/main/res/values/strings.xml and change the name there.
|
||||||
|
|
||||||
|
|
||||||
Customizing your application icon
|
Customizing your application icon
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|||||||
@@ -4,3 +4,4 @@ SDL is fully supported on BSD platforms, and is built using [CMake](README-cmake
|
|||||||
|
|
||||||
If you want to run on the console, you can take a look at [KMSDRM support on BSD](README-kmsbsd.md)
|
If you want to run on the console, you can take a look at [KMSDRM support on BSD](README-kmsbsd.md)
|
||||||
|
|
||||||
|
SDL is [not designed to be used in setuid or setgid executables](README-platforms.md#setuid).
|
||||||
|
|||||||
@@ -169,31 +169,33 @@ for several reasons, not the least of which being that no one likes when a
|
|||||||
random browser tab suddenly starts making noise and the user has to scramble
|
random browser tab suddenly starts making noise and the user has to scramble
|
||||||
to figure out which and silence it.
|
to figure out which and silence it.
|
||||||
|
|
||||||
SDL will allow you to open the audio device for playback in this
|
SDL will allow you to open the audio device for playback in this circumstance,
|
||||||
circumstance, and your audio callback will fire, but SDL will throw the audio
|
and your audio streams will consume data, but SDL will throw the audio data
|
||||||
data away until the user interacts with the page. This helps apps that depend
|
away until the user interacts with the page. This helps apps that depend on
|
||||||
on the audio callback to make progress, and also keeps audio playback in sync
|
the audio callback to make progress, and also keeps audio playback in sync
|
||||||
once the app is finally allowed to make noise.
|
once the app is finally allowed to make noise.
|
||||||
|
|
||||||
There are two reasonable ways to deal with the silence at the app level:
|
There are two reasonable ways to deal with the silence at the app level:
|
||||||
if you are writing some sort of media player thing, where the user expects
|
if you are writing some sort of media player thing, where the user expects
|
||||||
there to be a volume control when you mouseover the canvas, just default
|
there to be a volume control when you mouseover the canvas, just default
|
||||||
that control to a muted state; if the user clicks on the control to unmute
|
that control to a muted state; if the user clicks on the control to unmute
|
||||||
it, on this first click, open the audio device. This allows the media to
|
it, on this first click, adjust your app's volume appropriately, and SDL will
|
||||||
|
also start actually feeding the data to the browser. This allows the media to
|
||||||
play at start, and the user can reasonably opt-in to listening.
|
play at start, and the user can reasonably opt-in to listening.
|
||||||
|
|
||||||
Many games do not have this sort of UI, and are more rigid about starting
|
Many games do not have this sort of UI. For these, your best bet might be to
|
||||||
audio along with everything else at the start of the process. For these, your
|
write a little Javascript that puts up a "Click here to play!" UI, and upon
|
||||||
best bet is to write a little Javascript that puts up a "Click here to play!"
|
the user clicking, remove that UI and then call the Emscripten app's main()
|
||||||
UI, and upon the user clicking, remove that UI and then call the Emscripten
|
function. As far as the application knows, audio was able to play as soon as
|
||||||
app's main() function. As far as the application knows, the audio device was
|
the program started, and since this magic happens in a little Javascript, you
|
||||||
available to be opened as soon as the program started, and since this magic
|
don't have to change your C/C++ code at all to make it happen.
|
||||||
happens in a little Javascript, you don't have to change your C/C++ code at
|
|
||||||
all to make it happen.
|
|
||||||
|
|
||||||
Please see the discussion at https://github.com/libsdl-org/SDL/issues/6385
|
Please see the discussion at https://github.com/libsdl-org/SDL/issues/6385
|
||||||
for some Javascript code to steal for this approach.
|
for some Javascript code to steal for this approach.
|
||||||
|
|
||||||
|
But if a game can just do without audio until the user clicks on the page,
|
||||||
|
it will still operate correctly, as if the page was merely muted before then.
|
||||||
|
|
||||||
|
|
||||||
## Rendering
|
## Rendering
|
||||||
|
|
||||||
@@ -208,12 +210,15 @@ Calling SDL_RenderPresent (or SDL_GL_SwapWindow) will not actually
|
|||||||
present anything on the screen until your return from your mainloop
|
present anything on the screen until your return from your mainloop
|
||||||
function.
|
function.
|
||||||
|
|
||||||
Note that on other platforms, SDL will default to vsync _off_ in the 2D render
|
Note that SDL attempts to default to vsync _off_ on all platforms. You almost
|
||||||
API. Since changing this will affect how the mainloop runs, the 2D render API
|
certainly do _not_ want this in Emscripten, however, as it will affect the
|
||||||
will only change vsync settings if explicitly requested by the app, either
|
efficiency of the mainloop. If using OpenGL directly, you should call
|
||||||
with SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER, or calling
|
SDL_GL_SetSwapInterval(1) sometime near startup; if using the 2D render API,
|
||||||
SDL_SetRenderVSync(). Otherwise it will default to whatever the Emscripten
|
either create the renderer with with the property
|
||||||
mainloop is set to use via emscripten_set_main_loop().
|
SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER set to 1, or call
|
||||||
|
SDL_SetRenderVSync(renderer, 1). If you don't explicitly set vsync, you'll get
|
||||||
|
a higher (but perhaps unstable) framerate, and use more power, but it will
|
||||||
|
still work. Choosing a vsync of 1 will use requestAnimationFrame if possible.
|
||||||
|
|
||||||
If you're using the SDL main callbacks, the mainloop defaults to using
|
If you're using the SDL main callbacks, the mainloop defaults to using
|
||||||
requestAnimationFrame (effectively vsync), because it calls
|
requestAnimationFrame (effectively vsync), because it calls
|
||||||
@@ -226,9 +231,14 @@ most efficient, consistent, and correct way to run a game in a web browser.
|
|||||||
|
|
||||||
## Building SDL/emscripten
|
## Building SDL/emscripten
|
||||||
|
|
||||||
|
Use the latest stable Emscripten release!
|
||||||
|
|
||||||
SDL currently requires at least Emscripten 3.16.0 to build. Newer versions
|
It's possible to build SDL with older Emscripten releases, such as 3.x, but
|
||||||
are likely to work, as well.
|
several things will be silently broken, as bugs got fixed and web standards
|
||||||
|
solidified over time. At the time of this writing, Emscripten 4.0.x is the
|
||||||
|
current stable release. You're encouraged to install the latest stable release
|
||||||
|
(`emsdk install latest ; emsdk activate latest` if using Emscripten's setup
|
||||||
|
script), and make sure you're reasonably up to date as time goes on.
|
||||||
|
|
||||||
|
|
||||||
Build:
|
Build:
|
||||||
@@ -336,6 +346,80 @@ all has to live in memory at runtime.
|
|||||||
[Emscripten's documentation on the matter](https://emscripten.org/docs/porting/files/packaging_files.html)
|
[Emscripten's documentation on the matter](https://emscripten.org/docs/porting/files/packaging_files.html)
|
||||||
gives other options and details, and is worth a read.
|
gives other options and details, and is worth a read.
|
||||||
|
|
||||||
|
Please also read the next section on persistent storage, for a little help
|
||||||
|
from SDL.
|
||||||
|
|
||||||
|
|
||||||
|
## Automount persistent storage
|
||||||
|
|
||||||
|
The file tree in Emscripten is provided by MEMFS by default, which stores all
|
||||||
|
files in RAM. This is often what you want, because it's fast and can be
|
||||||
|
accessed with the usual synchronous i/o functions like fopen or SDL_IOFromFile.
|
||||||
|
You can also write files to MEMFS, but when the browser tab goes away, so do
|
||||||
|
the files. But we want things like high scores, save games, etc, to still
|
||||||
|
exist if we reload the game later.
|
||||||
|
|
||||||
|
For this, Emscripten offers IDBFS, which backs files with the browser's
|
||||||
|
[IndexedDB](https://en.wikipedia.org/wiki/IndexedDB) functionality.
|
||||||
|
|
||||||
|
To use this, the app has to mount the IDBFS filesystem somewhere in the
|
||||||
|
virtual file tree, and then wait for it to sync up. This needs to be done in
|
||||||
|
Javascript code. The sync will not complete until at least one (but possibly
|
||||||
|
several) iterations of the mainloop have passed, which means you can not
|
||||||
|
access any saved files during main() or SDL_AppInit() by default.
|
||||||
|
|
||||||
|
SDL can solve this problem for you: it can be built to automatically mount the
|
||||||
|
persistent files from IDBFS to a specific place in the file tree and wait
|
||||||
|
until the sync has completed before calling main() or SDL_AppInit(), so to
|
||||||
|
your C code, it looks like the files were always available.
|
||||||
|
|
||||||
|
To use this functionality, set the CMake variable
|
||||||
|
`SDL_EMSCRIPTEN_PERSISTENT_PATH` to a path in the filetree where persistent
|
||||||
|
storage should be mounted:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
emcmake cmake -DSDL_EMSCRIPTEN_PERSISTENT_PATH=/storage ..
|
||||||
|
```
|
||||||
|
|
||||||
|
You should also link your app with `-lidbfs.js`. If your project links to SDL
|
||||||
|
using CMake's find_package(SDL3), or uses `pkg-config sdl3 --libs`, this will
|
||||||
|
be handled for you when used with an SDL built with
|
||||||
|
`-DSDL_EMSCRIPTEN_PERSISTENT_PATH`.
|
||||||
|
|
||||||
|
Now `/storage` will be prepared when your program runs, and SDL_GetPrefPath()
|
||||||
|
will return a directory under that path. The storage is mounted with the
|
||||||
|
`autoPersist: true` option, so when you write to that tree, whether with
|
||||||
|
SDL APIs or other functions like fopen(), Emscripten will know it needs to
|
||||||
|
sync that data back to the persistent database, and will do so automatically
|
||||||
|
within the next few iterations of the mainloop.
|
||||||
|
|
||||||
|
It's best to assume the sync will take a few frames to complete, and the
|
||||||
|
data is not safe until it does.
|
||||||
|
|
||||||
|
To summarize how to automate this:
|
||||||
|
|
||||||
|
- Build with `emcmake cmake -DSDL_EMSCRIPTEN_PERSISTENT_PATH=/storage`
|
||||||
|
- Link your app with `-lidbfs.js` if not handled automatically.
|
||||||
|
- Write under `/storage`, or use SDL_GetPrefPath()
|
||||||
|
|
||||||
|
|
||||||
|
## Customizing index.html
|
||||||
|
|
||||||
|
You don't have to use the HTML that Emscripten produces; the above examples
|
||||||
|
use `emcc -o index.html`, but you can `-o index.js` instead to just output
|
||||||
|
code without an HTML page, and then provide your own. This is desirable for
|
||||||
|
shipping products, even though the Emscripten-provided HTML is fine for
|
||||||
|
prototyping. Certain things _must_ be in the HTML file or your program will
|
||||||
|
not function correctly (or function at all). The specifics are beyond the
|
||||||
|
scope of this document, but it's likely best to start with the Emscripten HTML
|
||||||
|
and customize it, instead of starting from scratch.
|
||||||
|
|
||||||
|
The `<canvas>` element in the HTML _must not_ have a border or padding, or
|
||||||
|
things will break in unexpected ways. This can be surprising when customizing
|
||||||
|
the page's look. Plan accordingly.
|
||||||
|
|
||||||
|
|
||||||
## Debugging
|
## Debugging
|
||||||
|
|
||||||
@@ -351,9 +435,9 @@ If you try debugging in Firefox and it doesn't work well for no apparent
|
|||||||
reason, try Chrome, and vice-versa. These tools are still relatively new,
|
reason, try Chrome, and vice-versa. These tools are still relatively new,
|
||||||
and improving all the time.
|
and improving all the time.
|
||||||
|
|
||||||
SDL_Log() (or even plain old printf) will write to the Javascript console,
|
SDL_Log() (or printf) will write to the Javascript console,
|
||||||
and honestly I find printf-style debugging to be easier than setting up a build
|
so printf-style debugging can be easier than setting up a build
|
||||||
for proper debugging, so use whatever tools work best for you.
|
for proper debugging. Use whatever tools work best for you.
|
||||||
|
|
||||||
|
|
||||||
## Questions?
|
## Questions?
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ The Windows GDK port supports the full set of Win32 APIs, renderers, controllers
|
|||||||
|
|
||||||
* Single-player games have some additional features available:
|
* Single-player games have some additional features available:
|
||||||
* Call `SDL_GetGDKDefaultUser` to get the default XUserHandle pointer.
|
* Call `SDL_GetGDKDefaultUser` to get the default XUserHandle pointer.
|
||||||
* `SDL_GetPrefPath` still works, but only for single-player titles.
|
* `SDL_GetPrefPath` and `SDL_Storage` still work, but only for single-player titles.
|
||||||
|
* To enable support for these APIs, use `SDL_SetHint` to set `SDL_GDK_SERVICE_CONFIGURATION_ID` to your SCID string at startup (it should be formatted like `"00000000-0000-0000-0000-000000000000"`)
|
||||||
|
|
||||||
These functions mostly wrap around async APIs, and thus should be treated as synchronous alternatives. Also note that the single-player functions return on any OS errors, so be sure to validate the return values!
|
These functions mostly wrap around async APIs, and thus should be treated as synchronous alternatives. Also note that the single-player functions return on any OS errors, so be sure to validate the return values!
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ Embedding the SDL3 Xcode project makes SDL3.framework a target of your app, so i
|
|||||||
fi
|
fi
|
||||||
```
|
```
|
||||||
3. Below the script entry uncheck the "Run Script:" options "For install builds only" and "Based on dependency analysis"
|
3. Below the script entry uncheck the "Run Script:" options "For install builds only" and "Based on dependency analysis"
|
||||||
|
4. Edit the Build Settings and set "User Script Sandboxing" to "No".
|
||||||
|
|
||||||
TODO: Add information regarding App Store requirements such as icons, etc.
|
TODO: Add information regarding App Store requirements such as icons, etc.
|
||||||
|
|
||||||
@@ -102,6 +103,19 @@ matrix using the size in points (SDL_GetWindowSize()) can be used in order to
|
|||||||
display content at the same scale no matter whether a Retina device is used or not.
|
display content at the same scale no matter whether a Retina device is used or not.
|
||||||
|
|
||||||
|
|
||||||
|
Notes -- Getting full screen resolution
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
Make sure that you have a Launch Screen key in your Info.plist, e.g.
|
||||||
|
```
|
||||||
|
<key>UILaunchScreen</key>
|
||||||
|
<dict/>
|
||||||
|
```
|
||||||
|
If you don't specify a launch screen, then the OS will assume that your
|
||||||
|
application needs an older compatibility mode and will get a limited
|
||||||
|
resolution screen.
|
||||||
|
|
||||||
|
|
||||||
Notes -- Application events
|
Notes -- Application events
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ system does not have the XRandR libraries installed, it will be disabled
|
|||||||
at runtime, and you won't get a missing library error, at least with the
|
at runtime, and you won't get a missing library error, at least with the
|
||||||
default configuration parameters.
|
default configuration parameters.
|
||||||
|
|
||||||
|
SDL is [not designed to be used in setuid or setgid executables](README-platforms.md#setuid).
|
||||||
|
|
||||||
Build Dependencies
|
Build Dependencies
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
@@ -19,7 +20,7 @@ Ubuntu 18.04, all available features enabled:
|
|||||||
libaudio-dev libfribidi-dev libjack-dev libsndio-dev libx11-dev libxext-dev \
|
libaudio-dev libfribidi-dev libjack-dev libsndio-dev libx11-dev libxext-dev \
|
||||||
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev \
|
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev \
|
||||||
libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-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
|
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev libthai-dev
|
||||||
|
|
||||||
Ubuntu 22.04+ can also add `libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev` to that command line.
|
Ubuntu 22.04+ can also add `libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev` to that command line.
|
||||||
|
|
||||||
@@ -28,14 +29,16 @@ Fedora 35, all available features enabled:
|
|||||||
sudo dnf install gcc git-core make cmake \
|
sudo dnf install gcc git-core make cmake \
|
||||||
alsa-lib-devel fribidi-devel pulseaudio-libs-devel pipewire-devel \
|
alsa-lib-devel fribidi-devel pulseaudio-libs-devel pipewire-devel \
|
||||||
libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \
|
libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \
|
||||||
libXi-devel libXScrnSaver-devel dbus-devel ibus-devel \
|
libXi-devel libXScrnSaver-devel libXtst-devel dbus-devel ibus-devel \
|
||||||
systemd-devel mesa-libGL-devel libxkbcommon-devel mesa-libGLES-devel \
|
systemd-devel mesa-libGL-devel libxkbcommon-devel mesa-libGLES-devel \
|
||||||
mesa-libEGL-devel vulkan-devel wayland-devel wayland-protocols-devel \
|
mesa-libEGL-devel vulkan-devel wayland-devel wayland-protocols-devel \
|
||||||
libdrm-devel mesa-libgbm-devel libusb1-devel libdecor-devel \
|
libdrm-devel mesa-libgbm-devel libusb1-devel libdecor-devel \
|
||||||
pipewire-jack-audio-connection-kit-devel
|
pipewire-jack-audio-connection-kit-devel libthai-devel
|
||||||
|
|
||||||
Fedora 39+ can also add `liburing-devel` to that command line.
|
Fedora 39+ can also add `liburing-devel` to that command line.
|
||||||
|
|
||||||
|
Fedora 40+ needs `zlib-ng-compat-static` to be added to that command line.
|
||||||
|
|
||||||
NOTES:
|
NOTES:
|
||||||
- The sndio audio target is unavailable on Fedora (but probably not what you
|
- The sndio audio target is unavailable on Fedora (but probably not what you
|
||||||
should want to use anyhow).
|
should want to use anyhow).
|
||||||
@@ -44,11 +47,11 @@ openSUSE Tumbleweed:
|
|||||||
|
|
||||||
sudo zypper in libunwind-devel libusb-1_0-devel Mesa-libGL-devel libxkbcommon-devel libdrm-devel \
|
sudo zypper in libunwind-devel libusb-1_0-devel Mesa-libGL-devel libxkbcommon-devel libdrm-devel \
|
||||||
libgbm-devel pipewire-devel libpulse-devel sndio-devel Mesa-libEGL-devel alsa-devel xwayland-devel \
|
libgbm-devel pipewire-devel libpulse-devel sndio-devel Mesa-libEGL-devel alsa-devel xwayland-devel \
|
||||||
wayland-devel wayland-protocols-devel
|
wayland-devel wayland-protocols-devel libthai-devel fribidi-devel
|
||||||
|
|
||||||
Arch:
|
Arch:
|
||||||
|
|
||||||
sudo pacman -S alsa-lib cmake hidapi ibus jack libdecor libgl libpulse libusb libx11 libxcursor libxext libxinerama libxkbcommon libxrandr libxrender libxss libxtst mesa ninja pipewire sndio vulkan-driver vulkan-headers wayland wayland-protocols
|
sudo pacman -S alsa-lib cmake hidapi ibus jack libdecor libthai fribidi libgl libpulse libusb libx11 libxcursor libxext libxfixes libxi libxinerama libxkbcommon libxrandr libxrender libxss libxtst mesa ninja pipewire sndio vulkan-driver vulkan-headers wayland wayland-protocols
|
||||||
|
|
||||||
|
|
||||||
Joystick does not work
|
Joystick does not work
|
||||||
|
|||||||
@@ -32,6 +32,10 @@ sudo cmake --install .
|
|||||||
|
|
||||||
Please note that building SDL requires at least Xcode 12.2 and the macOS 11.0 SDK.
|
Please note that building SDL requires at least Xcode 12.2 and the macOS 11.0 SDK.
|
||||||
|
|
||||||
|
If you are getting errors building SDL_mfijoystick.m with Xcode 12.2, find your SDKs
|
||||||
|
directory and move MacOSX10.15.sdk out of the way so it isn't accidentally being used
|
||||||
|
by the build environment.
|
||||||
|
|
||||||
To use the library once it's built, you essential have two possibilities:
|
To use the library once it's built, you essential have two possibilities:
|
||||||
use the traditional autoconf/automake/make method, or use Xcode.
|
use the traditional autoconf/automake/make method, or use Xcode.
|
||||||
|
|
||||||
@@ -73,6 +77,8 @@ NSApplicationDelegate implementation:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
SDL is [not designed to be used in setuid or setgid executables](README-platforms.md#setuid).
|
||||||
|
|
||||||
# Using the Simple DirectMedia Layer with a traditional Makefile
|
# Using the Simple DirectMedia Layer with a traditional Makefile
|
||||||
|
|
||||||
An existing build system for your SDL app has good chances to work almost
|
An existing build system for your SDL app has good chances to work almost
|
||||||
|
|||||||
@@ -206,6 +206,13 @@ The SDL_AppResult value that terminated the app is provided here, in case
|
|||||||
it's useful to know if this was a successful or failing run of the app.
|
it's useful to know if this was a successful or failing run of the app.
|
||||||
|
|
||||||
|
|
||||||
|
## Using main functions from other languages
|
||||||
|
|
||||||
|
If you're not using C/C++, using SDL's entry points is still possible but is
|
||||||
|
more complex. Please refer to https://wiki.libsdl.org/SDL3/NonstandardStartup
|
||||||
|
for the technical details.
|
||||||
|
|
||||||
|
|
||||||
## Summary and Best Practices
|
## Summary and Best Practices
|
||||||
|
|
||||||
- **Always Include SDL_main.h in One Source File:** When working with SDL,
|
- **Always Include SDL_main.h in One Source File:** When working with SDL,
|
||||||
|
|||||||
@@ -45,3 +45,18 @@ All of these still work with [SDL2](/SDL2), which is an incompatible API, but an
|
|||||||
- OS/2
|
- OS/2
|
||||||
- WinPhone
|
- WinPhone
|
||||||
- WinRT/UWP
|
- WinRT/UWP
|
||||||
|
|
||||||
|
## General notes for Unix platforms
|
||||||
|
|
||||||
|
Some aspects of SDL functionality are common to all Unix-based platforms.
|
||||||
|
|
||||||
|
### <a name=setuid></a>Privileged processes (setuid, setgid, setcap)
|
||||||
|
|
||||||
|
SDL is not designed to be used in programs with elevated privileges,
|
||||||
|
such as setuid (`chmod u+s`) or setgid (`chmod g+s`) executables,
|
||||||
|
or executables with file-based capabilities
|
||||||
|
(`setcap cap_sys_nice+ep` or similar).
|
||||||
|
It does not make any attempt to avoid trusting environment variables
|
||||||
|
or other aspects of the inherited execution environment.
|
||||||
|
Programs running with elevated privileges in an attacker-controlled
|
||||||
|
execution environment should not call SDL functions.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
|||||||
return SDL_APP_FAILURE;
|
return SDL_APP_FAILURE;
|
||||||
} else if (devcount == 0) {
|
} else if (devcount == 0) {
|
||||||
SDL_Log("Couldn't find any camera devices! Please connect a camera and try again.");
|
SDL_Log("Couldn't find any camera devices! Please connect a camera and try again.");
|
||||||
|
SDL_free(devices);
|
||||||
return SDL_APP_FAILURE;
|
return SDL_APP_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ static void draw(SDL_Renderer *renderer, const float (*edges)[6], const Player p
|
|||||||
SDL_RenderLine(renderer, hor_origin-10, ver_origin, hor_origin+10, ver_origin);
|
SDL_RenderLine(renderer, hor_origin-10, ver_origin, hor_origin+10, ver_origin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SDL_SetRenderClipRect(renderer, 0);
|
SDL_SetRenderClipRect(renderer, NULL);
|
||||||
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
|
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
|
||||||
SDL_RenderDebugText(renderer, 0, 0, debug_string);
|
SDL_RenderDebugText(renderer, 0, 0, debug_string);
|
||||||
SDL_RenderPresent(renderer);
|
SDL_RenderPresent(renderer);
|
||||||
|
|||||||
@@ -77,8 +77,9 @@ SDL_AppResult SDL_AppIterate(void *appstate)
|
|||||||
const float size = 30.0f;
|
const float size = 30.0f;
|
||||||
const float x = 320.0f;
|
const float x = 320.0f;
|
||||||
const float y = 95.0f - (size / 2.0f);
|
const float y = 95.0f - (size / 2.0f);
|
||||||
|
const float r = (float) i * (SDL_PI_F / 180.0f);
|
||||||
SDL_SetRenderDrawColor(renderer, SDL_rand(256), SDL_rand(256), SDL_rand(256), SDL_ALPHA_OPAQUE);
|
SDL_SetRenderDrawColor(renderer, SDL_rand(256), SDL_rand(256), SDL_rand(256), SDL_ALPHA_OPAQUE);
|
||||||
SDL_RenderLine(renderer, x, y, x + SDL_sinf((float) i) * size, y + SDL_cosf((float) i) * size);
|
SDL_RenderLine(renderer, x, y, x + SDL_cosf(r) * size, y + SDL_sinf(r) * size);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_RenderPresent(renderer); /* put it all on the screen! */
|
SDL_RenderPresent(renderer); /* put it all on the screen! */
|
||||||
|
|||||||
@@ -40,14 +40,14 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
|||||||
|
|
||||||
/* Textures are pixel data that we upload to the video hardware for fast drawing. Lots of 2D
|
/* Textures are pixel data that we upload to the video hardware for fast drawing. Lots of 2D
|
||||||
engines refer to these as "sprites." We'll do a static texture (upload once, draw many
|
engines refer to these as "sprites." We'll do a static texture (upload once, draw many
|
||||||
times) with data from a bitmap file. */
|
times) with data from a png file. */
|
||||||
|
|
||||||
/* SDL_Surface is pixel data the CPU can access. SDL_Texture is pixel data the GPU can access.
|
/* SDL_Surface is pixel data the CPU can access. SDL_Texture is pixel data the GPU can access.
|
||||||
Load a .png into a surface, move it to a texture from there. */
|
Load a .png into a surface, move it to a texture from there. */
|
||||||
SDL_asprintf(&png_path, "%ssample.png", SDL_GetBasePath()); /* allocate a string of the full file path */
|
SDL_asprintf(&png_path, "%ssample.png", SDL_GetBasePath()); /* allocate a string of the full file path */
|
||||||
surface = SDL_LoadPNG(png_path);
|
surface = SDL_LoadPNG(png_path);
|
||||||
if (!surface) {
|
if (!surface) {
|
||||||
SDL_Log("Couldn't load bitmap: %s", SDL_GetError());
|
SDL_Log("Couldn't load png: %s", SDL_GetError());
|
||||||
return SDL_APP_FAILURE;
|
return SDL_APP_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ SDL_AppResult SDL_AppIterate(void *appstate)
|
|||||||
|
|
||||||
/* To update a streaming texture, you need to lock it first. This gets you access to the pixels.
|
/* To update a streaming texture, you need to lock it first. This gets you access to the pixels.
|
||||||
Note that this is considered a _write-only_ operation: the buffer you get from locking
|
Note that this is considered a _write-only_ operation: the buffer you get from locking
|
||||||
might not acutally have the existing contents of the texture, and you have to write to every
|
might not actually have the existing contents of the texture, and you have to write to every
|
||||||
locked pixel! */
|
locked pixel! */
|
||||||
|
|
||||||
/* You can use SDL_LockTexture() to get an array of raw pixels, but we're going to use
|
/* You can use SDL_LockTexture() to get an array of raw pixels, but we're going to use
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
|
|
||||||
#output-container:hover,
|
#output-container:hover,
|
||||||
#output-container:focus-within {
|
#output-container:focus-within {
|
||||||
top: 50%;
|
top: 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#output-container:focus-within {
|
#output-container:focus-within {
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
|
|
||||||
#source-code:hover,
|
#source-code:hover,
|
||||||
#source-code:focus-within {
|
#source-code:focus-within {
|
||||||
top: 50%;
|
top: 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#source-code:focus-within {
|
#source-code:focus-within {
|
||||||
@@ -241,7 +241,7 @@
|
|||||||
return function(text) {
|
return function(text) {
|
||||||
var elem = document.getElementById('output-container');
|
var elem = document.getElementById('output-container');
|
||||||
if (elem.style['top'] == '') {
|
if (elem.style['top'] == '') {
|
||||||
elem.style['top'] = '50%';
|
elem.style['top'] = '20%';
|
||||||
setTimeout(function() { elem.style['top'] = ''; }, 3000);
|
setTimeout(function() { elem.style['top'] = ''; }, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main include header for the SDL library, version 3.3.2
|
* Main include header for the SDL library, version 3.4.6
|
||||||
*
|
*
|
||||||
* It is almost always best to include just this one header instead of
|
* It is almost always best to include just this one header instead of
|
||||||
* picking out individual headers included here. There are exceptions to
|
* picking out individual headers included here. There are exceptions to
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -136,7 +136,7 @@ extern "C" {
|
|||||||
#define SDL_TriggerBreakpoint() __builtin_debugtrap()
|
#define SDL_TriggerBreakpoint() __builtin_debugtrap()
|
||||||
#elif SDL_HAS_BUILTIN(__builtin_trap)
|
#elif SDL_HAS_BUILTIN(__builtin_trap)
|
||||||
#define SDL_TriggerBreakpoint() __builtin_trap()
|
#define SDL_TriggerBreakpoint() __builtin_trap()
|
||||||
#elif (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
|
#elif (defined(__GNUC__) || defined(__clang__) || defined(__TINYC__) || defined(__slimcc__)) && (defined(__i386__) || defined(__x86_64__))
|
||||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||||
#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
|
#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
|
||||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" )
|
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" )
|
||||||
@@ -160,7 +160,7 @@ extern "C" {
|
|||||||
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A macro that reports the current function being compiled.
|
* A constant that contains the current function being compiled.
|
||||||
*
|
*
|
||||||
* If SDL can't figure how the compiler reports this, it will use "???".
|
* If SDL can't figure how the compiler reports this, it will use "???".
|
||||||
*
|
*
|
||||||
@@ -168,15 +168,17 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
#define SDL_FUNCTION __FUNCTION__
|
#define SDL_FUNCTION __FUNCTION__
|
||||||
|
|
||||||
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
|
#elif !defined(SDL_FUNCTION)
|
||||||
|
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
|
||||||
# define SDL_FUNCTION __func__
|
# define SDL_FUNCTION __func__
|
||||||
#elif ((defined(__GNUC__) && (__GNUC__ >= 2)) || defined(_MSC_VER) || defined (__WATCOMC__))
|
#elif ((defined(__GNUC__) && (__GNUC__ >= 2)) || defined(_MSC_VER) || defined (__WATCOMC__))
|
||||||
# define SDL_FUNCTION __FUNCTION__
|
# define SDL_FUNCTION __FUNCTION__
|
||||||
#else
|
#else
|
||||||
# define SDL_FUNCTION "???"
|
# define SDL_FUNCTION "???"
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef SDL_FILE
|
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A macro that reports the current file being compiled.
|
* A macro that reports the current file being compiled.
|
||||||
@@ -184,16 +186,21 @@ extern "C" {
|
|||||||
* This macro is only defined if it isn't already defined, so to override it
|
* This macro is only defined if it isn't already defined, so to override it
|
||||||
* (perhaps with something that doesn't provide path information at all, so
|
* (perhaps with something that doesn't provide path information at all, so
|
||||||
* build machine information doesn't leak into public binaries), apps can
|
* build machine information doesn't leak into public binaries), apps can
|
||||||
* define this macro before including SDL_assert.h. For example, Clang and GCC
|
* define this macro before including SDL.h or SDL_assert.h.
|
||||||
* can define this to `FILE_NAME` to get just the source filename instead of
|
|
||||||
* the full path.
|
|
||||||
*
|
*
|
||||||
* \since This macro is available since SDL 3.2.0.
|
* \since This macro is available since SDL 3.2.0.
|
||||||
*/
|
*/
|
||||||
|
#define SDL_FILE __FILE_NAME__
|
||||||
|
|
||||||
|
#elif !defined(SDL_FILE)
|
||||||
|
#ifdef __FILE_NAME__
|
||||||
|
#define SDL_FILE __FILE_NAME__
|
||||||
|
#else
|
||||||
#define SDL_FILE __FILE__
|
#define SDL_FILE __FILE__
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef SDL_ASSERT_FILE
|
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A macro that reports the current file being compiled, for use in
|
* A macro that reports the current file being compiled, for use in
|
||||||
@@ -208,6 +215,9 @@ extern "C" {
|
|||||||
* \since This macro is available since SDL 3.4.0.
|
* \since This macro is available since SDL 3.4.0.
|
||||||
*/
|
*/
|
||||||
#define SDL_ASSERT_FILE SDL_FILE
|
#define SDL_ASSERT_FILE SDL_FILE
|
||||||
|
|
||||||
|
#elif !defined(SDL_ASSERT_FILE)
|
||||||
|
#define SDL_ASSERT_FILE SDL_FILE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -213,6 +213,8 @@ typedef struct SDL_AsyncIOQueue SDL_AsyncIOQueue;
|
|||||||
* \returns a pointer to the SDL_AsyncIO structure that is created or NULL on
|
* \returns a pointer to the SDL_AsyncIO structure that is created or NULL on
|
||||||
* failure; call SDL_GetError() for more information.
|
* failure; call SDL_GetError() for more information.
|
||||||
*
|
*
|
||||||
|
* \threadsafety It is safe to call this function from any thread.
|
||||||
|
*
|
||||||
* \since This function is available since SDL 3.2.0.
|
* \since This function is available since SDL 3.2.0.
|
||||||
*
|
*
|
||||||
* \sa SDL_CloseAsyncIO
|
* \sa SDL_CloseAsyncIO
|
||||||
@@ -531,6 +533,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_SignalAsyncIOQueue(SDL_AsyncIOQueue *queue)
|
|||||||
* \returns true on success or false on failure; call SDL_GetError() for more
|
* \returns true on success or false on failure; call SDL_GetError() for more
|
||||||
* information.
|
* information.
|
||||||
*
|
*
|
||||||
|
* \threadsafety It is safe to call this function from any thread.
|
||||||
|
*
|
||||||
* \since This function is available since SDL 3.2.0.
|
* \since This function is available since SDL 3.2.0.
|
||||||
*
|
*
|
||||||
* \sa SDL_LoadFile_IO
|
* \sa SDL_LoadFile_IO
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -156,6 +156,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockSpinlock(SDL_SpinLock *lock);
|
|||||||
*/
|
*/
|
||||||
#define SDL_CompilerBarrier() DoCompilerSpecificReadWriteBarrier()
|
#define SDL_CompilerBarrier() DoCompilerSpecificReadWriteBarrier()
|
||||||
|
|
||||||
|
#elif SDL_HAS_BUILTIN(__atomic_signal_fence) || (defined(__GNUC__) && (__GNUC__ >= 5))
|
||||||
|
#define SDL_CompilerBarrier() __atomic_signal_fence(__ATOMIC_SEQ_CST)
|
||||||
#elif defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
|
#elif defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
|
||||||
void _ReadWriteBarrier(void);
|
void _ReadWriteBarrier(void);
|
||||||
#pragma intrinsic(_ReadWriteBarrier)
|
#pragma intrinsic(_ReadWriteBarrier)
|
||||||
@@ -167,8 +169,9 @@ void _ReadWriteBarrier(void);
|
|||||||
extern __inline void SDL_CompilerBarrier(void);
|
extern __inline void SDL_CompilerBarrier(void);
|
||||||
#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
|
#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
|
||||||
#else
|
#else
|
||||||
|
/* We don't unlock here to avoid possible infinite recursion */
|
||||||
#define SDL_CompilerBarrier() \
|
#define SDL_CompilerBarrier() \
|
||||||
{ SDL_SpinLock _tmp = 0; SDL_LockSpinlock(&_tmp); SDL_UnlockSpinlock(&_tmp); }
|
{ SDL_SpinLock _tmp = 0; SDL_LockSpinlock(&_tmp); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -275,12 +278,19 @@ extern SDL_DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
|||||||
*/
|
*/
|
||||||
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
|
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
|
||||||
|
|
||||||
|
#elif SDL_HAS_BUILTIN(__atomic_thread_fence) || (defined(__GNUC__) && (__GNUC__ >= 5))
|
||||||
|
#define SDL_MemoryBarrierRelease() __atomic_thread_fence(__ATOMIC_RELEASE)
|
||||||
|
#define SDL_MemoryBarrierAcquire() __atomic_thread_fence(__ATOMIC_ACQUIRE)
|
||||||
#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
|
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||||
#elif defined(__GNUC__) && defined(__aarch64__)
|
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ishld" : : : "memory")
|
||||||
|
#elif defined(_MSC_VER) && (defined(_M_ARM64) || defined(_M_ARM64EC))
|
||||||
|
#include <arm64intr.h>
|
||||||
|
#define SDL_MemoryBarrierRelease() __dmb(_ARM64_BARRIER_ISH)
|
||||||
|
#define SDL_MemoryBarrierAcquire() __dmb(_ARM64_BARRIER_ISHLD)
|
||||||
#elif defined(__GNUC__) && defined(__arm__)
|
#elif defined(__GNUC__) && defined(__arm__)
|
||||||
#if 0 /* defined(SDL_PLATFORM_LINUX) || defined(SDL_PLATFORM_ANDROID) */
|
#if 0 /* defined(SDL_PLATFORM_LINUX) || defined(SDL_PLATFORM_ANDROID) */
|
||||||
/* Information from:
|
/* Information from:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -577,6 +577,15 @@ extern SDL_DECLSPEC SDL_AudioDeviceID * SDLCALL SDL_GetAudioRecordingDevices(int
|
|||||||
/**
|
/**
|
||||||
* Get the human-readable name of a specific audio device.
|
* Get the human-readable name of a specific audio device.
|
||||||
*
|
*
|
||||||
|
* **WARNING**: this function will work with SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK
|
||||||
|
* and SDL_AUDIO_DEVICE_DEFAULT_RECORDING, returning the current default
|
||||||
|
* physical devices' names. However, as the default device may change at any
|
||||||
|
* time, it is likely better to show a generic name to the user, like "System
|
||||||
|
* default audio device" or perhaps "default [currently %s]". Do not store
|
||||||
|
* this name to disk to reidentify the device in a later run of the program,
|
||||||
|
* as the default might change in general, and the string will be the name of
|
||||||
|
* a specific device and not the abstract system default.
|
||||||
|
*
|
||||||
* \param devid the instance ID of the device to query.
|
* \param devid the instance ID of the device to query.
|
||||||
* \returns the name of the audio device, or NULL on failure; call
|
* \returns the name of the audio device, or NULL on failure; call
|
||||||
* SDL_GetError() for more information.
|
* SDL_GetError() for more information.
|
||||||
@@ -1336,11 +1345,11 @@ extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioStreamOutputChannelMap(SDL_AudioSt
|
|||||||
* \threadsafety It is safe to call this function from any thread, as it holds
|
* \threadsafety It is safe to call this function from any thread, as it holds
|
||||||
* a stream-specific mutex while running. Don't change the
|
* a stream-specific mutex while running. Don't change the
|
||||||
* stream's format to have a different number of channels from a
|
* stream's format to have a different number of channels from a
|
||||||
* a different thread at the same time, though!
|
* different thread at the same time, though!
|
||||||
*
|
*
|
||||||
* \since This function is available since SDL 3.2.0.
|
* \since This function is available since SDL 3.2.0.
|
||||||
*
|
*
|
||||||
* \sa SDL_SetAudioStreamInputChannelMap
|
* \sa SDL_SetAudioStreamOutputChannelMap
|
||||||
*/
|
*/
|
||||||
extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamInputChannelMap(SDL_AudioStream *stream, const int *chmap, int count);
|
extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamInputChannelMap(SDL_AudioStream *stream, const int *chmap, int count);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -469,7 +469,7 @@
|
|||||||
#define NULL ((void *)0)
|
#define NULL ((void *)0)
|
||||||
#endif
|
#endif
|
||||||
#endif /* NULL */
|
#endif /* NULL */
|
||||||
#endif /* ! macOS - breaks precompiled headers */
|
#endif /* __MACH__ */
|
||||||
|
|
||||||
#ifndef SDL_FALLTHROUGH
|
#ifndef SDL_FALLTHROUGH
|
||||||
#if (defined(__cplusplus) && __cplusplus >= 201703L) || \
|
#if (defined(__cplusplus) && __cplusplus >= 201703L) || \
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -48,8 +48,7 @@ extern __inline int _SDL_bsr_watcom(Uint32);
|
|||||||
/**
|
/**
|
||||||
* Get the index of the most significant (set) bit in a 32-bit number.
|
* Get the index of the most significant (set) bit in a 32-bit number.
|
||||||
*
|
*
|
||||||
* Result is undefined when called with 0. This operation can also be stated
|
* This operation can also be stated as "count leading zeroes" and "log base 2".
|
||||||
* as "count leading zeroes" and "log base 2".
|
|
||||||
*
|
*
|
||||||
* Note that this is a forced-inline function in a header, and not a public
|
* Note that this is a forced-inline function in a header, and not a public
|
||||||
* API function available in the SDL library (which is to say, the code is
|
* API function available in the SDL library (which is to say, the code is
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -252,7 +252,7 @@ typedef void (SDLCALL *SDL_ClipboardCleanupCallback)(void *userdata);
|
|||||||
* \sa SDL_GetClipboardData
|
* \sa SDL_GetClipboardData
|
||||||
* \sa SDL_HasClipboardData
|
* \sa SDL_HasClipboardData
|
||||||
*/
|
*/
|
||||||
extern SDL_DECLSPEC bool SDLCALL SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, void *userdata, const char **mime_types, size_t num_mime_types);
|
extern SDL_DECLSPEC bool SDLCALL SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, void *userdata, const char *const *mime_types, size_t num_mime_types);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear the clipboard data.
|
* Clear the clipboard data.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -140,11 +140,11 @@ typedef void (SDLCALL *SDL_DialogFileCallback)(void *userdata, const char * cons
|
|||||||
* \param window the window that the dialog should be modal for, may be NULL.
|
* \param window the window that the dialog should be modal for, may be NULL.
|
||||||
* Not all platforms support this option.
|
* Not all platforms support this option.
|
||||||
* \param filters a list of filters, may be NULL. See the
|
* \param filters a list of filters, may be NULL. See the
|
||||||
* [`SDL_DialogFileFilter` documentation for
|
* [`SDL_DialogFileFilter`](SDL_DialogFileFilter#code-examples)
|
||||||
* examples](SDL_DialogFileFilter#code-examples). Not all
|
* documentation for examples]. Not all platforms support this
|
||||||
* platforms support this option, and platforms that do support
|
* option, and platforms that do support it may allow the user
|
||||||
* it may allow the user to ignore the filters. If non-NULL, it
|
* to ignore the filters. If non-NULL, it must remain valid at
|
||||||
* must remain valid at least until the callback is invoked.
|
* least until the callback is invoked.
|
||||||
* \param nfilters the number of filters. Ignored if filters is NULL.
|
* \param nfilters the number of filters. Ignored if filters is NULL.
|
||||||
* \param default_location the default folder or file to start the dialog at,
|
* \param default_location the default folder or file to start the dialog at,
|
||||||
* may be NULL. Not all platforms support this option.
|
* may be NULL. Not all platforms support this option.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -32,21 +32,23 @@
|
|||||||
* this CMake snippet to check for support:
|
* this CMake snippet to check for support:
|
||||||
*
|
*
|
||||||
* ```cmake
|
* ```cmake
|
||||||
* set(CHECK_ELF_DLNOTES_SRC [==[
|
* include(CheckCSourceCompiles)
|
||||||
* #ifndef __ELF__
|
* find_package(SDL3 REQUIRED CONFIG COMPONENTS Headers)
|
||||||
* ELF DL notes is only supported on ELF platforms
|
* list(APPEND CMAKE_REQUIRED_LIBRARIES SDL3::Headers)
|
||||||
* #endif
|
* check_c_source_compiles([==[
|
||||||
* __attribute__ ((used,aligned(4),section(".note.dlopen"))) static const struct {
|
* #include <SDL3/SDL_dlopennote.h>
|
||||||
* struct { int a; int b; int c; } hdr; char name[4]; __attribute__((aligned(4))) char json[24];
|
* SDL_ELF_NOTE_DLOPEN("sdl-video",
|
||||||
* } dlnote = { { 4, 0x407c0c0aU, 16 }, "FDO", "[\\"a\\":{\\"a\\":\\"1\\",\\"b\\":\\"2\\"}]" };
|
* "Support for video through SDL",
|
||||||
* int main(int argc, char *argv[]) {
|
* SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
|
||||||
* return argc + dlnote.hdr.a;
|
* "libSDL-1.2.so.0", "libSDL-2.0.so.0", "libSDL3.so.0"
|
||||||
* }
|
* )
|
||||||
* ]==])
|
* int main(int argc, char *argv[]) {
|
||||||
* check_c_source_compiles("${CHECK_ELF_DLNOTES_SRC}" COMPILER_SUPPORTS_ELFNOTES)
|
* return argc + argv[0][1];
|
||||||
* if(NOT COMPILER_SUPPORTS_ELFNOTES)
|
* }
|
||||||
* set(SDL_DISABLE_DLOPEN_NOTES TRUE)
|
* ]==] COMPILER_SUPPORTS_SDL_ELF_NOTE_DLOPEN)
|
||||||
* endif()
|
* if(NOT COMPILER_SUPPORTS_SDL_ELF_NOTE_DLOPEN)
|
||||||
|
* add_compile_definitions(-DSDL_DISABLE_DLOPEN_NOTE)
|
||||||
|
* endif()
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -141,36 +143,37 @@
|
|||||||
#define SDL_ELF_NOTE_INTERNAL(json, variable_name) \
|
#define SDL_ELF_NOTE_INTERNAL(json, variable_name) \
|
||||||
SDL_ELF_NOTE_INTERNAL2(json, variable_name)
|
SDL_ELF_NOTE_INTERNAL2(json, variable_name)
|
||||||
|
|
||||||
#define SDL_SONAME_ARRAY1(N1) "[\"" N1 "\"]"
|
#define SDL_DLNOTE_JSON_ARRAY1(N1) "[\"" N1 "\"]"
|
||||||
#define SDL_SONAME_ARRAY2(N1,N2) "[\"" N1 "\",\"" N2 "\"]"
|
#define SDL_DLNOTE_JSON_ARRAY2(N1,N2) "[\"" N1 "\",\"" N2 "\"]"
|
||||||
#define SDL_SONAME_ARRAY3(N1,N2,N3) "[\"" N1 "\",\"" N2 "\",\"" N3 "\"]"
|
#define SDL_DLNOTE_JSON_ARRAY3(N1,N2,N3) "[\"" N1 "\",\"" N2 "\",\"" N3 "\"]"
|
||||||
#define SDL_SONAME_ARRAY4(N1,N2,N3,N4) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\"]"
|
#define SDL_DLNOTE_JSON_ARRAY4(N1,N2,N3,N4) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\"]"
|
||||||
#define SDL_SONAME_ARRAY5(N1,N2,N3,N4,N5) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\"]"
|
#define SDL_DLNOTE_JSON_ARRAY5(N1,N2,N3,N4,N5) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\"]"
|
||||||
#define SDL_SONAME_ARRAY6(N1,N2,N3,N4,N5,N6) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\",\"" N6 "\"]"
|
#define SDL_DLNOTE_JSON_ARRAY6(N1,N2,N3,N4,N5,N6) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\",\"" N6 "\"]"
|
||||||
#define SDL_SONAME_ARRAY7(N1,N2,N3,N4,N5,N6,N7) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\",\"" N6 "\",\"" N7 "\"]"
|
#define SDL_DLNOTE_JSON_ARRAY7(N1,N2,N3,N4,N5,N6,N7) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\",\"" N6 "\",\"" N7 "\"]"
|
||||||
#define SDL_SONAME_ARRAY8(N1,N2,N3,N4,N5,N6,N7,N8) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\",\"" N6 "\",\"" N7 "\",\"" N8 "\"]"
|
#define SDL_DLNOTE_JSON_ARRAY8(N1,N2,N3,N4,N5,N6,N7,N8) "[\"" N1 "\",\"" N2 "\",\"" N3 "\",\"" N4 "\",\"" N5 "\",\"" N6 "\",\"" N7 "\",\"" N8 "\"]"
|
||||||
#define SDL_SONAME_ARRAY_GET(N1,N2,N3,N4,N5,N6,N7,N8,NAME,...) NAME
|
#define SDL_DLNOTE_JSON_ARRAY_GET(N1,N2,N3,N4,N5,N6,N7,N8,NAME,...) NAME
|
||||||
#define SDL_SONAME_ARRAY(...) \
|
#define SDL_DLNOTE_JSON_ARRAY(...) \
|
||||||
SDL_SONAME_ARRAY_GET(__VA_ARGS__, \
|
SDL_DLNOTE_JSON_ARRAY_GET( \
|
||||||
SDL_SONAME_ARRAY8, \
|
__VA_ARGS__, \
|
||||||
SDL_SONAME_ARRAY7, \
|
SDL_DLNOTE_JSON_ARRAY8, \
|
||||||
SDL_SONAME_ARRAY6, \
|
SDL_DLNOTE_JSON_ARRAY7, \
|
||||||
SDL_SONAME_ARRAY5, \
|
SDL_DLNOTE_JSON_ARRAY6, \
|
||||||
SDL_SONAME_ARRAY4, \
|
SDL_DLNOTE_JSON_ARRAY5, \
|
||||||
SDL_SONAME_ARRAY3, \
|
SDL_DLNOTE_JSON_ARRAY4, \
|
||||||
SDL_SONAME_ARRAY2, \
|
SDL_DLNOTE_JSON_ARRAY3, \
|
||||||
SDL_SONAME_ARRAY1 \
|
SDL_DLNOTE_JSON_ARRAY2, \
|
||||||
|
SDL_DLNOTE_JSON_ARRAY1 \
|
||||||
)(__VA_ARGS__)
|
)(__VA_ARGS__)
|
||||||
|
|
||||||
/* Create "unique" variable name using __LINE__,
|
/* Create "unique" variable name using __LINE__,
|
||||||
* so creating elf notes on the same line is not supported
|
* so creating multiple elf notes on the same line is not supported
|
||||||
*/
|
*/
|
||||||
#define SDL_ELF_NOTE_JOIN2(A,B) A##B
|
#define SDL_DLNOTE_JOIN2(A,B) A##B
|
||||||
#define SDL_ELF_NOTE_JOIN(A,B) SDL_ELF_NOTE_JOIN2(A,B)
|
#define SDL_DLNOTE_JOIN(A,B) SDL_DLNOTE_JOIN2(A,B)
|
||||||
#define SDL_ELF_NOTE_UNIQUE_NAME SDL_ELF_NOTE_JOIN(s_SDL_dlopen_note_, __LINE__)
|
#define SDL_DLNOTE_UNIQUE_NAME SDL_DLNOTE_JOIN(s_SDL_dlopen_note_, __LINE__)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Note that your application has dynamic shared library dependencies.
|
* Add a note that your application has dynamic shared library dependencies.
|
||||||
*
|
*
|
||||||
* You can do this by adding the following to the global scope:
|
* You can do this by adding the following to the global scope:
|
||||||
*
|
*
|
||||||
@@ -180,9 +183,11 @@
|
|||||||
* "Support for loading PNG images using libpng (required for APNG)",
|
* "Support for loading PNG images using libpng (required for APNG)",
|
||||||
* SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
|
* SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
|
||||||
* "libpng12.so.0"
|
* "libpng12.so.0"
|
||||||
* );
|
* )
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
|
* A trailing semicolon is not needed.
|
||||||
|
*
|
||||||
* Or if you support multiple versions of a library, you can list them:
|
* Or if you support multiple versions of a library, you can list them:
|
||||||
*
|
*
|
||||||
* ```c
|
* ```c
|
||||||
@@ -192,9 +197,12 @@
|
|||||||
* "Create windows through SDL video backend",
|
* "Create windows through SDL video backend",
|
||||||
* SDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED
|
* SDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED
|
||||||
* "libSDL-1.2.so.0", "libSDL2-2.0.so.0", "libSDL3.so.0"
|
* "libSDL-1.2.so.0", "libSDL2-2.0.so.0", "libSDL3.so.0"
|
||||||
* );
|
* )
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
|
* This macro is not available for compilers that do not support variadic
|
||||||
|
* macro's.
|
||||||
|
*
|
||||||
* \since This macro is available since SDL 3.4.0.
|
* \since This macro is available since SDL 3.4.0.
|
||||||
*
|
*
|
||||||
* \sa SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED
|
* \sa SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED
|
||||||
@@ -206,8 +214,8 @@
|
|||||||
"[{\"feature\":\"" feature \
|
"[{\"feature\":\"" feature \
|
||||||
"\",\"description\":\"" description \
|
"\",\"description\":\"" description \
|
||||||
"\",\"priority\":\"" priority \
|
"\",\"priority\":\"" priority \
|
||||||
"\",\"soname\":" SDL_SONAME_ARRAY(__VA_ARGS__) "}]", \
|
"\",\"soname\":" SDL_DLNOTE_JSON_ARRAY(__VA_ARGS__) "}]", \
|
||||||
SDL_ELF_NOTE_UNIQUE_NAME)
|
SDL_DLNOTE_UNIQUE_NAME);
|
||||||
|
|
||||||
#elif defined(__GNUC__) && __GNUC__ < 3
|
#elif defined(__GNUC__) && __GNUC__ < 3
|
||||||
|
|
||||||
@@ -216,7 +224,6 @@
|
|||||||
#elif defined(_MSC_VER) && _MSC_VER < 1400
|
#elif defined(_MSC_VER) && _MSC_VER < 1400
|
||||||
|
|
||||||
/* Variadic macros are not supported */
|
/* Variadic macros are not supported */
|
||||||
#define SDL_ELF_NOTE_DLOPEN
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||||
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||||
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||||
#if defined(__clang__) && !SDL_HAS_BUILTIN(_m_prefetch)
|
#if defined(__clang__) && !SDL_HAS_BUILTIN(_m_prefetch)
|
||||||
#ifndef __PRFCHWINTRIN_H
|
#ifndef __PRFCHWINTRIN_H
|
||||||
#define __PRFCHWINTRIN_H
|
#define __PRFCHWINTRIN_H
|
||||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
@@ -208,7 +208,7 @@ _m_prefetch(void *__P)
|
|||||||
#else
|
#else
|
||||||
/* By default, assume that floats words follow the memory system mode. */
|
/* By default, assume that floats words follow the memory system mode. */
|
||||||
#define SDL_FLOATWORDORDER SDL_BYTEORDER
|
#define SDL_FLOATWORDORDER SDL_BYTEORDER
|
||||||
#endif /* __FLOAT_WORD_ORDER__ */
|
#endif /* SDL_WIKI_DOCUMENTATION_SECTION */
|
||||||
#endif /* !SDL_FLOATWORDORDER */
|
#endif /* !SDL_FLOATWORDORDER */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -818,6 +818,9 @@ typedef struct SDL_PinchFingerEvent
|
|||||||
* is there." The pen touching and lifting off from the tablet while not
|
* is there." The pen touching and lifting off from the tablet while not
|
||||||
* leaving the area are handled by SDL_EVENT_PEN_DOWN and SDL_EVENT_PEN_UP.
|
* leaving the area are handled by SDL_EVENT_PEN_DOWN and SDL_EVENT_PEN_UP.
|
||||||
*
|
*
|
||||||
|
* Not all platforms have a window associated with the pen during proximity
|
||||||
|
* events. Some wait until motion/button/etc events to offer this info.
|
||||||
|
*
|
||||||
* \since This struct is available since SDL 3.2.0.
|
* \since This struct is available since SDL 3.2.0.
|
||||||
*/
|
*/
|
||||||
typedef struct SDL_PenProximityEvent
|
typedef struct SDL_PenProximityEvent
|
||||||
@@ -1069,7 +1072,7 @@ typedef union SDL_Event
|
|||||||
} SDL_Event;
|
} SDL_Event;
|
||||||
|
|
||||||
/* Make sure we haven't broken binary compatibility */
|
/* Make sure we haven't broken binary compatibility */
|
||||||
SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NULL)->padding));
|
SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof((SDL_static_cast(SDL_Event *, NULL))->padding));
|
||||||
|
|
||||||
|
|
||||||
/* Function prototypes */
|
/* Function prototypes */
|
||||||
@@ -1253,15 +1256,13 @@ extern SDL_DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType)
|
|||||||
* Poll for currently pending events.
|
* Poll for currently pending events.
|
||||||
*
|
*
|
||||||
* If `event` is not NULL, the next event is removed from the queue and stored
|
* If `event` is not NULL, the next event is removed from the queue and stored
|
||||||
* in the SDL_Event structure pointed to by `event`. The 1 returned refers to
|
* in the SDL_Event structure pointed to by `event`.
|
||||||
* this event, immediately stored in the SDL Event structure -- not an event
|
|
||||||
* to follow.
|
|
||||||
*
|
*
|
||||||
* If `event` is NULL, it simply returns 1 if there is an event in the queue,
|
* If `event` is NULL, it simply returns true if there is an event in the
|
||||||
* but will not remove it from the queue.
|
* queue, but will not remove it from the queue.
|
||||||
*
|
*
|
||||||
* As this function may implicitly call SDL_PumpEvents(), you can only call
|
* As this function may implicitly call SDL_PumpEvents(), you can only call
|
||||||
* this function in the thread that set the video mode.
|
* this function in the thread that initialized the video subsystem.
|
||||||
*
|
*
|
||||||
* SDL_PollEvent() is the favored way of receiving system events since it can
|
* SDL_PollEvent() is the favored way of receiving system events since it can
|
||||||
* be done from the main loop and does not suspend the main loop while waiting
|
* be done from the main loop and does not suspend the main loop while waiting
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -77,6 +77,9 @@ extern "C" {
|
|||||||
* - `parent`: the containing directory of the bundle. For example:
|
* - `parent`: the containing directory of the bundle. For example:
|
||||||
* `/Applications/SDLApp/`
|
* `/Applications/SDLApp/`
|
||||||
*
|
*
|
||||||
|
* **Android Specific Functionality**: This function returns "./", which
|
||||||
|
* allows filesystem operations to use internal storage and the asset system.
|
||||||
|
*
|
||||||
* **Nintendo 3DS Specific Functionality**: This function returns "romfs"
|
* **Nintendo 3DS Specific Functionality**: This function returns "romfs"
|
||||||
* directory of the application as it is uncommon to store resources outside
|
* directory of the application as it is uncommon to store resources outside
|
||||||
* the executable. As such it is not a writable directory.
|
* the executable. As such it is not a writable directory.
|
||||||
@@ -238,9 +241,8 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetUserFolder(SDL_Folder folder);
|
|||||||
/**
|
/**
|
||||||
* Types of filesystem entries.
|
* Types of filesystem entries.
|
||||||
*
|
*
|
||||||
* Note that there may be other sorts of items on a filesystem: devices,
|
* Note that there may be other sorts of items on a filesystem: devices, named
|
||||||
* symlinks, named pipes, etc. They are currently reported as
|
* pipes, etc. They are currently reported as SDL_PATHTYPE_OTHER.
|
||||||
* SDL_PATHTYPE_OTHER.
|
|
||||||
*
|
*
|
||||||
* \since This enum is available since SDL 3.2.0.
|
* \since This enum is available since SDL 3.2.0.
|
||||||
*
|
*
|
||||||
@@ -454,6 +456,10 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CopyFile(const char *oldpath, const char *n
|
|||||||
/**
|
/**
|
||||||
* Get information about a filesystem path.
|
* Get information about a filesystem path.
|
||||||
*
|
*
|
||||||
|
* Symlinks, on filesystems that support them, are always followed, so you
|
||||||
|
* will always get information on what the symlink eventually points to, and
|
||||||
|
* not the symlink itself.
|
||||||
|
*
|
||||||
* \param path the path to query.
|
* \param path the path to query.
|
||||||
* \param info a pointer filled in with information about the path, or NULL to
|
* \param info a pointer filled in with information about the path, or NULL to
|
||||||
* check for the existence of a file.
|
* check for the existence of a file.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -48,6 +48,9 @@
|
|||||||
* SDL_INIT_GAMEPAD flag. This causes SDL to scan the system for gamepads, and
|
* SDL_INIT_GAMEPAD flag. This causes SDL to scan the system for gamepads, and
|
||||||
* load appropriate drivers.
|
* load appropriate drivers.
|
||||||
*
|
*
|
||||||
|
* If you're using SDL gamepad support in a Steam game, you must call
|
||||||
|
* SteamAPI_InitEx() before calling SDL_Init().
|
||||||
|
*
|
||||||
* If you would like to receive gamepad updates while the application is in
|
* If you would like to receive gamepad updates while the application is in
|
||||||
* the background, you should set the following hint before calling
|
* the background, you should set the following hint before calling
|
||||||
* SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
|
* SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
|
||||||
@@ -1278,7 +1281,7 @@ extern SDL_DECLSPEC Sint16 SDLCALL SDL_GetGamepadAxis(SDL_Gamepad *gamepad, SDL_
|
|||||||
* You do not normally need to call this function unless you are parsing
|
* You do not normally need to call this function unless you are parsing
|
||||||
* SDL_Gamepad mappings in your own code.
|
* SDL_Gamepad mappings in your own code.
|
||||||
*
|
*
|
||||||
* \param str string representing a SDL_Gamepad axis.
|
* \param str string representing a SDL_Gamepad button.
|
||||||
* \returns the SDL_GamepadButton enum corresponding to the input string, or
|
* \returns the SDL_GamepadButton enum corresponding to the input string, or
|
||||||
* `SDL_GAMEPAD_BUTTON_INVALID` if no match was found.
|
* `SDL_GAMEPAD_BUTTON_INVALID` if no match was found.
|
||||||
*
|
*
|
||||||
@@ -1492,7 +1495,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetGamepadSensorDataRate(SDL_Gamepad *game
|
|||||||
* Get the current state of a gamepad sensor.
|
* Get the current state of a gamepad sensor.
|
||||||
*
|
*
|
||||||
* The number of values and interpretation of the data is sensor dependent.
|
* The number of values and interpretation of the data is sensor dependent.
|
||||||
* See SDL_sensor.h for the details for each type of sensor.
|
* See the remarks in SDL_SensorType for details for each type of sensor.
|
||||||
*
|
*
|
||||||
* \param gamepad the gamepad to query.
|
* \param gamepad the gamepad to query.
|
||||||
* \param type the type of sensor to query.
|
* \param type the type of sensor to query.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -1398,11 +1398,12 @@ typedef struct SDL_GPUViewport
|
|||||||
* SDL_DownloadFromGPUTexture are used as default values respectively and data
|
* SDL_DownloadFromGPUTexture are used as default values respectively and data
|
||||||
* is considered to be tightly packed.
|
* is considered to be tightly packed.
|
||||||
*
|
*
|
||||||
* **WARNING**: Direct3D 12 requires texture data row pitch to be 256 byte
|
* **WARNING**: On some older/integrated hardware, Direct3D 12 requires
|
||||||
* aligned, and offsets to be aligned to 512 bytes. If they are not, SDL will
|
* texture data row pitch to be 256 byte aligned, and offsets to be aligned to
|
||||||
* make a temporary copy of the data that is properly aligned, but this adds
|
* 512 bytes. If they are not, SDL will make a temporary copy of the data that
|
||||||
* overhead to the transfer process. Apps can avoid this by aligning their
|
* is properly aligned, but this adds overhead to the transfer process. Apps
|
||||||
* data appropriately, or using a different GPU backend than Direct3D 12.
|
* can avoid this by aligning their data appropriately, or using a different
|
||||||
|
* GPU backend than Direct3D 12.
|
||||||
*
|
*
|
||||||
* \since This struct is available since SDL 3.2.0.
|
* \since This struct is available since SDL 3.2.0.
|
||||||
*
|
*
|
||||||
@@ -2294,7 +2295,7 @@ extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDevice(
|
|||||||
* - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN`: The app is able to
|
* - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN`: The app is able to
|
||||||
* provide Metal shader libraries if applicable.
|
* provide Metal shader libraries if applicable.
|
||||||
*
|
*
|
||||||
* With the D3D12 renderer:
|
* With the D3D12 backend:
|
||||||
*
|
*
|
||||||
* - `SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING`: the prefix to
|
* - `SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING`: the prefix to
|
||||||
* use for all vertex semantics, default is "TEXCOORD".
|
* use for all vertex semantics, default is "TEXCOORD".
|
||||||
@@ -2306,6 +2307,44 @@ extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDevice(
|
|||||||
* useful for targeting Intel Haswell and Broadwell GPUs; other hardware
|
* useful for targeting Intel Haswell and Broadwell GPUs; other hardware
|
||||||
* either supports Tier 2 Resource Binding or does not support D3D12 in any
|
* either supports Tier 2 Resource Binding or does not support D3D12 in any
|
||||||
* capacity. Defaults to false.
|
* capacity. Defaults to false.
|
||||||
|
* - `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_VERSION_NUMBER`: Certain
|
||||||
|
* feature checks are only possible on Windows 11 by default. By setting
|
||||||
|
* this alongside `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_PATH_STRING`
|
||||||
|
* and vendoring D3D12Core.dll from the D3D12 Agility SDK, you can make
|
||||||
|
* those feature checks possible on older platforms. The version you provide
|
||||||
|
* must match the one given in the DLL.
|
||||||
|
* - `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_PATH_STRING`: Certain
|
||||||
|
* feature checks are only possible on Windows 11 by default. By setting
|
||||||
|
* this alongside
|
||||||
|
* `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_VERSION_NUMBER` and
|
||||||
|
* vendoring D3D12Core.dll from the D3D12 Agility SDK, you can make those
|
||||||
|
* feature checks possible on older platforms. The path you provide must be
|
||||||
|
* relative to the executable path of your app. Be sure not to put the DLL
|
||||||
|
* in the same directory as the exe; Microsoft strongly advises against
|
||||||
|
* this!
|
||||||
|
*
|
||||||
|
* With the Vulkan backend:
|
||||||
|
*
|
||||||
|
* - `SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN`:
|
||||||
|
* By default, Vulkan device enumeration includes drivers of all types,
|
||||||
|
* including software renderers (for example, the Lavapipe Mesa driver).
|
||||||
|
* This can be useful if your application _requires_ SDL_GPU, but if you can
|
||||||
|
* provide your own fallback renderer (for example, an OpenGL renderer) this
|
||||||
|
* property can be set to true. Defaults to false.
|
||||||
|
* - `SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER`: a pointer to an
|
||||||
|
* SDL_GPUVulkanOptions structure to be processed during device creation.
|
||||||
|
* This allows configuring a variety of Vulkan-specific options such as
|
||||||
|
* increasing the API version and opting into extensions aside from the
|
||||||
|
* minimal set SDL requires.
|
||||||
|
*
|
||||||
|
* With the Metal backend: -
|
||||||
|
* `SDL_PROP_GPU_DEVICE_CREATE_METAL_ALLOW_MACFAMILY1_BOOLEAN`: By default,
|
||||||
|
* macOS support requires what Apple calls "MTLGPUFamilyMac2" hardware or
|
||||||
|
* newer. However, an application can set this property to true to enable
|
||||||
|
* support for "MTLGPUFamilyMac1" hardware, if (and only if) the application
|
||||||
|
* does not write to sRGB textures. (For history's sake: MacFamily1 also does
|
||||||
|
* not support indirect command buffers, MSAA depth resolve, and stencil
|
||||||
|
* resolve/feedback, but these are not exposed features in SDL_GPU.)
|
||||||
*
|
*
|
||||||
* \param props the properties to use.
|
* \param props the properties to use.
|
||||||
* \returns a GPU context on success or NULL on failure; call SDL_GetError()
|
* \returns a GPU context on success or NULL on failure; call SDL_GetError()
|
||||||
@@ -2337,6 +2376,39 @@ extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDeviceWithProperties(
|
|||||||
#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN "SDL.gpu.device.create.shaders.metallib"
|
#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN "SDL.gpu.device.create.shaders.metallib"
|
||||||
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN "SDL.gpu.device.create.d3d12.allowtier1resourcebinding"
|
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN "SDL.gpu.device.create.d3d12.allowtier1resourcebinding"
|
||||||
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING "SDL.gpu.device.create.d3d12.semantic"
|
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING "SDL.gpu.device.create.d3d12.semantic"
|
||||||
|
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_VERSION_NUMBER "SDL.gpu.device.create.d3d12.agility_sdk_version"
|
||||||
|
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_PATH_STRING "SDL.gpu.device.create.d3d12.agility_sdk_path"
|
||||||
|
#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN "SDL.gpu.device.create.vulkan.requirehardwareacceleration"
|
||||||
|
#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER "SDL.gpu.device.create.vulkan.options"
|
||||||
|
#define SDL_PROP_GPU_DEVICE_CREATE_METAL_ALLOW_MACFAMILY1_BOOLEAN "SDL.gpu.device.create.metal.allowmacfamily1"
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A structure specifying additional options when using Vulkan.
|
||||||
|
*
|
||||||
|
* When no such structure is provided, SDL will use Vulkan API version 1.0 and
|
||||||
|
* a minimal set of features. The requested API version influences how the
|
||||||
|
* feature_list is processed by SDL. When requesting API version 1.0, the
|
||||||
|
* feature_list is ignored. Only the vulkan_10_physical_device_features and
|
||||||
|
* the extension lists are used. When requesting API version 1.1, the
|
||||||
|
* feature_list is scanned for feature structures introduced in Vulkan 1.1.
|
||||||
|
* When requesting Vulkan 1.2 or higher, the feature_list is additionally
|
||||||
|
* scanned for compound feature structs such as
|
||||||
|
* VkPhysicalDeviceVulkan11Features. The device and instance extension lists,
|
||||||
|
* as well as vulkan_10_physical_device_features, are always processed.
|
||||||
|
*
|
||||||
|
* \since This struct is available since SDL 3.4.0.
|
||||||
|
*/
|
||||||
|
typedef struct SDL_GPUVulkanOptions
|
||||||
|
{
|
||||||
|
Uint32 vulkan_api_version; /**< The Vulkan API version to request for the instance. Use Vulkan's VK_MAKE_VERSION or VK_MAKE_API_VERSION. */
|
||||||
|
void *feature_list; /**< Pointer to the first element of a chain of Vulkan feature structs. (Requires API version 1.1 or higher.)*/
|
||||||
|
void *vulkan_10_physical_device_features; /**< Pointer to a VkPhysicalDeviceFeatures struct to enable additional Vulkan 1.0 features. */
|
||||||
|
Uint32 device_extension_count; /**< Number of additional device extensions to require. */
|
||||||
|
const char **device_extension_names; /**< Pointer to a list of additional device extensions to require. */
|
||||||
|
Uint32 instance_extension_count; /**< Number of additional instance extensions to require. */
|
||||||
|
const char **instance_extension_names; /**< Pointer to a list of additional instance extensions to require. */
|
||||||
|
} SDL_GPUVulkanOptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroys a GPU context previously returned by SDL_CreateGPUDevice.
|
* Destroys a GPU context previously returned by SDL_CreateGPUDevice.
|
||||||
@@ -2901,6 +2973,12 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUTextureName(
|
|||||||
*
|
*
|
||||||
* Useful for debugging.
|
* Useful for debugging.
|
||||||
*
|
*
|
||||||
|
* On Direct3D 12, using SDL_InsertGPUDebugLabel requires
|
||||||
|
* WinPixEventRuntime.dll to be in your PATH or in the same directory as your
|
||||||
|
* executable. See
|
||||||
|
* [here](https://devblogs.microsoft.com/pix/winpixeventruntime/)
|
||||||
|
* for instructions on how to obtain it.
|
||||||
|
*
|
||||||
* \param command_buffer a command buffer.
|
* \param command_buffer a command buffer.
|
||||||
* \param text a UTF-8 string constant to insert as the label.
|
* \param text a UTF-8 string constant to insert as the label.
|
||||||
*
|
*
|
||||||
@@ -2919,6 +2997,11 @@ extern SDL_DECLSPEC void SDLCALL SDL_InsertGPUDebugLabel(
|
|||||||
* Each call to SDL_PushGPUDebugGroup must have a corresponding call to
|
* Each call to SDL_PushGPUDebugGroup must have a corresponding call to
|
||||||
* SDL_PopGPUDebugGroup.
|
* SDL_PopGPUDebugGroup.
|
||||||
*
|
*
|
||||||
|
* On Direct3D 12, using SDL_PushGPUDebugGroup requires WinPixEventRuntime.dll
|
||||||
|
* to be in your PATH or in the same directory as your executable. See
|
||||||
|
* [here](https://devblogs.microsoft.com/pix/winpixeventruntime/)
|
||||||
|
* for instructions on how to obtain it.
|
||||||
|
*
|
||||||
* On some backends (e.g. Metal), pushing a debug group during a
|
* On some backends (e.g. Metal), pushing a debug group during a
|
||||||
* render/blit/compute pass will create a group that is scoped to the native
|
* render/blit/compute pass will create a group that is scoped to the native
|
||||||
* pass rather than the command buffer. For best results, if you push a debug
|
* pass rather than the command buffer. For best results, if you push a debug
|
||||||
@@ -2938,6 +3021,11 @@ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUDebugGroup(
|
|||||||
/**
|
/**
|
||||||
* Ends the most-recently pushed debug group.
|
* Ends the most-recently pushed debug group.
|
||||||
*
|
*
|
||||||
|
* On Direct3D 12, using SDL_PopGPUDebugGroup requires WinPixEventRuntime.dll
|
||||||
|
* to be in your PATH or in the same directory as your executable. See
|
||||||
|
* [here](https://devblogs.microsoft.com/pix/winpixeventruntime/)
|
||||||
|
* for instructions on how to obtain it.
|
||||||
|
*
|
||||||
* \param command_buffer a command buffer.
|
* \param command_buffer a command buffer.
|
||||||
*
|
*
|
||||||
* \since This function is available since SDL 3.2.0.
|
* \since This function is available since SDL 3.2.0.
|
||||||
@@ -3079,7 +3167,7 @@ extern SDL_DECLSPEC SDL_GPUCommandBuffer * SDLCALL SDL_AcquireGPUCommandBuffer(
|
|||||||
/**
|
/**
|
||||||
* Pushes data to a vertex uniform slot on the command buffer.
|
* Pushes data to a vertex uniform slot on the command buffer.
|
||||||
*
|
*
|
||||||
* Subsequent draw calls will use this uniform data.
|
* Subsequent draw calls in this command buffer will use this uniform data.
|
||||||
*
|
*
|
||||||
* The data being pushed must respect std140 layout conventions. In practical
|
* The data being pushed must respect std140 layout conventions. In practical
|
||||||
* terms this means you must ensure that vec3 and vec4 fields are 16-byte
|
* terms this means you must ensure that vec3 and vec4 fields are 16-byte
|
||||||
@@ -3104,7 +3192,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUVertexUniformData(
|
|||||||
/**
|
/**
|
||||||
* Pushes data to a fragment uniform slot on the command buffer.
|
* Pushes data to a fragment uniform slot on the command buffer.
|
||||||
*
|
*
|
||||||
* Subsequent draw calls will use this uniform data.
|
* Subsequent draw calls in this command buffer will use this uniform data.
|
||||||
*
|
*
|
||||||
* The data being pushed must respect std140 layout conventions. In practical
|
* The data being pushed must respect std140 layout conventions. In practical
|
||||||
* terms this means you must ensure that vec3 and vec4 fields are 16-byte
|
* terms this means you must ensure that vec3 and vec4 fields are 16-byte
|
||||||
@@ -3126,7 +3214,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUFragmentUniformData(
|
|||||||
/**
|
/**
|
||||||
* Pushes data to a uniform slot on the command buffer.
|
* Pushes data to a uniform slot on the command buffer.
|
||||||
*
|
*
|
||||||
* Subsequent draw calls will use this uniform data.
|
* Subsequent draw calls in this command buffer will use this uniform data.
|
||||||
*
|
*
|
||||||
* The data being pushed must respect std140 layout conventions. In practical
|
* The data being pushed must respect std140 layout conventions. In practical
|
||||||
* terms this means you must ensure that vec3 and vec4 fields are 16-byte
|
* terms this means you must ensure that vec3 and vec4 fields are 16-byte
|
||||||
@@ -3612,7 +3700,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputePipeline(
|
|||||||
* The textures must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.
|
* The textures must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.
|
||||||
*
|
*
|
||||||
* Be sure your shader is set up according to the requirements documented in
|
* Be sure your shader is set up according to the requirements documented in
|
||||||
* SDL_CreateGPUShader().
|
* SDL_CreateGPUComputePipeline().
|
||||||
*
|
*
|
||||||
* \param compute_pass a compute pass handle.
|
* \param compute_pass a compute pass handle.
|
||||||
* \param first_slot the compute sampler slot to begin binding from.
|
* \param first_slot the compute sampler slot to begin binding from.
|
||||||
@@ -3623,7 +3711,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputePipeline(
|
|||||||
*
|
*
|
||||||
* \since This function is available since SDL 3.2.0.
|
* \since This function is available since SDL 3.2.0.
|
||||||
*
|
*
|
||||||
* \sa SDL_CreateGPUShader
|
* \sa SDL_CreateGPUComputePipeline
|
||||||
*/
|
*/
|
||||||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeSamplers(
|
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeSamplers(
|
||||||
SDL_GPUComputePass *compute_pass,
|
SDL_GPUComputePass *compute_pass,
|
||||||
@@ -3638,7 +3726,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeSamplers(
|
|||||||
* SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ.
|
* SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ.
|
||||||
*
|
*
|
||||||
* Be sure your shader is set up according to the requirements documented in
|
* Be sure your shader is set up according to the requirements documented in
|
||||||
* SDL_CreateGPUShader().
|
* SDL_CreateGPUComputePipeline().
|
||||||
*
|
*
|
||||||
* \param compute_pass a compute pass handle.
|
* \param compute_pass a compute pass handle.
|
||||||
* \param first_slot the compute storage texture slot to begin binding from.
|
* \param first_slot the compute storage texture slot to begin binding from.
|
||||||
@@ -3647,7 +3735,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeSamplers(
|
|||||||
*
|
*
|
||||||
* \since This function is available since SDL 3.2.0.
|
* \since This function is available since SDL 3.2.0.
|
||||||
*
|
*
|
||||||
* \sa SDL_CreateGPUShader
|
* \sa SDL_CreateGPUComputePipeline
|
||||||
*/
|
*/
|
||||||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageTextures(
|
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageTextures(
|
||||||
SDL_GPUComputePass *compute_pass,
|
SDL_GPUComputePass *compute_pass,
|
||||||
@@ -3662,7 +3750,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageTextures(
|
|||||||
* SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ.
|
* SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ.
|
||||||
*
|
*
|
||||||
* Be sure your shader is set up according to the requirements documented in
|
* Be sure your shader is set up according to the requirements documented in
|
||||||
* SDL_CreateGPUShader().
|
* SDL_CreateGPUComputePipeline().
|
||||||
*
|
*
|
||||||
* \param compute_pass a compute pass handle.
|
* \param compute_pass a compute pass handle.
|
||||||
* \param first_slot the compute storage buffer slot to begin binding from.
|
* \param first_slot the compute storage buffer slot to begin binding from.
|
||||||
@@ -3671,7 +3759,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageTextures(
|
|||||||
*
|
*
|
||||||
* \since This function is available since SDL 3.2.0.
|
* \since This function is available since SDL 3.2.0.
|
||||||
*
|
*
|
||||||
* \sa SDL_CreateGPUShader
|
* \sa SDL_CreateGPUComputePipeline
|
||||||
*/
|
*/
|
||||||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageBuffers(
|
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageBuffers(
|
||||||
SDL_GPUComputePass *compute_pass,
|
SDL_GPUComputePass *compute_pass,
|
||||||
@@ -3843,6 +3931,10 @@ extern SDL_DECLSPEC void SDLCALL SDL_UploadToGPUBuffer(
|
|||||||
* This copy occurs on the GPU timeline. You may assume the copy has finished
|
* This copy occurs on the GPU timeline. You may assume the copy has finished
|
||||||
* in subsequent commands.
|
* in subsequent commands.
|
||||||
*
|
*
|
||||||
|
* This function does not support copying between depth and color textures.
|
||||||
|
* For those, copy the texture to a buffer and then to the destination
|
||||||
|
* texture.
|
||||||
|
*
|
||||||
* \param copy_pass a copy pass handle.
|
* \param copy_pass a copy pass handle.
|
||||||
* \param source a source texture region.
|
* \param source a source texture region.
|
||||||
* \param destination a destination texture region.
|
* \param destination a destination texture region.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -1392,7 +1392,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ResumeHaptic(SDL_Haptic *haptic);
|
|||||||
* \since This function is available since SDL 3.2.0.
|
* \since This function is available since SDL 3.2.0.
|
||||||
*
|
*
|
||||||
* \sa SDL_RunHapticEffect
|
* \sa SDL_RunHapticEffect
|
||||||
* \sa SDL_StopHapticEffects
|
* \sa SDL_StopHapticEffect
|
||||||
*/
|
*/
|
||||||
extern SDL_DECLSPEC bool SDLCALL SDL_StopHapticEffects(SDL_Haptic *haptic);
|
extern SDL_DECLSPEC bool SDLCALL SDL_StopHapticEffects(SDL_Haptic *haptic);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user