mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-08 04:18:14 +00:00
Compare commits
1046 Commits
main
...
release-2.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
92fe3b19c8 | ||
![]() |
30e2b03a65 | ||
![]() |
f8943854fd | ||
![]() |
325465935d | ||
![]() |
1cdd37b32c | ||
![]() |
499bff9c3a | ||
![]() |
bd06e43b87 | ||
![]() |
72e5620202 | ||
![]() |
fbb9646806 | ||
![]() |
4b91f0793c | ||
![]() |
6243a80b3f | ||
![]() |
e0b0a98c8e | ||
![]() |
785eac863b | ||
![]() |
ab8659922d | ||
![]() |
d48f9c4af4 | ||
![]() |
5cc0644aa0 | ||
![]() |
91accc391d | ||
![]() |
3ee20388c5 | ||
![]() |
2449510673 | ||
![]() |
2c07ed320e | ||
![]() |
607f37dafd | ||
![]() |
acc2e040ce | ||
![]() |
faa9bbdc8e | ||
![]() |
cf6c760cd3 | ||
![]() |
e49349ac0c | ||
![]() |
1e5db996ff | ||
![]() |
793a0681a9 | ||
![]() |
825ffaa168 | ||
![]() |
9ad6a36b7b | ||
![]() |
c3b53c72c7 | ||
![]() |
0800d81fb4 | ||
![]() |
c27219695a | ||
![]() |
9dcfc308ef | ||
![]() |
77b3a6afaf | ||
![]() |
dd42795131 | ||
![]() |
fb1497566c | ||
![]() |
cc6c0fe230 | ||
![]() |
f9a46a319b | ||
![]() |
48a0592a45 | ||
![]() |
1c74a8b5ae | ||
![]() |
3d18043005 | ||
![]() |
6e1e00701e | ||
![]() |
5570d846ea | ||
![]() |
f5dcb8f7ad | ||
![]() |
f6f1b09b69 | ||
![]() |
bf540985aa | ||
![]() |
c39f86c28a | ||
![]() |
b5da8ad00d | ||
![]() |
f62b86263a | ||
![]() |
3449c734d5 | ||
![]() |
3f29d985fe | ||
![]() |
2f4a7bbced | ||
![]() |
a0522e4c21 | ||
![]() |
f461d91cd2 | ||
![]() |
ef54e0c4f4 | ||
![]() |
863f39fb9f | ||
![]() |
d33b28c9fe | ||
![]() |
c15a87a614 | ||
![]() |
45de0635ac | ||
![]() |
bca314c339 | ||
![]() |
f05490d0e2 | ||
![]() |
442e201705 | ||
![]() |
9c346b2321 | ||
![]() |
a6b684d05a | ||
![]() |
8fb82da226 | ||
![]() |
0949f89028 | ||
![]() |
350a49e1cc | ||
![]() |
bc19e38728 | ||
![]() |
228a2954d7 | ||
![]() |
3d6d4ca2cd | ||
![]() |
4c3e5cf1d1 | ||
![]() |
27b1b6d4eb | ||
![]() |
24269007d8 | ||
![]() |
d849036927 | ||
![]() |
5be47255ba | ||
![]() |
8f860b3698 | ||
![]() |
35992597ae | ||
![]() |
3f0d7a2937 | ||
![]() |
dae1232489 | ||
![]() |
8e388843b8 | ||
![]() |
5adbf3765a | ||
![]() |
e910e6f13d | ||
![]() |
2f2cca8ac6 | ||
![]() |
a2f39399a1 | ||
![]() |
c1149f88b6 | ||
![]() |
54adba6a31 | ||
![]() |
b48106f8a8 | ||
![]() |
f345428367 | ||
![]() |
e4287595c1 | ||
![]() |
73efbf2e14 | ||
![]() |
ad342dfca9 | ||
![]() |
f13d6d4b0f | ||
![]() |
dfb8241317 | ||
![]() |
c67f10e43f | ||
![]() |
932eea513e | ||
![]() |
5e51a37518 | ||
![]() |
372564299e | ||
![]() |
c397fe0c51 | ||
![]() |
95227e2732 | ||
![]() |
6f8d6da77f | ||
![]() |
6f15aec644 | ||
![]() |
9bed177f10 | ||
![]() |
7de4f16710 | ||
![]() |
beac43f41f | ||
![]() |
8538d5dcf1 | ||
![]() |
0fb294ade4 | ||
![]() |
0f6a682ea6 | ||
![]() |
c4fc20a033 | ||
![]() |
a24e2bfc76 | ||
![]() |
6a83588fdd | ||
![]() |
0092b3629e | ||
![]() |
c0eedcd4ce | ||
![]() |
d1b6d5f33d | ||
![]() |
fe297fc6d8 | ||
![]() |
384fcea585 | ||
![]() |
2f2b44a1bd | ||
![]() |
8386daddcb | ||
![]() |
739a23e506 | ||
![]() |
5a59155a05 | ||
![]() |
1ad917e2f6 | ||
![]() |
859844eae3 | ||
![]() |
857b9848d2 | ||
![]() |
5f98fcf00b | ||
![]() |
5a492e8196 | ||
![]() |
80cb52c944 | ||
![]() |
4436c09c9d | ||
![]() |
23cf7a2e0d | ||
![]() |
4a62e1c0ca | ||
![]() |
173afd8564 | ||
![]() |
f6b9ebb838 | ||
![]() |
f1b109005c | ||
![]() |
0bd58cd727 | ||
![]() |
de1292f8ac | ||
![]() |
a6d5c1fe05 | ||
![]() |
fc5bd11dac | ||
![]() |
e767840874 | ||
![]() |
fd08ca3823 | ||
![]() |
3bf60755cb | ||
![]() |
aac7d1c2ae | ||
![]() |
55caed2011 | ||
![]() |
53058af284 | ||
![]() |
ad1a11164c | ||
![]() |
5f6a4fe643 | ||
![]() |
c85ea238ca | ||
![]() |
5c0b2d04f4 | ||
![]() |
76e64053c3 | ||
![]() |
ddfa59a52b | ||
![]() |
e3fb974fc7 | ||
![]() |
9120fbd501 | ||
![]() |
52181848da | ||
![]() |
10cbe04fc5 | ||
![]() |
8367b00e8c | ||
![]() |
4a4f289adc | ||
![]() |
467f1d52e4 | ||
![]() |
ef7261bc41 | ||
![]() |
12bab1c981 | ||
![]() |
61821bd876 | ||
![]() |
0f9422a6a5 | ||
![]() |
55ba686530 | ||
![]() |
4cb43db1a9 | ||
![]() |
237535b23a | ||
![]() |
ed5d3d9f82 | ||
![]() |
f569cc56a9 | ||
![]() |
06dd70bc8b | ||
![]() |
a420eb79bb | ||
![]() |
41fc398114 | ||
![]() |
1737340978 | ||
![]() |
69a6efcd1b | ||
![]() |
fbee0b86bf | ||
![]() |
880c69392a | ||
![]() |
811adaa342 | ||
![]() |
5368f45567 | ||
![]() |
3d5679bb8e | ||
![]() |
e3203278f4 | ||
![]() |
b5aec14d43 | ||
![]() |
8eb2ec6a8d | ||
![]() |
83f3045ee8 | ||
![]() |
f1bc5f305c | ||
![]() |
c3a3f18076 | ||
![]() |
5d6eb4a5a5 | ||
![]() |
cfc22ac7d7 | ||
![]() |
b4f99deb9e | ||
![]() |
1e13aa2c98 | ||
![]() |
109bb2f17e | ||
![]() |
f7ab765b84 | ||
![]() |
910e040e9e | ||
![]() |
bb969ac747 | ||
![]() |
87b5bb5840 | ||
![]() |
11b111e1f8 | ||
![]() |
be576c5fe7 | ||
![]() |
472a415c8f | ||
![]() |
0d9719964f | ||
![]() |
e8075179e0 | ||
![]() |
62d063f735 | ||
![]() |
cc7fe8c255 | ||
![]() |
f52a12a8fe | ||
![]() |
3d6cf2b5c0 | ||
![]() |
f7f9478caf | ||
![]() |
9db80adfba | ||
![]() |
f3b0dc5007 | ||
![]() |
c69e858e7a | ||
![]() |
1e2f311811 | ||
![]() |
eae81ec80e | ||
![]() |
f641d91f67 | ||
![]() |
38d11e5cc6 | ||
![]() |
bbe4d693eb | ||
![]() |
b6e97d9ff0 | ||
![]() |
5db6eb7742 | ||
![]() |
347b6cdcb6 | ||
![]() |
66209135df | ||
![]() |
01fa4dd9d1 | ||
![]() |
9fe09950f1 | ||
![]() |
71cd1fa595 | ||
![]() |
4f2c7328d6 | ||
![]() |
1634a4cc30 | ||
![]() |
feaf52dba6 | ||
![]() |
970ed36de5 | ||
![]() |
bd2f1e9ea6 | ||
![]() |
2afd04d09b | ||
![]() |
69f3bb2e34 | ||
![]() |
d1c5038f16 | ||
![]() |
f62d1220ac | ||
![]() |
4c11307a4e | ||
![]() |
b1a82b5772 | ||
![]() |
3ff56fda1a | ||
![]() |
64754f3a2a | ||
![]() |
d3c21666de | ||
![]() |
5e12e4b813 | ||
![]() |
8c4e4d57b3 | ||
![]() |
ca3b8fe91d | ||
![]() |
e1c3dcb403 | ||
![]() |
c309546e8c | ||
![]() |
0e913a22db | ||
![]() |
be29ca0189 | ||
![]() |
f892ae10d6 | ||
![]() |
674e894574 | ||
![]() |
b1ad45acdd | ||
![]() |
eb1b9b418c | ||
![]() |
7b4f1ef01b | ||
![]() |
41bf6b5a51 | ||
![]() |
0fc3574464 | ||
![]() |
d649f95723 | ||
![]() |
4f8dd2d39d | ||
![]() |
b02c8267f9 | ||
![]() |
0f8f4f6764 | ||
![]() |
8030e7546a | ||
![]() |
5dfb0c19c8 | ||
![]() |
2afbb5713c | ||
![]() |
3b1e0e163b | ||
![]() |
857e5b08c3 | ||
![]() |
49eb375a59 | ||
![]() |
aeda6a8e6f | ||
![]() |
fe76c40716 | ||
![]() |
884c21c565 | ||
![]() |
557d8e2f24 | ||
![]() |
3a8032f491 | ||
![]() |
e7c4575719 | ||
![]() |
39a0013900 | ||
![]() |
ca26cde4e1 | ||
![]() |
eba591a910 | ||
![]() |
919cd56b20 | ||
![]() |
d76097dc5e | ||
![]() |
2fecefce19 | ||
![]() |
7bb0e839a6 | ||
![]() |
9720672374 | ||
![]() |
5240071b1c | ||
![]() |
5773c347d5 | ||
![]() |
3ac69c6210 | ||
![]() |
91f8b4dea2 | ||
![]() |
2aadef022e | ||
![]() |
7391cd34da | ||
![]() |
d622c3c9cc | ||
![]() |
cfecc569b5 | ||
![]() |
867d8643d7 | ||
![]() |
239b5278bf | ||
![]() |
cc6d8eb72b | ||
![]() |
a78cdbd7e3 | ||
![]() |
33588662ef | ||
![]() |
b620788b4c | ||
![]() |
20cc644833 | ||
![]() |
bed789794d | ||
![]() |
0dbe9022fc | ||
![]() |
a6b9d987e9 | ||
![]() |
5718ba253f | ||
![]() |
e7f03de468 | ||
![]() |
33843b0933 | ||
![]() |
7d94121606 | ||
![]() |
79a8e8cf04 | ||
![]() |
6526c4d0fc | ||
![]() |
f0e7f3e7e5 | ||
![]() |
10c292b055 | ||
![]() |
ddac844034 | ||
![]() |
dd28637947 | ||
![]() |
5b26d4e0ca | ||
![]() |
757c984ddb | ||
![]() |
61cd57d378 | ||
![]() |
0134672345 | ||
![]() |
8f14dc6998 | ||
![]() |
3381828cc6 | ||
![]() |
be0e303ec8 | ||
![]() |
546bab0a8c | ||
![]() |
98ee4a5292 | ||
![]() |
d42fa25a9e | ||
![]() |
7d25a443c4 | ||
![]() |
3fbaf737ef | ||
![]() |
258849c9bc | ||
![]() |
594a79c2f9 | ||
![]() |
8d47e3bb82 | ||
![]() |
bbcf40e811 | ||
![]() |
0fb36f29a8 | ||
![]() |
4339647d90 | ||
![]() |
a391dd5fef | ||
![]() |
657f5f791c | ||
![]() |
e9b4869372 | ||
![]() |
0a6b5abf45 | ||
![]() |
d8102bf660 | ||
![]() |
489e9b69df | ||
![]() |
baaac5cca3 | ||
![]() |
5abcfdb93e | ||
![]() |
8cf7e9e7da | ||
![]() |
0e9d050296 | ||
![]() |
87875a49b4 | ||
![]() |
17e62abb6d | ||
![]() |
4940b5dbc2 | ||
![]() |
3fb5124174 | ||
![]() |
59b0a2d711 | ||
![]() |
dcd21d042f | ||
![]() |
2d81beb819 | ||
![]() |
4de4b1e7a0 | ||
![]() |
f33ab44f84 | ||
![]() |
67eb03400a | ||
![]() |
cb5b8c9747 | ||
![]() |
c331b64d79 | ||
![]() |
e51760e111 | ||
![]() |
c67ff82377 | ||
![]() |
42d979a231 | ||
![]() |
1bb5448fe8 | ||
![]() |
2222f44c94 | ||
![]() |
d81d986858 | ||
![]() |
cc7c0a2dab | ||
![]() |
76cc24e34a | ||
![]() |
0ec1209eab | ||
![]() |
925362a2fc | ||
![]() |
1de85491e1 | ||
![]() |
cc20d0147e | ||
![]() |
8c82b73027 | ||
![]() |
92d70f4167 | ||
![]() |
63e9827b90 | ||
![]() |
f3419d8c04 | ||
![]() |
c29df1699e | ||
![]() |
4a0bd06d58 | ||
![]() |
03f29c19dc | ||
![]() |
a14b948b6c | ||
![]() |
4a3a9f3ad8 | ||
![]() |
d38ccfa88f | ||
![]() |
f0d65436fb | ||
![]() |
dfc38ef460 | ||
![]() |
adc0880520 | ||
![]() |
509c70c698 | ||
![]() |
3900fca304 | ||
![]() |
76ff25eedf | ||
![]() |
5d29f22808 | ||
![]() |
87bb0f5bcb | ||
![]() |
f9baa30270 | ||
![]() |
7e11bd1ac1 | ||
![]() |
af7fe2cf9b | ||
![]() |
524ccf033f | ||
![]() |
b1807797a3 | ||
![]() |
b07e5d38a2 | ||
![]() |
624905a7f1 | ||
![]() |
4ace02df5f | ||
![]() |
70adacf08a | ||
![]() |
fb92d150d9 | ||
![]() |
d9559ce1d4 | ||
![]() |
7526a87ff2 | ||
![]() |
171e306dbf | ||
![]() |
d6c725d522 | ||
![]() |
0c85173d5b | ||
![]() |
7555701def | ||
![]() |
065d80716b | ||
![]() |
9d7feaaf9e | ||
![]() |
d5896f9010 | ||
![]() |
64a7e75dd3 | ||
![]() |
93e51dd33e | ||
![]() |
e8f4045d0b | ||
![]() |
aa129c9257 | ||
![]() |
4c2eb6b95d | ||
![]() |
e226008d83 | ||
![]() |
8b1b6734f6 | ||
![]() |
97c2bdf256 | ||
![]() |
20ecd2afcb | ||
![]() |
517db6d887 | ||
![]() |
20630b2e6c | ||
![]() |
7774de0fe3 | ||
![]() |
60e8ff16dc | ||
![]() |
19c3e125ba | ||
![]() |
832afa81a1 | ||
![]() |
b29128994e | ||
![]() |
1db0bd3fc0 | ||
![]() |
cba6090398 | ||
![]() |
4194a902e8 | ||
![]() |
3823ba1ded | ||
![]() |
301ee21f33 | ||
![]() |
6623c87d0b | ||
![]() |
070f57820f | ||
![]() |
62266dbd4f | ||
![]() |
d47c286b12 | ||
![]() |
259009a7ea | ||
![]() |
90255914a8 | ||
![]() |
e3e41b69a1 | ||
![]() |
44d8721087 | ||
![]() |
4aab2342e9 | ||
![]() |
df6db90dd4 | ||
![]() |
d8b34b0993 | ||
![]() |
2849ca404e | ||
![]() |
e417c6cffe | ||
![]() |
32587bd7de | ||
![]() |
b7a0ef6bdf | ||
![]() |
7010452062 | ||
![]() |
e8c915dacc | ||
![]() |
25b0081367 | ||
![]() |
c4a169a6fc | ||
![]() |
1d8dbb2896 | ||
![]() |
43c57e3239 | ||
![]() |
2d5c05a69c | ||
![]() |
321c2f8f24 | ||
![]() |
f9dc49c21c | ||
![]() |
71b7790be8 | ||
![]() |
933ec9e978 | ||
![]() |
a263cc2369 | ||
![]() |
6b5eadb10f | ||
![]() |
9772d0512c | ||
![]() |
27f2df2292 | ||
![]() |
834e8898b9 | ||
![]() |
60070d0b3d | ||
![]() |
330d420afc | ||
![]() |
2fcbf321fa | ||
![]() |
a683ce4153 | ||
![]() |
95a6f986a0 | ||
![]() |
37dee79b74 | ||
![]() |
62e7049a4f | ||
![]() |
fff3c2573a | ||
![]() |
70a2ac2f1c | ||
![]() |
a8b9414697 | ||
![]() |
92dc226018 | ||
![]() |
2adebcd6cc | ||
![]() |
ce32c44b54 | ||
![]() |
818a26f21b | ||
![]() |
5e6a851d6c | ||
![]() |
f788a671e4 | ||
![]() |
bd77b9a0ce | ||
![]() |
8ad043fc38 | ||
![]() |
b388f6e32d | ||
![]() |
25eca09c7e | ||
![]() |
88299502b4 | ||
![]() |
1d495351a0 | ||
![]() |
365a36386a | ||
![]() |
242b25aba4 | ||
![]() |
aa7ba62978 | ||
![]() |
0b995f21e7 | ||
![]() |
bb1fe302cf | ||
![]() |
f032e8c191 | ||
![]() |
24fcb61470 | ||
![]() |
6ff48dddcb | ||
![]() |
862a654b70 | ||
![]() |
8e27a69370 | ||
![]() |
9237f8edc1 | ||
![]() |
1f4e86d61c | ||
![]() |
04ff593bf5 | ||
![]() |
ddbbef88e3 | ||
![]() |
ae7f54f514 | ||
![]() |
0b9d8e679a | ||
![]() |
4a0f56b679 | ||
![]() |
10135b2d7b | ||
![]() |
f348370e1b | ||
![]() |
951657c99b | ||
![]() |
7df721d4e9 | ||
![]() |
0465224616 | ||
![]() |
9d6b028e01 | ||
![]() |
fcae9cd210 | ||
![]() |
e5f3b22d63 | ||
![]() |
64f17314a2 | ||
![]() |
1d8806b0fc | ||
![]() |
e56dc9c30e | ||
![]() |
4bceea70c5 | ||
![]() |
8087c0a5d2 | ||
![]() |
53d818e31c | ||
![]() |
f522c5380c | ||
![]() |
2304b4e86a | ||
![]() |
0f753d9794 | ||
![]() |
805fc29ae8 | ||
![]() |
57f3c41b97 | ||
![]() |
b58557a3a6 | ||
![]() |
6a787b8004 | ||
![]() |
0deed07b3e | ||
![]() |
ebf2c49b50 | ||
![]() |
38c63afd64 | ||
![]() |
030bb7282a | ||
![]() |
335e9c769a | ||
![]() |
5e9320f6b5 | ||
![]() |
e2afc1f37a | ||
![]() |
2468fccf7f | ||
![]() |
dc5dda0f31 | ||
![]() |
3030fd815c | ||
![]() |
5c3df60ec9 | ||
![]() |
8825fbf713 | ||
![]() |
82cd3bfe1c | ||
![]() |
7cc3248044 | ||
![]() |
3e341021c3 | ||
![]() |
1ecf77d630 | ||
![]() |
507be6c3f8 | ||
![]() |
f4561db69a | ||
![]() |
2b0ca87119 | ||
![]() |
37d1ab83c5 | ||
![]() |
e7761aec37 | ||
![]() |
890bee64a4 | ||
![]() |
ba0c270c7a | ||
![]() |
322dbdde4e | ||
![]() |
64294e4560 | ||
![]() |
c4c034ca4b | ||
![]() |
f7dc8c0eaa | ||
![]() |
bb036ef544 | ||
![]() |
910dad505a | ||
![]() |
4b2b475ac2 | ||
![]() |
a4ad293d4a | ||
![]() |
6089b35706 | ||
![]() |
a999100858 | ||
![]() |
57e9a9eee6 | ||
![]() |
b9d16dac4e | ||
![]() |
776a5e0d25 | ||
![]() |
376c6a9dd1 | ||
![]() |
3aba9d4473 | ||
![]() |
832b524180 | ||
![]() |
29d461b628 | ||
![]() |
e8b6edd5a0 | ||
![]() |
34c5bde355 | ||
![]() |
9117b2e300 | ||
![]() |
6bf5f5a221 | ||
![]() |
92fd2938e7 | ||
![]() |
9cd7cbe134 | ||
![]() |
8231278817 | ||
![]() |
0ad822eb70 | ||
![]() |
156c7badf5 | ||
![]() |
547c8c288b | ||
![]() |
4b1dd54a56 | ||
![]() |
acdde129bb | ||
![]() |
f8a0135edf | ||
![]() |
1f7bc08884 | ||
![]() |
de849d5e6f | ||
![]() |
a6228e7aaf | ||
![]() |
e16a83d393 | ||
![]() |
a0a3957eb6 | ||
![]() |
b90343e512 | ||
![]() |
042243471f | ||
![]() |
3054c0dc50 | ||
![]() |
52d63ba26c | ||
![]() |
bad5431a14 | ||
![]() |
1ab452fc57 | ||
![]() |
2a946832ba | ||
![]() |
488a91eb40 | ||
![]() |
f75c0e3204 | ||
![]() |
4d4c81d438 | ||
![]() |
1e6c128c4c | ||
![]() |
1c6a649362 | ||
![]() |
0262f757e1 | ||
![]() |
8908d16285 | ||
![]() |
61808b03b5 | ||
![]() |
d65185a6a7 | ||
![]() |
bf277eb808 | ||
![]() |
825b0324cf | ||
![]() |
7e8be3f280 | ||
![]() |
a6ba8a1585 | ||
![]() |
e65ca61957 | ||
![]() |
e42a3a3233 | ||
![]() |
769bf2ebcc | ||
![]() |
fc0854651b | ||
![]() |
e6f635ca17 | ||
![]() |
099e53f3a5 | ||
![]() |
0f940cb6ce | ||
![]() |
1453cfa4e9 | ||
![]() |
0ba93e4aac | ||
![]() |
170428b107 | ||
![]() |
950ff0056a | ||
![]() |
38619bb28d | ||
![]() |
c6660afe44 | ||
![]() |
8acf729650 | ||
![]() |
dfbdaca2b8 | ||
![]() |
657c346556 | ||
![]() |
ceece918e4 | ||
![]() |
ffa78e6bea | ||
![]() |
4ce5c3a694 | ||
![]() |
a3d4fd71c3 | ||
![]() |
d97423ebab | ||
![]() |
333a03f1ec | ||
![]() |
5b8fc907df | ||
![]() |
76392f4fe1 | ||
![]() |
3a5abee512 | ||
![]() |
e7ee375f22 | ||
![]() |
4aec54988c | ||
![]() |
271e03f0d7 | ||
![]() |
d4f9be4416 | ||
![]() |
1f5b21ead5 | ||
![]() |
35c7884929 | ||
![]() |
3f6c4ec6d0 | ||
![]() |
fc72f12e7f | ||
![]() |
681f67d353 | ||
![]() |
d2372c8538 | ||
![]() |
7db23f4ef1 | ||
![]() |
36ff6327b0 | ||
![]() |
26a38a0b20 | ||
![]() |
b3e1fd97b8 | ||
![]() |
c77aaa5d99 | ||
![]() |
e4e0a12901 | ||
![]() |
2afb49ba9a | ||
![]() |
154ad6faa9 | ||
![]() |
2aa8525ecb | ||
![]() |
36033e3832 | ||
![]() |
320f3fffbe | ||
![]() |
30b4d90f1c | ||
![]() |
1cdd6dc829 | ||
![]() |
f5b3247aae | ||
![]() |
aa536217b3 | ||
![]() |
14f4fd3f11 | ||
![]() |
b1324fbc9f | ||
![]() |
4700fbcbdf | ||
![]() |
2660da6f5c | ||
![]() |
7c86d96e86 | ||
![]() |
a1dea11d32 | ||
![]() |
bfef7c302c | ||
![]() |
b9d1c483b9 | ||
![]() |
dc94cca8dd | ||
![]() |
97fe777ab4 | ||
![]() |
f1bad83a21 | ||
![]() |
7aa28ce279 | ||
![]() |
c89a460672 | ||
![]() |
e3bfacde3e | ||
![]() |
9c05098ed9 | ||
![]() |
c395240425 | ||
![]() |
68e3e99087 | ||
![]() |
7f7ea909bc | ||
![]() |
379a6f4dab | ||
![]() |
d275851dfb | ||
![]() |
a9ded76dff | ||
![]() |
5007b96363 | ||
![]() |
b2e88ecfeb | ||
![]() |
d6cd450624 | ||
![]() |
e875775940 | ||
![]() |
72606d97e6 | ||
![]() |
48e71ae87b | ||
![]() |
7308325559 | ||
![]() |
9dea06f5b5 | ||
![]() |
c68976360d | ||
![]() |
a535cc62a0 | ||
![]() |
63b8af3558 | ||
![]() |
3f1fd5abff | ||
![]() |
92f72682e7 | ||
![]() |
891c89eeb8 | ||
![]() |
e2b8d96529 | ||
![]() |
78a92b4f9d | ||
![]() |
7b2b99a996 | ||
![]() |
b6d051e226 | ||
![]() |
0ad0347acb | ||
![]() |
a2f4783e75 | ||
![]() |
2001a891c4 | ||
![]() |
1ee9a437f9 | ||
![]() |
69644346ac | ||
![]() |
00b87f1ded | ||
![]() |
beca41480d | ||
![]() |
43b12fd9bc | ||
![]() |
e8ec8ba1d4 | ||
![]() |
feeec90873 | ||
![]() |
d361acdd4e | ||
![]() |
92a487f2e4 | ||
![]() |
df9d0fb332 | ||
![]() |
4a0b9522b6 | ||
![]() |
32999798e0 | ||
![]() |
424bc4bcf7 | ||
![]() |
0eea92c8fc | ||
![]() |
d42c303b24 | ||
![]() |
237348c772 | ||
![]() |
86786ed544 | ||
![]() |
de93728674 | ||
![]() |
5e74365e55 | ||
![]() |
3e64fec9f4 | ||
![]() |
707e9397ca | ||
![]() |
f72213c4ac | ||
![]() |
132b88749c | ||
![]() |
8b39eb9b1f | ||
![]() |
0f2322acfc | ||
![]() |
5f344c17c2 | ||
![]() |
a688ecd6fa | ||
![]() |
120bc77e91 | ||
![]() |
535ec1a921 | ||
![]() |
7ec9a4385a | ||
![]() |
6d7269815b | ||
![]() |
cb0cf14155 | ||
![]() |
7914234b26 | ||
![]() |
51dcc3bb0b | ||
![]() |
f6363fde9a | ||
![]() |
f633915443 | ||
![]() |
57043825ba | ||
![]() |
22685556e5 | ||
![]() |
f444eac557 | ||
![]() |
eb0d214c17 | ||
![]() |
55f74c3285 | ||
![]() |
2aeac8de51 | ||
![]() |
6d01ffcd94 | ||
![]() |
c2ee45f5ff | ||
![]() |
0bf63175ab | ||
![]() |
d043c8535b | ||
![]() |
d2a2787783 | ||
![]() |
85fecbb10b | ||
![]() |
ec3e333fb8 | ||
![]() |
1402d13556 | ||
![]() |
03c239ded9 | ||
![]() |
16c9bad786 | ||
![]() |
6574e5eb57 | ||
![]() |
4fa21ee5ed | ||
![]() |
8bfbda1eab | ||
![]() |
93c289b475 | ||
![]() |
ed5a343d25 | ||
![]() |
0081174689 | ||
![]() |
cd64e0b6e3 | ||
![]() |
51c10bef0b | ||
![]() |
d1dc195208 | ||
![]() |
5e5b029d6c | ||
![]() |
b58285b7ed | ||
![]() |
e5ebbdafd4 | ||
![]() |
977781d3f4 | ||
![]() |
984af1a725 | ||
![]() |
5aa76de35f | ||
![]() |
1158cff9ea | ||
![]() |
ae3a34a388 | ||
![]() |
c0824cd49a | ||
![]() |
6ed29f47c9 | ||
![]() |
9ed1b778ed | ||
![]() |
b970dd1beb | ||
![]() |
576df87240 | ||
![]() |
2dddaa7dc9 | ||
![]() |
45a6ad8e57 | ||
![]() |
b57a6a1adf | ||
![]() |
d78072fcd4 | ||
![]() |
446e0943da | ||
![]() |
23bce27b26 | ||
![]() |
c078dfcf6b | ||
![]() |
18c4db678b | ||
![]() |
7d26ba754a | ||
![]() |
bd70ce7f94 | ||
![]() |
ce4c54e2b2 | ||
![]() |
57ae9f466d | ||
![]() |
dca3fd8307 | ||
![]() |
ab1670386f | ||
![]() |
76e9d64b36 | ||
![]() |
e9f9cb29fc | ||
![]() |
3e1d7e6a14 | ||
![]() |
ef347776c2 | ||
![]() |
5e35309913 | ||
![]() |
71dc7169d9 | ||
![]() |
1e6ffc6294 | ||
![]() |
3f00fa16c6 | ||
![]() |
0d76380042 | ||
![]() |
46d143376a | ||
![]() |
22de91a947 | ||
![]() |
1c2f825230 | ||
![]() |
d9c07d9ef7 | ||
![]() |
8f7427c158 | ||
![]() |
6a999d16fa | ||
![]() |
cfd6b34b8f | ||
![]() |
a70964aaf4 | ||
![]() |
35c13196f0 | ||
![]() |
bc87983310 | ||
![]() |
f5c0760c6b | ||
![]() |
63e6c19b7d | ||
![]() |
1bd9ebf533 | ||
![]() |
e0e79419b6 | ||
![]() |
8fc10ac95c | ||
![]() |
91ad208d18 | ||
![]() |
6c495a92f0 | ||
![]() |
96a2a6b945 | ||
![]() |
fd4bb4154b | ||
![]() |
46945354cc | ||
![]() |
f5bb286b76 | ||
![]() |
f47a08ab84 | ||
![]() |
660fc89967 | ||
![]() |
6ff3e49b6f | ||
![]() |
e58a8639e3 | ||
![]() |
5b7b3da701 | ||
![]() |
0a0dfdb2f9 | ||
![]() |
8572e19327 | ||
![]() |
031348d377 | ||
![]() |
462d95ab4d | ||
![]() |
a48bb80ea0 | ||
![]() |
c0fb092425 | ||
![]() |
37de5d4849 | ||
![]() |
715749f578 | ||
![]() |
0c7346ec3e | ||
![]() |
711a458be5 | ||
![]() |
171fba320f | ||
![]() |
ad09976eca | ||
![]() |
7abb748134 | ||
![]() |
858ae9900e | ||
![]() |
f87f0fe781 | ||
![]() |
b3ea81b33f | ||
![]() |
3bf9c70a7c | ||
![]() |
ea7103088f | ||
![]() |
a3a45f6709 | ||
![]() |
5a7ea76ed3 | ||
![]() |
9403c9e95a | ||
![]() |
13969f8567 | ||
![]() |
9be85b846b | ||
![]() |
35c9b1042f | ||
![]() |
31a57c05dc | ||
![]() |
3dff5d3cbe | ||
![]() |
4c9a79dddb | ||
![]() |
7c4f5e1def | ||
![]() |
abe8dbbf1c | ||
![]() |
0efb31ef32 | ||
![]() |
eb22fbc894 | ||
![]() |
479bc2d5ed | ||
![]() |
e6e654e25c | ||
![]() |
7b06007266 | ||
![]() |
7d55ccb8b0 | ||
![]() |
da6bce4f76 | ||
![]() |
74e8a6451b | ||
![]() |
f741adc86c | ||
![]() |
817141c162 | ||
![]() |
e86f494317 | ||
![]() |
d948e6c3c5 | ||
![]() |
e7376b7b74 | ||
![]() |
69b2baec5c | ||
![]() |
2c6995778e | ||
![]() |
22df572979 | ||
![]() |
634705851d | ||
![]() |
1194f52a5c | ||
![]() |
45e5f0f10b | ||
![]() |
a23d1af0ac | ||
![]() |
2b66ef0df4 | ||
![]() |
7285f0d441 | ||
![]() |
ca3468cb55 | ||
![]() |
7d2012af87 | ||
![]() |
17515f4aef | ||
![]() |
f71178a16f | ||
![]() |
d77eb8a8d5 | ||
![]() |
3fb9118cb6 | ||
![]() |
71fb4e3d76 | ||
![]() |
2518e32de8 | ||
![]() |
e8938fc66a | ||
![]() |
fde6323662 | ||
![]() |
7154605982 | ||
![]() |
c68cfcdb2d | ||
![]() |
7bf3e28dc6 | ||
![]() |
3fa5a2f794 | ||
![]() |
af5efadd9f | ||
![]() |
5b5a72e33c | ||
![]() |
58fa43e7c3 | ||
![]() |
4266cf8504 | ||
![]() |
4f7f72c257 | ||
![]() |
c5035d8ffd | ||
![]() |
92779a5bd8 | ||
![]() |
0dc4373aad | ||
![]() |
06b305d232 | ||
![]() |
c4a493de97 | ||
![]() |
4a87abc966 | ||
![]() |
2290d71338 | ||
![]() |
17ecb11ed6 | ||
![]() |
8800d40442 | ||
![]() |
7ac43cfb6b | ||
![]() |
dfc56cfc0e | ||
![]() |
c83428475d | ||
![]() |
d5680c5d20 | ||
![]() |
1069c8931d | ||
![]() |
507fc462db | ||
![]() |
d9d84c8d73 | ||
![]() |
e927e5d440 | ||
![]() |
33ec2a5e94 | ||
![]() |
a8a5bd3d6b | ||
![]() |
038ccd764a | ||
![]() |
c0445c23bf | ||
![]() |
9670f233cc | ||
![]() |
ea179abdb7 | ||
![]() |
eabd88ed28 | ||
![]() |
a44b646105 | ||
![]() |
880ac537a5 | ||
![]() |
7b8f0ba8b7 | ||
![]() |
73a68c6ea5 | ||
![]() |
44dc90dcc8 | ||
![]() |
8efa1f8fc6 | ||
![]() |
5d1e6b28d9 | ||
![]() |
c638b4a682 | ||
![]() |
01a4cf8a10 | ||
![]() |
f51f7fbb94 | ||
![]() |
b47b6e02fd | ||
![]() |
381312a02a | ||
![]() |
f836b465aa | ||
![]() |
a47a045128 | ||
![]() |
e8ae155585 | ||
![]() |
2cb422360c | ||
![]() |
fa934dd4df | ||
![]() |
6a52017724 | ||
![]() |
32fd45cf48 | ||
![]() |
c5a09ca7a9 | ||
![]() |
b425036808 | ||
![]() |
0479df53ca | ||
![]() |
0b0d256a69 | ||
![]() |
d09d0aaab6 | ||
![]() |
460b7b247f | ||
![]() |
ebc2fb411f | ||
![]() |
0d5467a6e9 | ||
![]() |
305e7b55bd | ||
![]() |
ad0d1e2ad5 | ||
![]() |
7bf4319eb2 | ||
![]() |
0ebda87425 | ||
![]() |
a099172754 | ||
![]() |
988866ca4a | ||
![]() |
2cb7a0a0bb | ||
![]() |
b8d5fa4aef | ||
![]() |
0a9f61fbf1 | ||
![]() |
c7f22f0324 | ||
![]() |
d234f7a498 | ||
![]() |
2fd9e63f1a | ||
![]() |
874ebed14d | ||
![]() |
5b904a103a | ||
![]() |
0a8f9777a7 | ||
![]() |
78d3a713de | ||
![]() |
74229d4a41 | ||
![]() |
29a4c5ebc2 | ||
![]() |
903df79b2d | ||
![]() |
d47ff8ae73 | ||
![]() |
738442b82a | ||
![]() |
68073c6276 | ||
![]() |
920acb75c3 | ||
![]() |
3dbc6a40ae | ||
![]() |
af54c82138 | ||
![]() |
232ed540db | ||
![]() |
c542aef600 | ||
![]() |
abffa1194a | ||
![]() |
3b3c141ff9 | ||
![]() |
6969b3be3b | ||
![]() |
311b02f0b5 | ||
![]() |
36c87d9f27 | ||
![]() |
4e3fc0c1dc | ||
![]() |
187708e542 | ||
![]() |
3b0cd44158 | ||
![]() |
741499dea7 | ||
![]() |
a53382e460 | ||
![]() |
e99b9ca9c0 | ||
![]() |
8e72be3117 | ||
![]() |
7a9966af9d | ||
![]() |
d59caffe2c | ||
![]() |
582fb3901a | ||
![]() |
c709741871 | ||
![]() |
817454cfe6 | ||
![]() |
e986c7984b | ||
![]() |
dfd7efaf13 | ||
![]() |
802b5ef7dc | ||
![]() |
e580e087ff | ||
![]() |
b79732b967 | ||
![]() |
faa7e3cc2e | ||
![]() |
5efc9bd194 | ||
![]() |
4bae75387a | ||
![]() |
f57776836f | ||
![]() |
569fa3f57f | ||
![]() |
be3b1cff0b | ||
![]() |
ab479b4961 | ||
![]() |
264da8c127 | ||
![]() |
cfc7cac3c9 | ||
![]() |
8b74be464f | ||
![]() |
fc689a6cb3 | ||
![]() |
b4d547905d | ||
![]() |
4ee36a9474 | ||
![]() |
c2b2f2a71e | ||
![]() |
d1b4810542 | ||
![]() |
bcccbbd894 | ||
![]() |
4e465f25d0 | ||
![]() |
7ac66972b7 | ||
![]() |
3e9ae3ea64 | ||
![]() |
0a91a793cf | ||
![]() |
07d6d116ed | ||
![]() |
b5483f2c68 | ||
![]() |
b990e9145b | ||
![]() |
3bdc62215e | ||
![]() |
423c558e44 | ||
![]() |
42238f88ea | ||
![]() |
d0bbfdbfb8 | ||
![]() |
e29c0661cc | ||
![]() |
e57554ea65 | ||
![]() |
09ee811f4b | ||
![]() |
b067ab9202 | ||
![]() |
6e40c7a9b8 | ||
![]() |
01541bc350 | ||
![]() |
4504c10f3b | ||
![]() |
7b1000013e | ||
![]() |
9e997cc787 | ||
![]() |
d87048fd5a | ||
![]() |
6926d046c0 | ||
![]() |
b8d85c6939 | ||
![]() |
5c4bc807f7 | ||
![]() |
8eeca8c7db | ||
![]() |
d7664a6ef1 | ||
![]() |
5df106603d | ||
![]() |
69f0223474 | ||
![]() |
724845110c | ||
![]() |
84039e2514 | ||
![]() |
2d24baaad4 | ||
![]() |
b7cc4dce70 | ||
![]() |
0b7a9a8e9f | ||
![]() |
8cda5102fc | ||
![]() |
ee13e8c76b | ||
![]() |
fcd7d658dc | ||
![]() |
89e9f7b42b | ||
![]() |
b6c875a923 | ||
![]() |
a65d1bfb14 | ||
![]() |
37d244ea81 | ||
![]() |
a937b5c4ad | ||
![]() |
fb0ce375f0 | ||
![]() |
0739d237ad | ||
![]() |
8145212103 | ||
![]() |
2df39e64ab | ||
![]() |
8fddf146bf | ||
![]() |
3f5593d613 | ||
![]() |
dcd1252368 | ||
![]() |
edb75bc29e | ||
![]() |
660cec69b1 | ||
![]() |
a2611edcf3 | ||
![]() |
e19c532ebf | ||
![]() |
e426617c9c | ||
![]() |
192cdf3d04 | ||
![]() |
64a5e7be98 | ||
![]() |
66bd15555c | ||
![]() |
4c7156c1e6 | ||
![]() |
33e5de31d8 | ||
![]() |
3eaf56894e | ||
![]() |
242ce20cbf | ||
![]() |
f52e7199df | ||
![]() |
e12c831b15 | ||
![]() |
cd399caf6f | ||
![]() |
f6144dfe03 | ||
![]() |
ac2fcfcb62 | ||
![]() |
4ac2d45a06 | ||
![]() |
dce6ed56d7 | ||
![]() |
e3d430b83e | ||
![]() |
511bab5bbf | ||
![]() |
156bf7e6aa | ||
![]() |
938b720a9e | ||
![]() |
44975d40ef | ||
![]() |
ea8f8b6dc3 |
@@ -16,8 +16,8 @@ AllowShortFunctionsOnASingleLine: All
|
|||||||
AllowShortIfStatementsOnASingleLine: Never
|
AllowShortIfStatementsOnASingleLine: Never
|
||||||
AllowShortLoopsOnASingleLine: false
|
AllowShortLoopsOnASingleLine: false
|
||||||
|
|
||||||
AlwaysBreakAfterDefinitionReturnType: All
|
AlwaysBreakAfterDefinitionReturnType: None
|
||||||
AlwaysBreakAfterReturnType: AllDefinitions
|
AlwaysBreakAfterReturnType: None
|
||||||
AlwaysBreakBeforeMultilineStrings: false
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
AlwaysBreakTemplateDeclarations: MultiLine
|
AlwaysBreakTemplateDeclarations: MultiLine
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ BraceWrapping:
|
|||||||
AfterUnion: true
|
AfterUnion: true
|
||||||
AfterExternBlock: false
|
AfterExternBlock: false
|
||||||
BeforeElse: false
|
BeforeElse: false
|
||||||
BeforeWhile: true
|
BeforeWhile: false
|
||||||
IndentBraces: false
|
IndentBraces: false
|
||||||
SplitEmptyFunction: true
|
SplitEmptyFunction: true
|
||||||
SplitEmptyRecord: true
|
SplitEmptyRecord: true
|
||||||
@@ -62,7 +62,8 @@ IndentGotoLabels: true
|
|||||||
IndentPPDirectives: None
|
IndentPPDirectives: None
|
||||||
IndentExternBlock: NoIndent
|
IndentExternBlock: NoIndent
|
||||||
|
|
||||||
SpaceAfterCStyleCast: true
|
PointerAlignment: Right
|
||||||
|
SpaceAfterCStyleCast: false
|
||||||
SpacesInCStyleCastParentheses: false
|
SpacesInCStyleCastParentheses: false
|
||||||
SpacesInConditionalStatement: false
|
SpacesInConditionalStatement: false
|
||||||
SpacesInContainerLiterals: true
|
SpacesInContainerLiterals: true
|
||||||
|
@@ -7,6 +7,8 @@ root = true
|
|||||||
[*.{c,cg,cpp,gradle,h,java,m,metal,pl,py,S,sh,txt}]
|
[*.{c,cg,cpp,gradle,h,java,m,metal,pl,py,S,sh,txt}]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
indent_style = space
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
[*.{html,js,json,m4,yml,yaml,vcxproj,vcxproj.filters}]
|
[*.{html,js,json,m4,yml,yaml,vcxproj,vcxproj.filters}]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
16
.github/cmake/CMakeLists.txt
vendored
Normal file
16
.github/cmake/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.0...3.5)
|
||||||
|
project(ci_utils C CXX)
|
||||||
|
|
||||||
|
set(txt "CC=${CMAKE_C_COMPILER}
|
||||||
|
CXX=${CMAKE_CXX_COMPILER}
|
||||||
|
CFLAGS=${CMAKE_C_FLAGS}
|
||||||
|
CXXFLAGS=${CMAKE_CXX_FLAGS}
|
||||||
|
LDFLAGS=${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_C_STANDARD_LIBRARIES}
|
||||||
|
")
|
||||||
|
|
||||||
|
message("${txt}")
|
||||||
|
|
||||||
|
set(VAR_PATH "/tmp/env.txt" CACHE PATH "Where to write environment file")
|
||||||
|
message(STATUS "Writing CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS environment to ${VAR_PATH}")
|
||||||
|
|
||||||
|
file(WRITE "${VAR_PATH}" "${txt}")
|
2
.github/workflows/android.yml
vendored
2
.github/workflows/android.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
|||||||
- { name: CMake, cmake: 1, android_abi: "arm64-v8a", android_platform: 23, arch: "aarch64" }
|
- { name: CMake, cmake: 1, android_abi: "arm64-v8a", android_platform: 23, arch: "aarch64" }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: nttld/setup-ndk@v1
|
- uses: nttld/setup-ndk@v1
|
||||||
id: setup_ndk
|
id: setup_ndk
|
||||||
with:
|
with:
|
||||||
|
@@ -1,19 +1,23 @@
|
|||||||
name: Build (VM Actions)
|
name: Build (C/P Actions)
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
freebsd:
|
freebsd:
|
||||||
runs-on: macos-12
|
runs-on: ubuntu-latest
|
||||||
name: FreeBSD
|
name: FreeBSD
|
||||||
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: vmactions/freebsd-vm@v0
|
uses: cross-platform-actions/action@v0.23.0
|
||||||
with:
|
with:
|
||||||
usesh: true
|
operating_system: freebsd
|
||||||
prepare: |
|
version: '13.2'
|
||||||
pkg install -y \
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo pkg update
|
||||||
|
sudo pkg install -y \
|
||||||
gmake \
|
gmake \
|
||||||
pkgconf \
|
pkgconf \
|
||||||
libXcursor \
|
libXcursor \
|
||||||
@@ -33,17 +37,15 @@ jobs:
|
|||||||
libinotify \
|
libinotify \
|
||||||
alsa-lib \
|
alsa-lib \
|
||||||
jackit \
|
jackit \
|
||||||
nas \
|
|
||||||
pipewire \
|
pipewire \
|
||||||
pulseaudio \
|
pulseaudio \
|
||||||
sndio \
|
sndio \
|
||||||
dbus \
|
dbus \
|
||||||
zh-fcitx \
|
zh-fcitx \
|
||||||
ibus \
|
ibus \
|
||||||
libsamplerate \
|
|
||||||
libudev-devd
|
libudev-devd
|
||||||
|
|
||||||
run: |
|
|
||||||
mkdir build_autotools
|
mkdir build_autotools
|
||||||
(cd build_autotools && CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ../configure)
|
export CPPFLAGS="-I/usr/local/include"
|
||||||
|
export LDFLAGS="-L/usr/local/lib"
|
||||||
|
(cd build_autotools && ../configure --disable-static)
|
||||||
gmake -C build_autotools -j`sysctl -n hw.ncpu` V=1
|
gmake -C build_autotools -j`sysctl -n hw.ncpu` V=1
|
6
.github/workflows/emscripten.yml
vendored
6
.github/workflows/emscripten.yml
vendored
@@ -6,10 +6,10 @@ jobs:
|
|||||||
emscripten:
|
emscripten:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: mymindstorm/setup-emsdk@v10
|
- uses: mymindstorm/setup-emsdk@v14
|
||||||
with:
|
with:
|
||||||
version: 2.0.32
|
version: 3.1.35
|
||||||
- name: Install ninja
|
- name: Install ninja
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y update
|
sudo apt-get -y update
|
||||||
|
2
.github/workflows/ios.yml
vendored
2
.github/workflows/ios.yml
vendored
@@ -15,6 +15,6 @@ jobs:
|
|||||||
- { name: tvOS, target: Static Library-tvOS, sdk: appletvos }
|
- { name: tvOS, target: Static Library-tvOS, sdk: appletvos }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Build
|
- name: Build
|
||||||
run: xcodebuild -project Xcode/SDL/SDL.xcodeproj -target '${{ matrix.platform.target }}' -configuration Release -sdk ${{ matrix.platform.sdk }} clean build
|
run: xcodebuild -project Xcode/SDL/SDL.xcodeproj -target '${{ matrix.platform.target }}' -configuration Release -sdk ${{ matrix.platform.sdk }} clean build
|
63
.github/workflows/main.yml
vendored
63
.github/workflows/main.yml
vendored
@@ -15,17 +15,22 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
- { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
|
- { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
|
||||||
- { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
|
- { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
|
||||||
- { name: Windows (clang32), os: windows-latest, shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686 }
|
- { name: Windows (clang32), os: windows-latest, shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686 }
|
||||||
- { name: Windows (clang64), os: windows-latest, shell: 'msys2 {0}', msystem: clang64, msys-env: mingw-w64-clang-x86_64 }
|
- { name: Windows (clang64), os: windows-latest, shell: 'msys2 {0}', msystem: clang64, msys-env: mingw-w64-clang-x86_64 }
|
||||||
- { name: Windows (ucrt64), os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64 }
|
- { name: Windows (ucrt64), os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64 }
|
||||||
- { name: Ubuntu 20.04 (CMake), os: ubuntu-20.04, shell: sh }
|
- { name: Ubuntu 20.04 (CMake), os: ubuntu-20.04, shell: sh }
|
||||||
- { name: Ubuntu 20.04 (autotools), os: ubuntu-20.04, shell: sh, autotools: true }
|
- { name: Ubuntu 20.04 (autotools), os: ubuntu-20.04, shell: sh, autotools: true }
|
||||||
- { name: Ubuntu 22.04 (CMake), os: ubuntu-22.04, shell: sh }
|
- { name: Intel oneAPI (Ubuntu 20.04), os: ubuntu-20.04, shell: bash, artifact: 'SDL-ubuntu20.04-oneapi', intel: true,
|
||||||
- { name: Ubuntu 22.04 (autotools), os: ubuntu-22.04, shell: sh, autotools: true }
|
source_cmd: 'source /opt/intel/oneapi/setvars.sh; export CC=icx; export CXX=icx;'}
|
||||||
- { name: MacOS (CMake), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"' }
|
- { name: Intel Compiler (Ubuntu 20.04), os: ubuntu-20.04, shell: bash, artifact: 'SDL-ubuntu20.04-icc', intel: true, cmake: '-DSDL_CLANG_TIDY=OFF',
|
||||||
- { name: MacOS (autotools), os: macos-latest, shell: sh, autotools: true }
|
source_cmd: 'source /opt/intel/oneapi/setvars.sh; export CC=icc; export CXX=icpc; export CFLAGS=-diag-disable=10441; export CXXFLAGS=-diag-disable=10441; '}
|
||||||
|
|
||||||
|
- { name: Ubuntu 22.04 (CMake), os: ubuntu-22.04, shell: sh }
|
||||||
|
- { name: Ubuntu 22.04 (autotools), os: ubuntu-22.04, shell: sh, autotools: true }
|
||||||
|
- { name: MacOS (CMake), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"' }
|
||||||
|
- { name: MacOS (autotools), os: macos-latest, shell: sh, autotools: true }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up MSYS2
|
- name: Set up MSYS2
|
||||||
@@ -59,8 +64,27 @@ jobs:
|
|||||||
if: runner.os == 'macOS'
|
if: runner.os == 'macOS'
|
||||||
run: |
|
run: |
|
||||||
brew install \
|
brew install \
|
||||||
ninja
|
autoconf \
|
||||||
- uses: actions/checkout@v3
|
ninja \
|
||||||
|
pkg-config
|
||||||
|
|
||||||
|
- name: Setup Intel oneAPI
|
||||||
|
if: matrix.platform.intel
|
||||||
|
run: |
|
||||||
|
# Download the key to system keyring
|
||||||
|
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
|
||||||
|
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
|
||||||
|
|
||||||
|
# Add signed entry to apt sources and configure the APT client to use Intel repository:
|
||||||
|
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
|
||||||
|
|
||||||
|
# Update package list
|
||||||
|
sudo apt-get update -y
|
||||||
|
|
||||||
|
# Install oneAPI
|
||||||
|
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
- name: Check that versioning is consistent
|
- name: Check that versioning is consistent
|
||||||
# We only need to run this once: arbitrarily use the Linux/CMake build
|
# We only need to run this once: arbitrarily use the Linux/CMake build
|
||||||
if: "runner.os == 'Linux' && ! matrix.platform.autotools"
|
if: "runner.os == 'Linux' && ! matrix.platform.autotools"
|
||||||
@@ -68,6 +92,7 @@ jobs:
|
|||||||
- name: Configure (CMake)
|
- name: Configure (CMake)
|
||||||
if: "! matrix.platform.autotools"
|
if: "! matrix.platform.autotools"
|
||||||
run: |
|
run: |
|
||||||
|
${{ matrix.platform.source_cmd }}
|
||||||
cmake -S . -B build -G Ninja \
|
cmake -S . -B build -G Ninja \
|
||||||
-DSDL_TESTS=ON \
|
-DSDL_TESTS=ON \
|
||||||
-DSDL_WERROR=ON \
|
-DSDL_WERROR=ON \
|
||||||
@@ -79,13 +104,15 @@ jobs:
|
|||||||
- name: Build (CMake)
|
- name: Build (CMake)
|
||||||
if: "! matrix.platform.autotools"
|
if: "! matrix.platform.autotools"
|
||||||
run: |
|
run: |
|
||||||
|
${{ matrix.platform.source_cmd }}
|
||||||
cmake --build build/ --config Release --verbose --parallel
|
cmake --build build/ --config Release --verbose --parallel
|
||||||
- name: Run build-time tests (CMake)
|
- name: Run build-time tests (CMake)
|
||||||
if: "! matrix.platform.autotools"
|
if: "! matrix.platform.autotools"
|
||||||
run: |
|
run: |
|
||||||
|
${{ matrix.platform.source_cmd }}
|
||||||
set -eu
|
set -eu
|
||||||
export SDL_TESTS_QUICK=1
|
export SDL_TESTS_QUICK=1
|
||||||
ctest -VV --test-dir build/
|
ctest -VV --test-dir build/ -j2
|
||||||
if test "${{ runner.os }}" = "Linux"; then
|
if test "${{ runner.os }}" = "Linux"; then
|
||||||
# This should show us the SDL_REVISION
|
# This should show us the SDL_REVISION
|
||||||
strings build/libSDL2-2.0.so.0 | grep SDL-
|
strings build/libSDL2-2.0.so.0 | grep SDL-
|
||||||
@@ -100,6 +127,7 @@ jobs:
|
|||||||
- name: Configure (Autotools)
|
- name: Configure (Autotools)
|
||||||
if: matrix.platform.autotools
|
if: matrix.platform.autotools
|
||||||
run: |
|
run: |
|
||||||
|
${{ matrix.platform.source_cmd }}
|
||||||
set -eu
|
set -eu
|
||||||
rm -fr build-autotools
|
rm -fr build-autotools
|
||||||
mkdir build-autotools
|
mkdir build-autotools
|
||||||
@@ -131,6 +159,7 @@ jobs:
|
|||||||
- name: Build (Autotools)
|
- name: Build (Autotools)
|
||||||
if: matrix.platform.autotools
|
if: matrix.platform.autotools
|
||||||
run: |
|
run: |
|
||||||
|
${{ matrix.platform.source_cmd }}
|
||||||
set -eu
|
set -eu
|
||||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||||
make -j"${parallel}" -C build-autotools V=1
|
make -j"${parallel}" -C build-autotools V=1
|
||||||
@@ -140,6 +169,7 @@ jobs:
|
|||||||
- name: Run build-time tests (Autotools)
|
- name: Run build-time tests (Autotools)
|
||||||
if: ${{ matrix.platform.autotools && (runner.os != 'macOS') }}
|
if: ${{ matrix.platform.autotools && (runner.os != 'macOS') }}
|
||||||
run: |
|
run: |
|
||||||
|
${{ matrix.platform.source_cmd }}
|
||||||
set -eu
|
set -eu
|
||||||
curdir="$(pwd)"
|
curdir="$(pwd)"
|
||||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||||
@@ -152,6 +182,7 @@ jobs:
|
|||||||
- name: Install (Autotools)
|
- name: Install (Autotools)
|
||||||
if: matrix.platform.autotools
|
if: matrix.platform.autotools
|
||||||
run: |
|
run: |
|
||||||
|
${{ matrix.platform.source_cmd }}
|
||||||
set -eu
|
set -eu
|
||||||
curdir="$(pwd)"
|
curdir="$(pwd)"
|
||||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||||
@@ -163,16 +194,19 @@ jobs:
|
|||||||
echo "SDL2_DIR=$(pwd)/autotools_prefix" >> $GITHUB_ENV
|
echo "SDL2_DIR=$(pwd)/autotools_prefix" >> $GITHUB_ENV
|
||||||
- name: Verify CMake configuration files
|
- name: Verify CMake configuration files
|
||||||
run: |
|
run: |
|
||||||
|
${{ matrix.platform.source_cmd }}
|
||||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
|
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
|
||||||
cmake --build cmake_config_build --verbose
|
cmake --build cmake_config_build --verbose
|
||||||
- name: Verify sdl2-config
|
- name: Verify sdl2-config
|
||||||
run: |
|
run: |
|
||||||
|
${{ matrix.platform.source_cmd }}
|
||||||
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
|
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
|
||||||
cmake/test/test_sdlconfig.sh
|
cmake/test/test_sdlconfig.sh
|
||||||
- name: Verify sdl2.pc
|
- name: Verify sdl2.pc
|
||||||
run: |
|
run: |
|
||||||
|
${{ matrix.platform.source_cmd }}
|
||||||
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
|
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
|
||||||
cmake/test/test_pkgconfig.sh
|
cmake/test/test_pkgconfig.sh
|
||||||
- name: Distcheck (Autotools)
|
- name: Distcheck (Autotools)
|
||||||
@@ -190,6 +224,7 @@ jobs:
|
|||||||
- name: Run installed-tests (Autotools)
|
- name: Run installed-tests (Autotools)
|
||||||
if: "runner.os == 'Linux' && matrix.platform.autotools"
|
if: "runner.os == 'Linux' && matrix.platform.autotools"
|
||||||
run: |
|
run: |
|
||||||
|
${{ matrix.platform.source_cmd }}
|
||||||
set -eu
|
set -eu
|
||||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||||
sudo make -j"${parallel}" -C build-autotools install
|
sudo make -j"${parallel}" -C build-autotools install
|
||||||
|
14
.github/workflows/msvc.yml
vendored
14
.github/workflows/msvc.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0' }
|
project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0' }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Create CMake project using SDL as a subproject
|
- name: Create CMake project using SDL as a subproject
|
||||||
shell: python
|
shell: python
|
||||||
run: |
|
run: |
|
||||||
@@ -34,8 +34,14 @@ jobs:
|
|||||||
os.makedirs(builddir)
|
os.makedirs(builddir)
|
||||||
with open(f"{ builddir }/CMakeLists.txt", "w") as f:
|
with open(f"{ builddir }/CMakeLists.txt", "w") as f:
|
||||||
f.write(textwrap.dedent(f"""\
|
f.write(textwrap.dedent(f"""\
|
||||||
cmake_minimum_required(VERSION 3.0)
|
# Always build .PDB symbol file
|
||||||
|
set(CMAKE_POLICY_DEFAULT_CMP0141 "NEW" CACHE STRING "MSVC debug information format flags are selected by an abstraction")
|
||||||
|
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "ProgramDatabase" CACHE STRING "MSVC debug information format")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "-DEBUG" CACHE STRING "Linker flags for executables")
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "-DEBUG" CACHE STRING "Linker flag for shared libraries")
|
||||||
|
cmake_minimum_required(VERSION 3.0...3.25)
|
||||||
project(sdl_user)
|
project(sdl_user)
|
||||||
|
enable_testing()
|
||||||
add_subdirectory("{ srcdir }" SDL)
|
add_subdirectory("{ srcdir }" SDL)
|
||||||
"""))
|
"""))
|
||||||
- name: Configure (CMake)
|
- name: Configure (CMake)
|
||||||
@@ -53,7 +59,7 @@ jobs:
|
|||||||
if: "! contains(matrix.platform.name, 'ARM')"
|
if: "! contains(matrix.platform.name, 'ARM')"
|
||||||
run: |
|
run: |
|
||||||
$env:SDL_TESTS_QUICK=1
|
$env:SDL_TESTS_QUICK=1
|
||||||
ctest -VV --test-dir build/ -C Release
|
ctest -VV --test-dir build/ -C Release -j2
|
||||||
- name: Install (CMake)
|
- name: Install (CMake)
|
||||||
run: |
|
run: |
|
||||||
echo "SDL2_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV
|
echo "SDL2_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV
|
||||||
@@ -68,7 +74,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Add msbuild to PATH
|
- name: Add msbuild to PATH
|
||||||
if: ${{ matrix.platform.project != '' }}
|
if: ${{ matrix.platform.project != '' }}
|
||||||
uses: microsoft/setup-msbuild@v1.1.3
|
uses: microsoft/setup-msbuild@v2
|
||||||
- name: Build msbuild
|
- name: Build msbuild
|
||||||
if: ${{ matrix.platform.project != '' }}
|
if: ${{ matrix.platform.project != '' }}
|
||||||
run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}
|
run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}
|
||||||
|
19
.github/workflows/n3ds.yml
vendored
19
.github/workflows/n3ds.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
|||||||
container:
|
container:
|
||||||
image: devkitpro/devkitarm:latest
|
image: devkitpro/devkitarm:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Install build requirements
|
- name: Install build requirements
|
||||||
run: |
|
run: |
|
||||||
apt update
|
apt update
|
||||||
@@ -38,5 +38,18 @@ jobs:
|
|||||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
|
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
|
||||||
-DCMAKE_BUILD_TYPE=Release
|
-DCMAKE_BUILD_TYPE=Release
|
||||||
cmake --build cmake_config_build --verbose
|
cmake --build cmake_config_build --verbose
|
||||||
# Not running test_pkgconfig.sh and test_sdlconfig.sh
|
- name: Extract CC/CXX/CFLAGS/CXXFLAGS from CMake toolchain
|
||||||
# as invoking the compiler manually is not supported
|
run: |
|
||||||
|
cmake -S .github/cmake -B /tmp/cmake_extract \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DVAR_PATH=/tmp/n3ds_env.txt
|
||||||
|
cat /tmp/n3ds_env.txt >> $GITHUB_ENV
|
||||||
|
- name: Verify sdl2-config
|
||||||
|
run: |
|
||||||
|
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
|
||||||
|
cmake/test/test_sdlconfig.sh
|
||||||
|
- name: Verify sdl2.pc
|
||||||
|
run: |
|
||||||
|
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
|
||||||
|
cmake/test/test_pkgconfig.sh
|
||||||
|
6
.github/workflows/ps2.yaml
vendored
6
.github/workflows/ps2.yaml
vendored
@@ -7,7 +7,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ps2dev/ps2dev:latest
|
container: ps2dev/ps2dev:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Setup dependencies
|
- name: Setup dependencies
|
||||||
run: |
|
run: |
|
||||||
apk update
|
apk update
|
||||||
@@ -50,13 +50,13 @@ jobs:
|
|||||||
- name: Verify sdl2-config
|
- name: Verify sdl2-config
|
||||||
run: |
|
run: |
|
||||||
export CC=mips64r5900el-ps2-elf-gcc
|
export CC=mips64r5900el-ps2-elf-gcc
|
||||||
|
export LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
|
||||||
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
|
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
|
||||||
export EXTRA_LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
|
|
||||||
cmake/test/test_sdlconfig.sh
|
cmake/test/test_sdlconfig.sh
|
||||||
- name: Verify sdl2.pc
|
- name: Verify sdl2.pc
|
||||||
run: |
|
run: |
|
||||||
export CC=mips64r5900el-ps2-elf-gcc
|
export CC=mips64r5900el-ps2-elf-gcc
|
||||||
export EXTRA_LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
|
export LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
|
||||||
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
|
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
|
||||||
cmake/test/test_pkgconfig.sh
|
cmake/test/test_pkgconfig.sh
|
||||||
|
|
||||||
|
6
.github/workflows/psp.yaml
vendored
6
.github/workflows/psp.yaml
vendored
@@ -7,7 +7,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: pspdev/pspdev:latest
|
container: pspdev/pspdev:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Setup dependencies
|
- name: Setup dependencies
|
||||||
run: |
|
run: |
|
||||||
apk update
|
apk update
|
||||||
@@ -39,12 +39,12 @@ jobs:
|
|||||||
- name: Verify sdl2-config
|
- name: Verify sdl2-config
|
||||||
run: |
|
run: |
|
||||||
export CC=psp-gcc
|
export CC=psp-gcc
|
||||||
|
export LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
|
||||||
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
|
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
|
||||||
export EXTRA_LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
|
|
||||||
cmake/test/test_sdlconfig.sh
|
cmake/test/test_sdlconfig.sh
|
||||||
- name: Verify sdl2.pc
|
- name: Verify sdl2.pc
|
||||||
run: |
|
run: |
|
||||||
export CC=psp-gcc
|
export CC=psp-gcc
|
||||||
|
export LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
|
||||||
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
|
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
|
||||||
export EXTRA_LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
|
|
||||||
cmake/test/test_pkgconfig.sh
|
cmake/test/test_pkgconfig.sh
|
||||||
|
2
.github/workflows/riscos.yml
vendored
2
.github/workflows/riscos.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Setup dependencies
|
- name: Setup dependencies
|
||||||
run: apt-get update && apt-get install -y cmake ninja-build
|
run: apt-get update && apt-get install -y cmake ninja-build
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Configure (autotools)
|
- name: Configure (autotools)
|
||||||
if: ${{ contains(matrix.platform.name, 'autotools') }}
|
if: ${{ contains(matrix.platform.name, 'autotools') }}
|
||||||
run: |
|
run: |
|
||||||
|
44
.github/workflows/vita.yaml
vendored
44
.github/workflows/vita.yaml
vendored
@@ -8,19 +8,61 @@ defaults:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
vita:
|
vita:
|
||||||
|
name: ${{ matrix.platform.name }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: vitasdk/vitasdk:latest
|
image: vitasdk/vitasdk:latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform:
|
||||||
|
- { name: GLES (pib), os: windows-latest, pib: true }
|
||||||
|
- { name: GLES (PVR_PSP2 + gl4es4vita), os: windows-latest, pvr: true }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Install build requirements
|
- name: Install build requirements
|
||||||
run: |
|
run: |
|
||||||
apk update
|
apk update
|
||||||
apk add cmake ninja pkgconf bash
|
apk add cmake ninja pkgconf bash
|
||||||
|
|
||||||
|
- name: Configure PVR_PSP2 (GLES)
|
||||||
|
if: ${{ !!matrix.platform.pvr }}
|
||||||
|
run: |
|
||||||
|
pvr_psp2_version=3.9
|
||||||
|
|
||||||
|
# Configure PVR_PSP2 headers
|
||||||
|
wget https://github.com/GrapheneCt/PVR_PSP2/archive/refs/tags/v$pvr_psp2_version.zip -P/tmp
|
||||||
|
unzip /tmp/v$pvr_psp2_version.zip -d/tmp
|
||||||
|
cp -r /tmp/PVR_PSP2-$pvr_psp2_version/include/* ${VITASDK}/arm-vita-eabi/include
|
||||||
|
rm /tmp/v$pvr_psp2_version.zip
|
||||||
|
|
||||||
|
# Configure PVR_PSP2 stub libraries
|
||||||
|
wget https://github.com/GrapheneCt/PVR_PSP2/releases/download/v$pvr_psp2_version/vitasdk_stubs.zip -P/tmp
|
||||||
|
unzip /tmp/vitasdk_stubs.zip -d/tmp/pvr_psp2_stubs
|
||||||
|
find /tmp/pvr_psp2_stubs -type f -name "*.a" -exec cp {} ${VITASDK}/arm-vita-eabi/lib \;
|
||||||
|
rm /tmp/vitasdk_stubs.zip
|
||||||
|
rm -rf /tmp/pvr_psp2_stubs
|
||||||
|
|
||||||
|
- name: Configure gl4es4vita (OpenGL)
|
||||||
|
if: ${{ !!matrix.platform.pvr }}
|
||||||
|
run: |
|
||||||
|
gl4es4vita_version=1.1.4
|
||||||
|
|
||||||
|
# Configure gl4es4vita headers
|
||||||
|
wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/include.zip -P/tmp
|
||||||
|
unzip -o /tmp/include.zip -d${VITASDK}/arm-vita-eabi/include
|
||||||
|
rm /tmp/include.zip
|
||||||
|
|
||||||
|
# Configure gl4es4vita stub libraries
|
||||||
|
wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/vitasdk_stubs.zip -P/tmp
|
||||||
|
unzip /tmp/vitasdk_stubs.zip -d${VITASDK}/arm-vita-eabi/lib
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B build -G Ninja \
|
cmake -S . -B build -G Ninja \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
|
-DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
|
||||||
|
-DVIDEO_VITA_PIB=${{ !!matrix.platform.pib }} \
|
||||||
|
-DVIDEO_VITA_PVR=${{ !!matrix.platform.pvr }} \
|
||||||
-DSDL_WERROR=ON \
|
-DSDL_WERROR=ON \
|
||||||
-DSDL_TESTS=ON \
|
-DSDL_TESTS=ON \
|
||||||
-DSDL_INSTALL_TESTS=ON \
|
-DSDL_INSTALL_TESTS=ON \
|
||||||
|
2
.github/workflows/watcom.yml
vendored
2
.github/workflows/watcom.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
- { name: OS/2, makefile: Makefile.os2 }
|
- { name: OS/2, makefile: Makefile.os2 }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: open-watcom/setup-watcom@v0
|
- uses: open-watcom/setup-watcom@v0
|
||||||
- name: Build SDL2
|
- name: Build SDL2
|
||||||
run: |
|
run: |
|
||||||
|
7
.gitignore
vendored
7
.gitignore
vendored
@@ -62,6 +62,11 @@ cmake-build-*
|
|||||||
xcuserdata
|
xcuserdata
|
||||||
*.xcworkspace
|
*.xcworkspace
|
||||||
|
|
||||||
|
# for QtCreator
|
||||||
|
CMakeLists.txt.user
|
||||||
|
build*/
|
||||||
|
*.pro.user*
|
||||||
|
|
||||||
# for Visual C++
|
# for Visual C++
|
||||||
.vs
|
.vs
|
||||||
Debug
|
Debug
|
||||||
@@ -98,6 +103,7 @@ VisualC/visualtest/testsprite2_sample.actions
|
|||||||
VisualC/visualtest/testsprite2_sample.config
|
VisualC/visualtest/testsprite2_sample.config
|
||||||
VisualC/visualtest/testsprite2_sample.parameters
|
VisualC/visualtest/testsprite2_sample.parameters
|
||||||
VisualC-GDK/**/Layout
|
VisualC-GDK/**/Layout
|
||||||
|
VisualC-GDK/shaders/*.h
|
||||||
|
|
||||||
# for Android
|
# for Android
|
||||||
android-project/local.properties
|
android-project/local.properties
|
||||||
@@ -173,6 +179,7 @@ test/testyuv
|
|||||||
test/torturethread
|
test/torturethread
|
||||||
|
|
||||||
builddir/
|
builddir/
|
||||||
|
!build-scripts/
|
||||||
debian/*.debhelper.log
|
debian/*.debhelper.log
|
||||||
debian/*.substvars
|
debian/*.substvars
|
||||||
debian/*.tar.gz
|
debian/*.tar.gz
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
projectfullname = SDL_mixer
|
projectfullname = SDL2
|
||||||
projectshortname = SDL_mixer
|
projectshortname = SDL2
|
||||||
incsubdir = include
|
incsubdir = include
|
||||||
wikisubdir =
|
wikisubdir = SDL2
|
||||||
|
readmesubdir = docs
|
||||||
apiprefixregex = (SDL_|SDLK_|KMOD_|AUDIO_)
|
apiprefixregex = (SDL_|SDLK_|KMOD_|AUDIO_)
|
||||||
mainincludefname = SDL.h
|
mainincludefname = SDL.h
|
||||||
versionfname = include/SDL_version.h
|
versionfname = include/SDL_version.h
|
||||||
@@ -10,6 +11,7 @@ versionminorregex = \A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z
|
|||||||
versionpatchregex = \A\#define\s+SDL_PATCHLEVEL\s+(\d+)\Z
|
versionpatchregex = \A\#define\s+SDL_PATCHLEVEL\s+(\d+)\Z
|
||||||
selectheaderregex = \ASDL.*?\.h\Z
|
selectheaderregex = \ASDL.*?\.h\Z
|
||||||
projecturl = https://libsdl.org/
|
projecturl = https://libsdl.org/
|
||||||
wikiurl = https://wiki.libsdl.org
|
wikiurl = https://wiki.libsdl.org/SDL2
|
||||||
bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new
|
bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new
|
||||||
warn_about_missing = 0
|
warn_about_missing = 0
|
||||||
|
wikipreamble = (This is the legacy documentation for stable SDL2, the current stable version; [SDL3](https://wiki.libsdl.org/SDL3/) is the current development version.)
|
||||||
|
@@ -12,7 +12,7 @@ LOCAL_MODULE := SDL2
|
|||||||
|
|
||||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
|
||||||
|
|
||||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)/include
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
$(subst $(LOCAL_PATH)/,, \
|
$(subst $(LOCAL_PATH)/,, \
|
||||||
@@ -63,7 +63,6 @@ LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
|
|||||||
LOCAL_CFLAGS += \
|
LOCAL_CFLAGS += \
|
||||||
-Wall -Wextra \
|
-Wall -Wextra \
|
||||||
-Wdocumentation \
|
-Wdocumentation \
|
||||||
-Wdocumentation-unknown-command \
|
|
||||||
-Wmissing-prototypes \
|
-Wmissing-prototypes \
|
||||||
-Wunreachable-code-break \
|
-Wunreachable-code-break \
|
||||||
-Wunneeded-internal-declaration \
|
-Wunneeded-internal-declaration \
|
||||||
@@ -78,6 +77,8 @@ LOCAL_CFLAGS += \
|
|||||||
# Warnings we haven't fixed (yet)
|
# Warnings we haven't fixed (yet)
|
||||||
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
|
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
|
||||||
|
|
||||||
|
LOCAL_CXXFLAGS += -std=gnu++11
|
||||||
|
|
||||||
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
|
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
|
||||||
|
|
||||||
LOCAL_LDFLAGS := -Wl,--no-undefined
|
LOCAL_LDFLAGS := -Wl,--no-undefined
|
||||||
|
602
CMakeLists.txt
602
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2024 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
|
||||||
|
@@ -27,6 +27,7 @@ LDFLAGS = @BUILD_LDFLAGS@
|
|||||||
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
|
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
|
FGREP = @FGREP@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
RC = @RC@
|
RC = @RC@
|
||||||
@@ -51,7 +52,7 @@ WAYLAND_SCANNER_CODE_MODE = @WAYLAND_SCANNER_CODE_MODE@
|
|||||||
|
|
||||||
INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
|
INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
|
||||||
|
|
||||||
SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* mingw sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake.in src test VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
|
SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* mingw sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake.in src test VisualC VisualC-GDK VisualC-WinRT Xcode Xcode-iOS wayland-protocols
|
||||||
GEN_DIST = SDL2.spec
|
GEN_DIST = SDL2.spec
|
||||||
|
|
||||||
ifneq ($V,1)
|
ifneq ($V,1)
|
||||||
@@ -130,7 +131,7 @@ HDRS = \
|
|||||||
begin_code.h \
|
begin_code.h \
|
||||||
close_code.h
|
close_code.h
|
||||||
|
|
||||||
SDLTEST_HDRS = $(shell ls $(srcdir)/include | fgrep SDL_test)
|
SDLTEST_HDRS = $(shell ls $(srcdir)/include | $(FGREP) SDL_test)
|
||||||
|
|
||||||
LT_AGE = @LT_AGE@
|
LT_AGE = @LT_AGE@
|
||||||
LT_CURRENT = @LT_CURRENT@
|
LT_CURRENT = @LT_CURRENT@
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# Makefile to build the SDL library
|
# Makefile to build the SDL library
|
||||||
|
|
||||||
INCLUDE = -I./include
|
CPPFLAGS = -I./include
|
||||||
CFLAGS = -g -O2 $(INCLUDE)
|
CFLAGS = -g -O2
|
||||||
AR = ar
|
AR = ar
|
||||||
RANLIB = ranlib
|
RANLIB = ranlib
|
||||||
|
|
||||||
|
14
Makefile.os2
14
Makefile.os2
@@ -1,4 +1,4 @@
|
|||||||
# Open Watcom makefile to build SDL2.dll for OS/2
|
# Open Watcom makefile to build SDL2.dll for OS/2:
|
||||||
# wmake -f Makefile.os2
|
# wmake -f Makefile.os2
|
||||||
#
|
#
|
||||||
# If you have GNU libiconv installed (iconv2.dll), you
|
# If you have GNU libiconv installed (iconv2.dll), you
|
||||||
@@ -14,8 +14,8 @@
|
|||||||
|
|
||||||
LIBNAME = SDL2
|
LIBNAME = SDL2
|
||||||
MAJOR_VERSION = 2
|
MAJOR_VERSION = 2
|
||||||
MINOR_VERSION = 26
|
MINOR_VERSION = 30
|
||||||
MICRO_VERSION = 0
|
MICRO_VERSION = 4
|
||||||
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
||||||
DESCRIPTION = Simple DirectMedia Layer 2
|
DESCRIPTION = Simple DirectMedia Layer 2
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ CFLAGS_DLL+= -bd
|
|||||||
# iconv:
|
# iconv:
|
||||||
LIBICONV_LIB=iconv2.lib
|
LIBICONV_LIB=iconv2.lib
|
||||||
!ifeq LIBICONV 1
|
!ifeq LIBICONV 1
|
||||||
CFLAGS_DLL+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1
|
CFLAGS_DLL+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DSDL_USE_LIBICONV
|
||||||
LIBS+= $(ICONVLIB)
|
LIBS+= $(ICONVLIB)
|
||||||
!else
|
!else
|
||||||
LIBS+= libuls.lib libconv.lib
|
LIBS+= libuls.lib libconv.lib
|
||||||
@@ -81,7 +81,7 @@ SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
|
|||||||
SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
|
SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
|
||||||
SDL_sensor.c SDL_touch.c
|
SDL_sensor.c SDL_touch.c
|
||||||
SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c controller_type.c
|
SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c controller_type.c
|
||||||
SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
|
SRCS+= SDL_render.c yuv_rgb_sse.c yuv_rgb_std.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
|
||||||
SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
|
SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
|
||||||
SDL_render_sw.c SDL_rotate.c SDL_triangle.c
|
SDL_render_sw.c SDL_rotate.c SDL_triangle.c
|
||||||
SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
|
SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
|
||||||
@@ -94,7 +94,7 @@ SRCS+= SDL_systimer.c
|
|||||||
SRCS+= SDL_sysloadso.c
|
SRCS+= SDL_sysloadso.c
|
||||||
SRCS+= SDL_sysfilesystem.c
|
SRCS+= SDL_sysfilesystem.c
|
||||||
SRCS+= SDL_os2joystick.c SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
|
SRCS+= SDL_os2joystick.c SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
|
||||||
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c
|
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c SDL_hidapi_steamdeck.c SDL_steam_virtual_gamepad.c
|
||||||
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
|
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
|
||||||
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
|
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
|
||||||
SRCS+= SDL_dummysensor.c
|
SRCS+= SDL_dummysensor.c
|
||||||
@@ -152,6 +152,8 @@ SDL_blendpoint.obj: SDL_blendpoint.c
|
|||||||
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
|
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
|
||||||
SDL_RLEaccel.obj: SDL_RLEaccel.c
|
SDL_RLEaccel.obj: SDL_RLEaccel.c
|
||||||
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
|
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
|
||||||
|
yuv_rgb_sse.obj: yuv_rgb_sse.c
|
||||||
|
wcc386 $(CFLAGS_DLL) -wcd=202 -fo=$^@ $<
|
||||||
!ifeq HIDAPI 1
|
!ifeq HIDAPI 1
|
||||||
# c99 mode needed because of structs with flexible array members in libusb.h
|
# c99 mode needed because of structs with flexible array members in libusb.h
|
||||||
SDL_hidapi.obj: SDL_hidapi.c
|
SDL_hidapi.obj: SDL_hidapi.c
|
||||||
|
15
Makefile.w32
15
Makefile.w32
@@ -1,12 +1,12 @@
|
|||||||
# Open Watcom makefile to build SDL2.dll for Win32
|
# Open Watcom makefile to build SDL2.dll for Win32:
|
||||||
# wmake -f Makefile.w32
|
# wmake -f Makefile.w32
|
||||||
#
|
#
|
||||||
# To error out upon warnings: wmake -f Makefile.w32 ENABLE_WERROR=1
|
# To error out upon warnings: wmake -f Makefile.w32 ENABLE_WERROR=1
|
||||||
|
|
||||||
LIBNAME = SDL2
|
LIBNAME = SDL2
|
||||||
MAJOR_VERSION = 2
|
MAJOR_VERSION = 2
|
||||||
MINOR_VERSION = 26
|
MINOR_VERSION = 30
|
||||||
MICRO_VERSION = 0
|
MICRO_VERSION = 4
|
||||||
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
||||||
|
|
||||||
LIBHOME = .
|
LIBHOME = .
|
||||||
@@ -60,7 +60,7 @@ SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
|
|||||||
SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
|
SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
|
||||||
SDL_sensor.c SDL_touch.c
|
SDL_sensor.c SDL_touch.c
|
||||||
SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c controller_type.c
|
SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c controller_type.c
|
||||||
SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
|
SRCS+= SDL_render.c yuv_rgb_sse.c yuv_rgb_std.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
|
||||||
SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
|
SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
|
||||||
SDL_render_sw.c SDL_rotate.c SDL_triangle.c
|
SDL_render_sw.c SDL_rotate.c SDL_triangle.c
|
||||||
SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
|
SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
|
||||||
@@ -73,7 +73,7 @@ SRCS+= SDL_systimer.c
|
|||||||
SRCS+= SDL_sysloadso.c
|
SRCS+= SDL_sysloadso.c
|
||||||
SRCS+= SDL_sysfilesystem.c
|
SRCS+= SDL_sysfilesystem.c
|
||||||
SRCS+= SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
|
SRCS+= SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
|
||||||
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c
|
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c SDL_hidapi_steamdeck.c
|
||||||
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
|
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
|
||||||
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
|
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
|
||||||
SRCS+= SDL_dummysensor.c
|
SRCS+= SDL_dummysensor.c
|
||||||
@@ -93,7 +93,7 @@ SRCS+= SDL_render_gl.c SDL_shaders_gl.c
|
|||||||
SRCS+= SDL_render_gles2.c SDL_shaders_gles2.c
|
SRCS+= SDL_render_gles2.c SDL_shaders_gles2.c
|
||||||
SRCS+= SDL_windowssensor.c
|
SRCS+= SDL_windowssensor.c
|
||||||
SRCS+= SDL_syscond_cv.c
|
SRCS+= SDL_syscond_cv.c
|
||||||
SRCS+= SDL_windowsclipboard.c SDL_windowsevents.c SDL_windowsframebuffer.c SDL_windowskeyboard.c SDL_windowsmessagebox.c SDL_windowsmodes.c SDL_windowsmouse.c SDL_windowsopengl.c SDL_windowsopengles.c SDL_windowsshape.c SDL_windowsvideo.c SDL_windowsvulkan.c SDL_windowswindow.c
|
SRCS+= SDL_windowsclipboard.c SDL_windowsevents.c SDL_windowsframebuffer.c SDL_windowskeyboard.c SDL_windowsmessagebox.c SDL_windowsmodes.c SDL_windowsmouse.c SDL_windowsopengl.c SDL_windowsopengles.c SDL_windowsshape.c SDL_windowsvideo.c SDL_windowsvulkan.c SDL_windowswindow.c SDL_steam_virtual_gamepad.c
|
||||||
|
|
||||||
SRCS+= SDL_dynapi.c
|
SRCS+= SDL_dynapi.c
|
||||||
|
|
||||||
@@ -147,6 +147,9 @@ SDL_RLEaccel.obj: SDL_RLEaccel.c
|
|||||||
SDL_malloc.obj: SDL_malloc.c
|
SDL_malloc.obj: SDL_malloc.c
|
||||||
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
|
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
|
||||||
|
|
||||||
|
yuv_rgb_sse.obj: yuv_rgb_sse.c
|
||||||
|
wcc386 $(CFLAGS_DLL) -wcd=202 -fo=$^@ $<
|
||||||
|
|
||||||
# SDL2libm
|
# SDL2libm
|
||||||
MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.c &
|
MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.c &
|
||||||
k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
|
k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
|
||||||
|
@@ -30,6 +30,18 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake")
|
|||||||
set(SDL2_SDL2test_FOUND TRUE)
|
set(SDL2_SDL2test_FOUND TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/sdlfind.cmake")
|
||||||
|
|
||||||
|
set(SDL_ALSA @SDL_ALSA@)
|
||||||
|
set(SDL_ALSA_SHARED @SDL_ALSA_SHARED@)
|
||||||
|
if(SDL_ALSA AND NOT SDL_ALSA_SHARED AND TARGET SDL2::SDL2-static)
|
||||||
|
sdlFindALSA()
|
||||||
|
endif()
|
||||||
|
unset(SDL_ALSA)
|
||||||
|
unset(SDL_ALSA_SHARED)
|
||||||
|
|
||||||
|
|
||||||
check_required_components(SDL2)
|
check_required_components(SDL2)
|
||||||
|
|
||||||
# Create SDL2::SDL2 alias for static-only builds
|
# Create SDL2::SDL2 alias for static-only builds
|
||||||
@@ -62,4 +74,4 @@ if(TARGET SDL2::SDL2main)
|
|||||||
list(INSERT SDL2_STATIC_LIBRARIES 0 SDL2::SDL2main)
|
list(INSERT SDL2_STATIC_LIBRARIES 0 SDL2::SDL2main)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(SDL2TEST_LIBRARY SDL2::SDL2test)
|
set(SDL2TEST_LIBRARY SDL2::SDL2test)
|
||||||
|
@@ -173,6 +173,12 @@
|
|||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||||
</Link>
|
</Link>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir)</Command>
|
||||||
|
</PreBuildEvent>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Message>Building shader blobs (Xbox Series)</Message>
|
||||||
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">
|
||||||
<Midl>
|
<Midl>
|
||||||
@@ -201,6 +207,12 @@
|
|||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||||
</Link>
|
</Link>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir) one</Command>
|
||||||
|
</PreBuildEvent>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Message>Building shader blobs (Xbox One)</Message>
|
||||||
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">
|
||||||
<Midl>
|
<Midl>
|
||||||
@@ -259,6 +271,12 @@
|
|||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||||
</Link>
|
</Link>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir)</Command>
|
||||||
|
</PreBuildEvent>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Message>Building shader blobs (Xbox Series)</Message>
|
||||||
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">
|
||||||
<Midl>
|
<Midl>
|
||||||
@@ -288,6 +306,12 @@
|
|||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||||
</Link>
|
</Link>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir) one</Command>
|
||||||
|
</PreBuildEvent>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Message>Building shader blobs (Xbox One)</Message>
|
||||||
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\..\include\begin_code.h" />
|
<ClInclude Include="..\..\include\begin_code.h" />
|
||||||
@@ -412,6 +436,7 @@
|
|||||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||||
|
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\usb_ids.h" />
|
<ClInclude Include="..\..\src\joystick\usb_ids.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||||
@@ -474,7 +499,6 @@
|
|||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_platform.h" />
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_platform.h" />
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_sdk_platform.h" />
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_sdk_platform.h" />
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h" />
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h" />
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp" />
|
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h" />
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h" />
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_beta.h" />
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_beta.h" />
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
|
||||||
@@ -519,7 +543,13 @@
|
|||||||
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
|
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
|
||||||
<ClInclude Include="..\..\src\video\windows\wmmsg.h" />
|
<ClInclude Include="..\..\src\video\windows\wmmsg.h" />
|
||||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
|
||||||
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_common.h" />
|
||||||
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_internal.h" />
|
||||||
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.h" />
|
||||||
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx_func.h" />
|
||||||
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse.h" />
|
||||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
|
||||||
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std.h" />
|
||||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -563,7 +593,7 @@
|
|||||||
<ClCompile Include="..\..\src\events\SDL_touch.c" />
|
<ClCompile Include="..\..\src\events\SDL_touch.c" />
|
||||||
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
|
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
|
||||||
<ClCompile Include="..\..\src\file\SDL_rwops.c" />
|
<ClCompile Include="..\..\src\file\SDL_rwops.c" />
|
||||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c" />
|
<ClCompile Include="..\..\src\filesystem\gdk\SDL_sysfilesystem.cpp" />
|
||||||
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
|
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
|
||||||
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
|
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
|
||||||
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
|
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
|
||||||
@@ -601,6 +631,7 @@
|
|||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_shield.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_shield.c" />
|
||||||
<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_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_wii.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||||
@@ -608,6 +639,7 @@
|
|||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
|
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.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\virtual\SDL_virtualjoystick.c" />
|
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
|
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
|
||||||
@@ -752,7 +784,9 @@
|
|||||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
|
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
|
||||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
|
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
|
||||||
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
|
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
|
||||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb.c" />
|
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.c" />
|
||||||
|
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_sse.c" />
|
||||||
|
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_std.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="..\..\src\main\windows\version.rc" />
|
<ResourceCompile Include="..\..\src\main\windows\version.rc" />
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
<Filter Include="filesystem">
|
<Filter Include="filesystem">
|
||||||
<UniqueIdentifier>{377061e4-3856-4f05-b916-0d3b360df0f6}</UniqueIdentifier>
|
<UniqueIdentifier>{377061e4-3856-4f05-b916-0d3b360df0f6}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="filesystem\windows">
|
<Filter Include="filesystem\gdk">
|
||||||
<UniqueIdentifier>{226a6643-1c65-4c7f-92aa-861313d974bb}</UniqueIdentifier>
|
<UniqueIdentifier>{226a6643-1c65-4c7f-92aa-861313d974bb}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="haptic">
|
<Filter Include="haptic">
|
||||||
@@ -501,6 +501,9 @@
|
|||||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h">
|
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h">
|
||||||
<Filter>joystick</Filter>
|
<Filter>joystick</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h">
|
||||||
|
<Filter>joystick</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h">
|
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h">
|
||||||
<Filter>joystick</Filter>
|
<Filter>joystick</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -777,9 +780,6 @@
|
|||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h">
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h">
|
||||||
<Filter>video\khronos\vulkan</Filter>
|
<Filter>video\khronos\vulkan</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp">
|
|
||||||
<Filter>video\khronos\vulkan</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h">
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h">
|
||||||
<Filter>video\khronos\vulkan</Filter>
|
<Filter>video\khronos\vulkan</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -925,8 +925,8 @@
|
|||||||
<ClCompile Include="..\..\src\file\SDL_rwops.c">
|
<ClCompile Include="..\..\src\file\SDL_rwops.c">
|
||||||
<Filter>file</Filter>
|
<Filter>file</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c">
|
<ClCompile Include="..\..\src\filesystem\gdk\SDL_sysfilesystem.cpp">
|
||||||
<Filter>filesystem\windows</Filter>
|
<Filter>filesystem\gdk</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\haptic\SDL_haptic.c">
|
<ClCompile Include="..\..\src\haptic\SDL_haptic.c">
|
||||||
<Filter>haptic</Filter>
|
<Filter>haptic</Filter>
|
||||||
@@ -943,6 +943,9 @@
|
|||||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c">
|
<ClCompile Include="..\..\src\joystick\SDL_joystick.c">
|
||||||
<Filter>joystick</Filter>
|
<Filter>joystick</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c">
|
||||||
|
<Filter>joystick</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\libm\e_atan2.c">
|
<ClCompile Include="..\..\src\libm\e_atan2.c">
|
||||||
<Filter>libm</Filter>
|
<Filter>libm</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -1081,6 +1084,9 @@
|
|||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c">
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c">
|
||||||
<Filter>joystick\hidapi</Filter>
|
<Filter>joystick\hidapi</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c">
|
||||||
|
<Filter>joystick\hidapi</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c">
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c">
|
||||||
<Filter>joystick\hidapi</Filter>
|
<Filter>joystick\hidapi</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@@ -4,3 +4,4 @@ find . -type f \( -name '*.bmp' -o -name '*.wav' -o -name '*.dat' \) -print -del
|
|||||||
find . -depth -type d \( -name Gaming.Desktop.x64 \) -exec rm -rv {} \;
|
find . -depth -type d \( -name Gaming.Desktop.x64 \) -exec rm -rv {} \;
|
||||||
find . -depth -type d \( -name Gaming.Xbox.Scarlett.x64 \) -exec rm -rv {} \;
|
find . -depth -type d \( -name Gaming.Xbox.Scarlett.x64 \) -exec rm -rv {} \;
|
||||||
find . -depth -type d \( -name Gaming.Xbox.XboxOne.x64 \) -exec rm -rv {} \;
|
find . -depth -type d \( -name Gaming.Xbox.XboxOne.x64 \) -exec rm -rv {} \;
|
||||||
|
rm shaders/*.h
|
||||||
|
19
VisualC-GDK/shaders/D3D12_PixelShader_Colors.hlsl
Normal file
19
VisualC-GDK/shaders/D3D12_PixelShader_Colors.hlsl
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
struct PixelShaderInput
|
||||||
|
{
|
||||||
|
float4 pos : SV_POSITION;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
float4 color : COLOR0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define ColorRS \
|
||||||
|
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||||
|
"DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||||
|
"DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||||
|
"DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||||
|
"RootConstants(num32BitConstants=32, b0)"
|
||||||
|
|
||||||
|
[RootSignature(ColorRS)]
|
||||||
|
float4 main(PixelShaderInput input) : SV_TARGET0
|
||||||
|
{
|
||||||
|
return input.color;
|
||||||
|
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_BT601.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_BT601.hlsl
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
Texture2D theTextureY : register(t0);
|
||||||
|
Texture2D theTextureUV : register(t1);
|
||||||
|
SamplerState theSampler : register(s0);
|
||||||
|
|
||||||
|
struct PixelShaderInput
|
||||||
|
{
|
||||||
|
float4 pos : SV_POSITION;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
float4 color : COLOR0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define NVRS \
|
||||||
|
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||||
|
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||||
|
"RootConstants(num32BitConstants=32, b0),"\
|
||||||
|
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||||
|
|
||||||
|
[RootSignature(NVRS)]
|
||||||
|
float4 main(PixelShaderInput input) : SV_TARGET
|
||||||
|
{
|
||||||
|
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
|
||||||
|
const float3 Rcoeff = {1.1644, 0.0000, 1.5960};
|
||||||
|
const float3 Gcoeff = {1.1644, -0.3918, -0.8130};
|
||||||
|
const float3 Bcoeff = {1.1644, 2.0172, 0.0000};
|
||||||
|
|
||||||
|
float4 Output;
|
||||||
|
|
||||||
|
float3 yuv;
|
||||||
|
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||||
|
yuv.yz = theTextureUV.Sample(theSampler, input.tex).rg;
|
||||||
|
|
||||||
|
yuv += offset;
|
||||||
|
Output.r = dot(yuv, Rcoeff);
|
||||||
|
Output.g = dot(yuv, Gcoeff);
|
||||||
|
Output.b = dot(yuv, Bcoeff);
|
||||||
|
Output.a = 1.0f;
|
||||||
|
|
||||||
|
return Output * input.color;
|
||||||
|
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_BT709.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_BT709.hlsl
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
Texture2D theTextureY : register(t0);
|
||||||
|
Texture2D theTextureUV : register(t1);
|
||||||
|
SamplerState theSampler : register(s0);
|
||||||
|
|
||||||
|
struct PixelShaderInput
|
||||||
|
{
|
||||||
|
float4 pos : SV_POSITION;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
float4 color : COLOR0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define NVRS \
|
||||||
|
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||||
|
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||||
|
"RootConstants(num32BitConstants=32, b0),"\
|
||||||
|
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||||
|
|
||||||
|
[RootSignature(NVRS)]
|
||||||
|
float4 main(PixelShaderInput input) : SV_TARGET
|
||||||
|
{
|
||||||
|
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
|
||||||
|
const float3 Rcoeff = {1.1644, 0.0000, 1.7927};
|
||||||
|
const float3 Gcoeff = {1.1644, -0.2132, -0.5329};
|
||||||
|
const float3 Bcoeff = {1.1644, 2.1124, 0.0000};
|
||||||
|
|
||||||
|
float4 Output;
|
||||||
|
|
||||||
|
float3 yuv;
|
||||||
|
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||||
|
yuv.yz = theTextureUV.Sample(theSampler, input.tex).rg;
|
||||||
|
|
||||||
|
yuv += offset;
|
||||||
|
Output.r = dot(yuv, Rcoeff);
|
||||||
|
Output.g = dot(yuv, Gcoeff);
|
||||||
|
Output.b = dot(yuv, Bcoeff);
|
||||||
|
Output.a = 1.0f;
|
||||||
|
|
||||||
|
return Output * input.color;
|
||||||
|
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_JPEG.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_JPEG.hlsl
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
Texture2D theTextureY : register(t0);
|
||||||
|
Texture2D theTextureUV : register(t1);
|
||||||
|
SamplerState theSampler : register(s0);
|
||||||
|
|
||||||
|
struct PixelShaderInput
|
||||||
|
{
|
||||||
|
float4 pos : SV_POSITION;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
float4 color : COLOR0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define NVRS \
|
||||||
|
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||||
|
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||||
|
"RootConstants(num32BitConstants=32, b0),"\
|
||||||
|
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||||
|
|
||||||
|
[RootSignature(NVRS)]
|
||||||
|
float4 main(PixelShaderInput input) : SV_TARGET
|
||||||
|
{
|
||||||
|
const float3 offset = {0.0, -0.501960814, -0.501960814};
|
||||||
|
const float3 Rcoeff = {1.0000, 0.0000, 1.4020};
|
||||||
|
const float3 Gcoeff = {1.0000, -0.3441, -0.7141};
|
||||||
|
const float3 Bcoeff = {1.0000, 1.7720, 0.0000};
|
||||||
|
|
||||||
|
float4 Output;
|
||||||
|
|
||||||
|
float3 yuv;
|
||||||
|
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||||
|
yuv.yz = theTextureUV.Sample(theSampler, input.tex).rg;
|
||||||
|
|
||||||
|
yuv += offset;
|
||||||
|
Output.r = dot(yuv, Rcoeff);
|
||||||
|
Output.g = dot(yuv, Gcoeff);
|
||||||
|
Output.b = dot(yuv, Bcoeff);
|
||||||
|
Output.a = 1.0f;
|
||||||
|
|
||||||
|
return Output * input.color;
|
||||||
|
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_BT601.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_BT601.hlsl
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
Texture2D theTextureY : register(t0);
|
||||||
|
Texture2D theTextureUV : register(t1);
|
||||||
|
SamplerState theSampler : register(s0);
|
||||||
|
|
||||||
|
struct PixelShaderInput
|
||||||
|
{
|
||||||
|
float4 pos : SV_POSITION;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
float4 color : COLOR0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define NVRS \
|
||||||
|
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||||
|
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||||
|
"RootConstants(num32BitConstants=32, b0),"\
|
||||||
|
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||||
|
|
||||||
|
[RootSignature(NVRS)]
|
||||||
|
float4 main(PixelShaderInput input) : SV_TARGET
|
||||||
|
{
|
||||||
|
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
|
||||||
|
const float3 Rcoeff = {1.1644, 0.0000, 1.5960};
|
||||||
|
const float3 Gcoeff = {1.1644, -0.3918, -0.8130};
|
||||||
|
const float3 Bcoeff = {1.1644, 2.0172, 0.0000};
|
||||||
|
|
||||||
|
float4 Output;
|
||||||
|
|
||||||
|
float3 yuv;
|
||||||
|
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||||
|
yuv.yz = theTextureUV.Sample(theSampler, input.tex).gr;
|
||||||
|
|
||||||
|
yuv += offset;
|
||||||
|
Output.r = dot(yuv, Rcoeff);
|
||||||
|
Output.g = dot(yuv, Gcoeff);
|
||||||
|
Output.b = dot(yuv, Bcoeff);
|
||||||
|
Output.a = 1.0f;
|
||||||
|
|
||||||
|
return Output * input.color;
|
||||||
|
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_BT709.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_BT709.hlsl
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
Texture2D theTextureY : register(t0);
|
||||||
|
Texture2D theTextureUV : register(t1);
|
||||||
|
SamplerState theSampler : register(s0);
|
||||||
|
|
||||||
|
struct PixelShaderInput
|
||||||
|
{
|
||||||
|
float4 pos : SV_POSITION;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
float4 color : COLOR0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define NVRS \
|
||||||
|
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||||
|
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||||
|
"RootConstants(num32BitConstants=32, b0),"\
|
||||||
|
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||||
|
|
||||||
|
[RootSignature(NVRS)]
|
||||||
|
float4 main(PixelShaderInput input) : SV_TARGET
|
||||||
|
{
|
||||||
|
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
|
||||||
|
const float3 Rcoeff = {1.1644, 0.0000, 1.7927};
|
||||||
|
const float3 Gcoeff = {1.1644, -0.2132, -0.5329};
|
||||||
|
const float3 Bcoeff = {1.1644, 2.1124, 0.0000};
|
||||||
|
|
||||||
|
float4 Output;
|
||||||
|
|
||||||
|
float3 yuv;
|
||||||
|
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||||
|
yuv.yz = theTextureUV.Sample(theSampler, input.tex).gr;
|
||||||
|
|
||||||
|
yuv += offset;
|
||||||
|
Output.r = dot(yuv, Rcoeff);
|
||||||
|
Output.g = dot(yuv, Gcoeff);
|
||||||
|
Output.b = dot(yuv, Bcoeff);
|
||||||
|
Output.a = 1.0f;
|
||||||
|
|
||||||
|
return Output * input.color;
|
||||||
|
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_JPEG.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_JPEG.hlsl
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
Texture2D theTextureY : register(t0);
|
||||||
|
Texture2D theTextureUV : register(t1);
|
||||||
|
SamplerState theSampler : register(s0);
|
||||||
|
|
||||||
|
struct PixelShaderInput
|
||||||
|
{
|
||||||
|
float4 pos : SV_POSITION;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
float4 color : COLOR0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define NVRS \
|
||||||
|
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||||
|
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||||
|
"RootConstants(num32BitConstants=32, b0),"\
|
||||||
|
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||||
|
|
||||||
|
[RootSignature(NVRS)]
|
||||||
|
float4 main(PixelShaderInput input) : SV_TARGET
|
||||||
|
{
|
||||||
|
const float3 offset = {0.0, -0.501960814, -0.501960814};
|
||||||
|
const float3 Rcoeff = {1.0000, 0.0000, 1.4020};
|
||||||
|
const float3 Gcoeff = {1.0000, -0.3441, -0.7141};
|
||||||
|
const float3 Bcoeff = {1.0000, 1.7720, 0.0000};
|
||||||
|
|
||||||
|
float4 Output;
|
||||||
|
|
||||||
|
float3 yuv;
|
||||||
|
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||||
|
yuv.yz = theTextureUV.Sample(theSampler, input.tex).gr;
|
||||||
|
|
||||||
|
yuv += offset;
|
||||||
|
Output.r = dot(yuv, Rcoeff);
|
||||||
|
Output.g = dot(yuv, Gcoeff);
|
||||||
|
Output.b = dot(yuv, Bcoeff);
|
||||||
|
Output.a = 1.0f;
|
||||||
|
|
||||||
|
return Output * input.color;
|
||||||
|
}
|
24
VisualC-GDK/shaders/D3D12_PixelShader_Textures.hlsl
Normal file
24
VisualC-GDK/shaders/D3D12_PixelShader_Textures.hlsl
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
Texture2D theTexture : register(t0);
|
||||||
|
SamplerState theSampler : register(s0);
|
||||||
|
|
||||||
|
struct PixelShaderInput
|
||||||
|
{
|
||||||
|
float4 pos : SV_POSITION;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
float4 color : COLOR0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define TextureRS \
|
||||||
|
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||||
|
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||||
|
"RootConstants(num32BitConstants=32, b0),"\
|
||||||
|
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||||
|
|
||||||
|
[RootSignature(TextureRS)]
|
||||||
|
float4 main(PixelShaderInput input) : SV_TARGET
|
||||||
|
{
|
||||||
|
return theTexture.Sample(theSampler, input.tex) * input.color;
|
||||||
|
}
|
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_BT601.hlsl
Normal file
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_BT601.hlsl
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
Texture2D theTextureY : register(t0);
|
||||||
|
Texture2D theTextureU : register(t1);
|
||||||
|
Texture2D theTextureV : register(t2);
|
||||||
|
SamplerState theSampler : register(s0);
|
||||||
|
|
||||||
|
struct PixelShaderInput
|
||||||
|
{
|
||||||
|
float4 pos : SV_POSITION;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
float4 color : COLOR0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define YUVRS \
|
||||||
|
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||||
|
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||||
|
"RootConstants(num32BitConstants=32, b0),"\
|
||||||
|
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||||
|
|
||||||
|
[RootSignature(YUVRS)]
|
||||||
|
float4 main(PixelShaderInput input) : SV_TARGET
|
||||||
|
{
|
||||||
|
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
|
||||||
|
const float3 Rcoeff = {1.1644, 0.0000, 1.5960};
|
||||||
|
const float3 Gcoeff = {1.1644, -0.3918, -0.8130};
|
||||||
|
const float3 Bcoeff = {1.1644, 2.0172, 0.0000};
|
||||||
|
|
||||||
|
float4 Output;
|
||||||
|
|
||||||
|
float3 yuv;
|
||||||
|
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||||
|
yuv.y = theTextureU.Sample(theSampler, input.tex).r;
|
||||||
|
yuv.z = theTextureV.Sample(theSampler, input.tex).r;
|
||||||
|
|
||||||
|
yuv += offset;
|
||||||
|
Output.r = dot(yuv, Rcoeff);
|
||||||
|
Output.g = dot(yuv, Gcoeff);
|
||||||
|
Output.b = dot(yuv, Bcoeff);
|
||||||
|
Output.a = 1.0f;
|
||||||
|
|
||||||
|
return Output * input.color;
|
||||||
|
}
|
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_BT709.hlsl
Normal file
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_BT709.hlsl
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
Texture2D theTextureY : register(t0);
|
||||||
|
Texture2D theTextureU : register(t1);
|
||||||
|
Texture2D theTextureV : register(t2);
|
||||||
|
SamplerState theSampler : register(s0);
|
||||||
|
|
||||||
|
struct PixelShaderInput
|
||||||
|
{
|
||||||
|
float4 pos : SV_POSITION;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
float4 color : COLOR0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define YUVRS \
|
||||||
|
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||||
|
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||||
|
"RootConstants(num32BitConstants=32, b0),"\
|
||||||
|
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||||
|
|
||||||
|
[RootSignature(YUVRS)]
|
||||||
|
float4 main(PixelShaderInput input) : SV_TARGET
|
||||||
|
{
|
||||||
|
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
|
||||||
|
const float3 Rcoeff = {1.1644, 0.0000, 1.7927};
|
||||||
|
const float3 Gcoeff = {1.1644, -0.2132, -0.5329};
|
||||||
|
const float3 Bcoeff = {1.1644, 2.1124, 0.0000};
|
||||||
|
|
||||||
|
float4 Output;
|
||||||
|
|
||||||
|
float3 yuv;
|
||||||
|
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||||
|
yuv.y = theTextureU.Sample(theSampler, input.tex).r;
|
||||||
|
yuv.z = theTextureV.Sample(theSampler, input.tex).r;
|
||||||
|
|
||||||
|
yuv += offset;
|
||||||
|
Output.r = dot(yuv, Rcoeff);
|
||||||
|
Output.g = dot(yuv, Gcoeff);
|
||||||
|
Output.b = dot(yuv, Bcoeff);
|
||||||
|
Output.a = 1.0f;
|
||||||
|
|
||||||
|
return Output * input.color;
|
||||||
|
}
|
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_JPEG.hlsl
Normal file
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_JPEG.hlsl
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
Texture2D theTextureY : register(t0);
|
||||||
|
Texture2D theTextureU : register(t1);
|
||||||
|
Texture2D theTextureV : register(t2);
|
||||||
|
SamplerState theSampler : register(s0);
|
||||||
|
|
||||||
|
struct PixelShaderInput
|
||||||
|
{
|
||||||
|
float4 pos : SV_POSITION;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
float4 color : COLOR0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define YUVRS \
|
||||||
|
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||||
|
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||||
|
"RootConstants(num32BitConstants=32, b0),"\
|
||||||
|
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||||
|
|
||||||
|
[RootSignature(YUVRS)]
|
||||||
|
float4 main(PixelShaderInput input) : SV_TARGET
|
||||||
|
{
|
||||||
|
const float3 offset = {0.0, -0.501960814, -0.501960814};
|
||||||
|
const float3 Rcoeff = {1.0000, 0.0000, 1.4020};
|
||||||
|
const float3 Gcoeff = {1.0000, -0.3441, -0.7141};
|
||||||
|
const float3 Bcoeff = {1.0000, 1.7720, 0.0000};
|
||||||
|
|
||||||
|
float4 Output;
|
||||||
|
|
||||||
|
float3 yuv;
|
||||||
|
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||||
|
yuv.y = theTextureU.Sample(theSampler, input.tex).r;
|
||||||
|
yuv.z = theTextureV.Sample(theSampler, input.tex).r;
|
||||||
|
|
||||||
|
yuv += offset;
|
||||||
|
Output.r = dot(yuv, Rcoeff);
|
||||||
|
Output.g = dot(yuv, Gcoeff);
|
||||||
|
Output.b = dot(yuv, Bcoeff);
|
||||||
|
Output.a = 1.0f;
|
||||||
|
|
||||||
|
return Output * input.color;
|
||||||
|
}
|
95
VisualC-GDK/shaders/D3D12_VertexShader.hlsl
Normal file
95
VisualC-GDK/shaders/D3D12_VertexShader.hlsl
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
#pragma pack_matrix( row_major )
|
||||||
|
|
||||||
|
struct VertexShaderConstants
|
||||||
|
{
|
||||||
|
matrix model;
|
||||||
|
matrix projectionAndView;
|
||||||
|
};
|
||||||
|
ConstantBuffer<VertexShaderConstants> Constants : register(b0);
|
||||||
|
|
||||||
|
struct VertexShaderInput
|
||||||
|
{
|
||||||
|
float3 pos : POSITION;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
float4 color : COLOR0;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct VertexShaderOutput
|
||||||
|
{
|
||||||
|
float4 pos : SV_POSITION;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
float4 color : COLOR0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define ColorRS \
|
||||||
|
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||||
|
"DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||||
|
"DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||||
|
"DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||||
|
"RootConstants(num32BitConstants=32, b0)"
|
||||||
|
|
||||||
|
#define TextureRS \
|
||||||
|
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||||
|
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||||
|
"RootConstants(num32BitConstants=32, b0),"\
|
||||||
|
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||||
|
|
||||||
|
#define YUVRS \
|
||||||
|
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||||
|
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||||
|
"RootConstants(num32BitConstants=32, b0),"\
|
||||||
|
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||||
|
|
||||||
|
#define NVRS \
|
||||||
|
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||||
|
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||||
|
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||||
|
"RootConstants(num32BitConstants=32, b0),"\
|
||||||
|
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||||
|
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||||
|
|
||||||
|
[RootSignature(ColorRS)]
|
||||||
|
VertexShaderOutput mainColor(VertexShaderInput input)
|
||||||
|
{
|
||||||
|
VertexShaderOutput output;
|
||||||
|
float4 pos = float4(input.pos, 1.0f);
|
||||||
|
|
||||||
|
// Transform the vertex position into projected space.
|
||||||
|
pos = mul(pos, Constants.model);
|
||||||
|
pos = mul(pos, Constants.projectionAndView);
|
||||||
|
output.pos = pos;
|
||||||
|
|
||||||
|
// Pass through texture coordinates and color values without transformation
|
||||||
|
output.tex = input.tex;
|
||||||
|
output.color = input.color;
|
||||||
|
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
[RootSignature(TextureRS)]
|
||||||
|
VertexShaderOutput mainTexture(VertexShaderInput input)
|
||||||
|
{
|
||||||
|
return mainColor(input);
|
||||||
|
}
|
||||||
|
|
||||||
|
[RootSignature(YUVRS)]
|
||||||
|
VertexShaderOutput mainYUV(VertexShaderInput input)
|
||||||
|
{
|
||||||
|
return mainColor(input);
|
||||||
|
}
|
||||||
|
|
||||||
|
[RootSignature(NVRS)]
|
||||||
|
VertexShaderOutput mainNV(VertexShaderInput input)
|
||||||
|
{
|
||||||
|
return mainColor(input);
|
||||||
|
}
|
35
VisualC-GDK/shaders/buildshaders.bat
Normal file
35
VisualC-GDK/shaders/buildshaders.bat
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
if %2.==one. goto setxboxone
|
||||||
|
rem Xbox Series compile
|
||||||
|
set XBOXDXC="%GameDKLatest%\GXDK\bin\Scarlett\DXC.exe"
|
||||||
|
set SUFFIX=_Series.h
|
||||||
|
goto startbuild
|
||||||
|
|
||||||
|
:setxboxone
|
||||||
|
set XBOXDXC="%GameDKLatest%\GXDK\bin\XboxOne\DXC.exe"
|
||||||
|
set SUFFIX=_One.h
|
||||||
|
|
||||||
|
:startbuild
|
||||||
|
echo Building with %XBOXDXC%
|
||||||
|
cd "%1\shaders"
|
||||||
|
rem Root Signatures
|
||||||
|
%XBOXDXC% -E ColorRS -T rootsig_1_1 -rootsig-define ColorRS -Fh D3D12_RootSig_Color%SUFFIX% -Vn D3D12_RootSig_Color D3D12_VertexShader.hlsl
|
||||||
|
%XBOXDXC% -E TextureRS -T rootsig_1_1 -rootsig-define TextureRS -Fh D3D12_RootSig_Texture%SUFFIX% -Vn D3D12_RootSig_Texture D3D12_VertexShader.hlsl
|
||||||
|
%XBOXDXC% -E YUVRS -T rootsig_1_1 -rootsig-define YUVRS -Fh D3D12_RootSig_YUV%SUFFIX% -Vn D3D12_RootSig_YUV D3D12_VertexShader.hlsl
|
||||||
|
%XBOXDXC% -E NVRS -T rootsig_1_1 -rootsig-define NVRS -Fh D3D12_RootSig_NV%SUFFIX% -Vn D3D12_RootSig_NV D3D12_VertexShader.hlsl
|
||||||
|
rem Vertex Shaders
|
||||||
|
%XBOXDXC% -E mainColor -T vs_6_0 -Fh D3D12_VertexShader_Color%SUFFIX% -Vn D3D12_VertexShader_Color D3D12_VertexShader.hlsl
|
||||||
|
%XBOXDXC% -E mainTexture -T vs_6_0 -Fh D3D12_VertexShader_Texture%SUFFIX% -Vn D3D12_VertexShader_Texture D3D12_VertexShader.hlsl
|
||||||
|
%XBOXDXC% -E mainNV -T vs_6_0 -Fh D3D12_VertexShader_NV%SUFFIX% -Vn D3D12_VertexShader_NV D3D12_VertexShader.hlsl
|
||||||
|
%XBOXDXC% -E mainYUV -T vs_6_0 -Fh D3D12_VertexShader_YUV%SUFFIX% -Vn D3D12_VertexShader_YUV D3D12_VertexShader.hlsl
|
||||||
|
rem Pixel Shaders
|
||||||
|
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_Colors%SUFFIX% -Vn D3D12_PixelShader_Colors D3D12_PixelShader_Colors.hlsl
|
||||||
|
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV12_BT601%SUFFIX% -Vn D3D12_PixelShader_NV12_BT601 D3D12_PixelShader_NV12_BT601.hlsl
|
||||||
|
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV12_BT709%SUFFIX% -Vn D3D12_PixelShader_NV12_BT709 D3D12_PixelShader_NV12_BT709.hlsl
|
||||||
|
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV12_JPEG%SUFFIX% -Vn D3D12_PixelShader_NV12_JPEG D3D12_PixelShader_NV12_JPEG.hlsl
|
||||||
|
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV21_BT601%SUFFIX% -Vn D3D12_PixelShader_NV21_BT601 D3D12_PixelShader_NV21_BT601.hlsl
|
||||||
|
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV21_BT709%SUFFIX% -Vn D3D12_PixelShader_NV21_BT709 D3D12_PixelShader_NV21_BT709.hlsl
|
||||||
|
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV21_JPEG%SUFFIX% -Vn D3D12_PixelShader_NV21_JPEG D3D12_PixelShader_NV21_JPEG.hlsl
|
||||||
|
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_Textures%SUFFIX% -Vn D3D12_PixelShader_Textures D3D12_PixelShader_Textures.hlsl
|
||||||
|
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_YUV_BT601%SUFFIX% -Vn D3D12_PixelShader_YUV_BT601 D3D12_PixelShader_YUV_BT601.hlsl
|
||||||
|
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_YUV_BT709%SUFFIX% -Vn D3D12_PixelShader_YUV_BT709 D3D12_PixelShader_YUV_BT709.hlsl
|
||||||
|
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_YUV_JPEG%SUFFIX% -Vn D3D12_PixelShader_YUV_JPEG D3D12_PixelShader_YUV_JPEG.hlsl
|
@@ -139,7 +139,7 @@
|
|||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">
|
||||||
@@ -409,7 +409,7 @@
|
|||||||
<CopyFileToFolders Include="..\..\logos\Logo480x480.png" />
|
<CopyFileToFolders Include="..\..\logos\Logo480x480.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
|
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.GDK.C.Thunks.dll">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2024 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
|
||||||
@@ -239,17 +239,17 @@ LoadSprite(const char *file)
|
|||||||
/* This does the SDL_LoadBMP step repeatedly, but that's OK for test code. */
|
/* This does the SDL_LoadBMP step repeatedly, but that's OK for test code. */
|
||||||
sprites[i] = LoadTexture(state->renderers[i], file, SDL_TRUE, &sprite_w, &sprite_h);
|
sprites[i] = LoadTexture(state->renderers[i], file, SDL_TRUE, &sprite_w, &sprite_h);
|
||||||
if (!sprites[i]) {
|
if (!sprites[i]) {
|
||||||
return (-1);
|
return -1;
|
||||||
}
|
}
|
||||||
if (SDL_SetTextureBlendMode(sprites[i], blendMode) < 0) {
|
if (SDL_SetTextureBlendMode(sprites[i], blendMode) < 0) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set blend mode: %s\n", SDL_GetError());
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set blend mode: %s\n", SDL_GetError());
|
||||||
SDL_DestroyTexture(sprites[i]);
|
SDL_DestroyTexture(sprites[i]);
|
||||||
return (-1);
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We're ready to roll. :) */
|
/* We're ready to roll. :) */
|
||||||
return (0);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -364,8 +364,9 @@ loop()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -460,7 +461,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
soundname = GetResourceFilename(argc > 1 ? argv[1] : NULL, "sample.wav");
|
soundname = GetResourceFilename(argc > 1 ? argv[1] : NULL, "sample.wav");
|
||||||
|
|
||||||
if (soundname == NULL) {
|
if (!soundname) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "%s\n", SDL_GetError());
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "%s\n", SDL_GetError());
|
||||||
quit(1);
|
quit(1);
|
||||||
}
|
}
|
||||||
|
@@ -125,6 +125,7 @@
|
|||||||
<ClInclude Include="..\src\joystick\controller_type.h" />
|
<ClInclude Include="..\src\joystick\controller_type.h" />
|
||||||
<ClInclude Include="..\src\joystick\SDL_gamecontrollerdb.h" />
|
<ClInclude Include="..\src\joystick\SDL_gamecontrollerdb.h" />
|
||||||
<ClInclude Include="..\src\joystick\SDL_joystick_c.h" />
|
<ClInclude Include="..\src\joystick\SDL_joystick_c.h" />
|
||||||
|
<ClInclude Include="..\src\joystick\SDL_steam_virtual_gamepad.h" />
|
||||||
<ClInclude Include="..\src\joystick\SDL_sysjoystick.h" />
|
<ClInclude Include="..\src\joystick\SDL_sysjoystick.h" />
|
||||||
<ClInclude Include="..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
<ClInclude Include="..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||||
<ClInclude Include="..\src\joystick\windows\SDL_dinputjoystick_c.h" />
|
<ClInclude Include="..\src\joystick\windows\SDL_dinputjoystick_c.h" />
|
||||||
@@ -184,6 +185,14 @@
|
|||||||
<ClInclude Include="..\src\video\winrt\SDL_winrtopengles.h" />
|
<ClInclude Include="..\src\video\winrt\SDL_winrtopengles.h" />
|
||||||
<ClInclude Include="..\src\video\winrt\SDL_winrtvideo_cpp.h" />
|
<ClInclude Include="..\src\video\winrt\SDL_winrtvideo_cpp.h" />
|
||||||
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb.h" />
|
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb.h" />
|
||||||
|
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_common.h" />
|
||||||
|
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_internal.h" />
|
||||||
|
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_lsx.h" />
|
||||||
|
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_lsx_func.h" />
|
||||||
|
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_sse.h" />
|
||||||
|
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
|
||||||
|
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_std.h" />
|
||||||
|
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\src\atomic\SDL_atomic.c" />
|
<ClCompile Include="..\src\atomic\SDL_atomic.c" />
|
||||||
@@ -237,6 +246,7 @@
|
|||||||
<ClCompile Include="..\src\joystick\controller_type.c" />
|
<ClCompile Include="..\src\joystick\controller_type.c" />
|
||||||
<ClCompile Include="..\src\joystick\SDL_gamecontroller.c" />
|
<ClCompile Include="..\src\joystick\SDL_gamecontroller.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\virtual\SDL_virtualjoystick.c" />
|
<ClCompile Include="..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||||
<ClCompile Include="..\src\joystick\windows\SDL_dinputjoystick.c" />
|
<ClCompile Include="..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||||
<ClCompile Include="..\src\joystick\windows\SDL_windowsjoystick.c" />
|
<ClCompile Include="..\src\joystick\windows\SDL_windowsjoystick.c" />
|
||||||
@@ -344,7 +354,9 @@
|
|||||||
<ClCompile Include="..\src\video\winrt\SDL_winrtvideo.cpp">
|
<ClCompile Include="..\src\video\winrt\SDL_winrtvideo.cpp">
|
||||||
<CompileAsWinRT>true</CompileAsWinRT>
|
<CompileAsWinRT>true</CompileAsWinRT>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\src\video\yuv2rgb\yuv_rgb.c" />
|
<ClCompile Include="..\src\video\yuv2rgb\yuv_rgb_lsx.c" />
|
||||||
|
<ClCompile Include="..\src\video\yuv2rgb\yuv_rgb_sse.c" />
|
||||||
|
<ClCompile Include="..\src\video\yuv2rgb\yuv_rgb_std.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectGuid>{89e9b32e-a86a-47c3-a948-d2b1622925ce}</ProjectGuid>
|
<ProjectGuid>{89e9b32e-a86a-47c3-a948-d2b1622925ce}</ProjectGuid>
|
||||||
|
@@ -255,6 +255,9 @@
|
|||||||
<ClInclude Include="..\src\joystick\SDL_joystick_c.h">
|
<ClInclude Include="..\src\joystick\SDL_joystick_c.h">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\src\joystick\SDL_steam_virtual_gamepad.h">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\src\joystick\SDL_sysjoystick.h">
|
<ClInclude Include="..\src\joystick\SDL_sysjoystick.h">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -558,6 +561,9 @@
|
|||||||
<ClCompile Include="..\src\joystick\SDL_joystick.c">
|
<ClCompile Include="..\src\joystick\SDL_joystick.c">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\src\joystick\SDL_steam_virtual_gamepad.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\src\joystick\virtual\SDL_virtualjoystick.c">
|
<ClCompile Include="..\src\joystick\virtual\SDL_virtualjoystick.c">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -846,4 +852,4 @@
|
|||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@@ -137,6 +137,7 @@
|
|||||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ResourceCompile>
|
<ResourceCompile>
|
||||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
@@ -335,6 +336,7 @@
|
|||||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||||
|
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\usb_ids.h" />
|
<ClInclude Include="..\..\src\joystick\usb_ids.h" />
|
||||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||||
@@ -392,7 +394,6 @@
|
|||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_platform.h" />
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_platform.h" />
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_sdk_platform.h" />
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_sdk_platform.h" />
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h" />
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h" />
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp" />
|
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h" />
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h" />
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_beta.h" />
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_beta.h" />
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
|
||||||
@@ -437,7 +438,13 @@
|
|||||||
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
|
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
|
||||||
<ClInclude Include="..\..\src\video\windows\wmmsg.h" />
|
<ClInclude Include="..\..\src\video\windows\wmmsg.h" />
|
||||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
|
||||||
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_common.h" />
|
||||||
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_internal.h" />
|
||||||
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.h" />
|
||||||
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx_func.h" />
|
||||||
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse.h" />
|
||||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
|
||||||
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std.h" />
|
||||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
|
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -492,6 +499,7 @@
|
|||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_shield.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_shield.c" />
|
||||||
<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_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_wii.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||||
@@ -499,6 +507,7 @@
|
|||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
|
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.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\virtual\SDL_virtualjoystick.c" />
|
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||||
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
|
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
|
||||||
@@ -620,7 +629,9 @@
|
|||||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
|
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
|
||||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
|
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
|
||||||
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
|
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
|
||||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb.c" />
|
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.c" />
|
||||||
|
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_sse.c" />
|
||||||
|
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_std.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="..\..\src\main\windows\version.rc" />
|
<ResourceCompile Include="..\..\src\main\windows\version.rc" />
|
||||||
|
@@ -501,6 +501,9 @@
|
|||||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h">
|
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h">
|
||||||
<Filter>joystick</Filter>
|
<Filter>joystick</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h">
|
||||||
|
<Filter>joystick</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h">
|
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h">
|
||||||
<Filter>joystick</Filter>
|
<Filter>joystick</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -777,9 +780,6 @@
|
|||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h">
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h">
|
||||||
<Filter>video\khronos\vulkan</Filter>
|
<Filter>video\khronos\vulkan</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp">
|
|
||||||
<Filter>video\khronos\vulkan</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h">
|
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h">
|
||||||
<Filter>video\khronos\vulkan</Filter>
|
<Filter>video\khronos\vulkan</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -934,6 +934,9 @@
|
|||||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c">
|
<ClCompile Include="..\..\src\joystick\SDL_joystick.c">
|
||||||
<Filter>joystick</Filter>
|
<Filter>joystick</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c">
|
||||||
|
<Filter>joystick</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\libm\e_atan2.c">
|
<ClCompile Include="..\..\src\libm\e_atan2.c">
|
||||||
<Filter>libm</Filter>
|
<Filter>libm</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -1072,6 +1075,9 @@
|
|||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c">
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c">
|
||||||
<Filter>joystick\hidapi</Filter>
|
<Filter>joystick\hidapi</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c">
|
||||||
|
<Filter>joystick\hidapi</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c">
|
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c">
|
||||||
<Filter>joystick\hidapi</Filter>
|
<Filter>joystick\hidapi</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# SDL2 CMake configuration file:
|
# SDL2 CMake configuration file:
|
||||||
# This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-VC
|
# This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-VC
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0...3.5)
|
||||||
|
|
||||||
include(FeatureSummary)
|
include(FeatureSummary)
|
||||||
set_package_properties(SDL2 PROPERTIES
|
set_package_properties(SDL2 PROPERTIES
|
||||||
@@ -68,6 +68,8 @@ if(EXISTS "${_sdl2_library}" AND EXISTS "${_sdl2_dll_library}")
|
|||||||
IMPORTED_LOCATION "${_sdl2_dll_library}"
|
IMPORTED_LOCATION "${_sdl2_dll_library}"
|
||||||
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
|
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
|
||||||
INTERFACE_SDL2_SHARED "ON"
|
INTERFACE_SDL2_SHARED "ON"
|
||||||
|
COMPATIBLE_INTERFACE_STRING "SDL_VERSION"
|
||||||
|
INTERFACE_SDL_VERSION "SDL2"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
set(SDL2_SDL2_FOUND TRUE)
|
set(SDL2_SDL2_FOUND TRUE)
|
||||||
@@ -84,6 +86,8 @@ if(EXISTS "${_sdl2main_library}")
|
|||||||
set_target_properties(SDL2::SDL2main
|
set_target_properties(SDL2::SDL2main
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
IMPORTED_LOCATION "${_sdl2main_library}"
|
IMPORTED_LOCATION "${_sdl2main_library}"
|
||||||
|
COMPATIBLE_INTERFACE_STRING "SDL_VERSION"
|
||||||
|
INTERFACE_SDL_VERSION "SDL2"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
set(SDL2_SDL2main_FOUND TRUE)
|
set(SDL2_SDL2main_FOUND TRUE)
|
||||||
@@ -100,6 +104,8 @@ if(EXISTS "${_sdl2test_library}")
|
|||||||
PROPERTIES
|
PROPERTIES
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
|
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
|
||||||
IMPORTED_LOCATION "${_sdl2test_library}"
|
IMPORTED_LOCATION "${_sdl2test_library}"
|
||||||
|
COMPATIBLE_INTERFACE_STRING "SDL_VERSION"
|
||||||
|
INTERFACE_SDL_VERSION "SDL2"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
set(SDL2_SDL2test_FOUND TRUE)
|
set(SDL2_SDL2test_FOUND TRUE)
|
||||||
|
@@ -210,6 +210,7 @@
|
|||||||
<ClCompile Include="..\..\..\test\testautomation_hints.c" />
|
<ClCompile Include="..\..\..\test\testautomation_hints.c" />
|
||||||
<ClCompile Include="..\..\..\test\testautomation_joystick.c" />
|
<ClCompile Include="..\..\..\test\testautomation_joystick.c" />
|
||||||
<ClCompile Include="..\..\..\test\testautomation_keyboard.c" />
|
<ClCompile Include="..\..\..\test\testautomation_keyboard.c" />
|
||||||
|
<ClCompile Include="..\..\..\test\testautomation_log.c" />
|
||||||
<ClCompile Include="..\..\..\test\testautomation_main.c" />
|
<ClCompile Include="..\..\..\test\testautomation_main.c" />
|
||||||
<ClCompile Include="..\..\..\test\testautomation_math.c" />
|
<ClCompile Include="..\..\..\test\testautomation_math.c" />
|
||||||
<ClCompile Include="..\..\..\test\testautomation_mouse.c" />
|
<ClCompile Include="..\..\..\test\testautomation_mouse.c" />
|
||||||
@@ -224,6 +225,7 @@
|
|||||||
<ClCompile Include="..\..\..\test\testautomation_syswm.c" />
|
<ClCompile Include="..\..\..\test\testautomation_syswm.c" />
|
||||||
<ClCompile Include="..\..\..\test\testautomation_timer.c" />
|
<ClCompile Include="..\..\..\test\testautomation_timer.c" />
|
||||||
<ClCompile Include="..\..\..\test\testautomation_video.c" />
|
<ClCompile Include="..\..\..\test\testautomation_video.c" />
|
||||||
|
<ClCompile Include="..\..\..\test\testautomation_subsystems.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\..\..\test\testautomation_suites.h" />
|
<ClInclude Include="..\..\..\test\testautomation_suites.h" />
|
||||||
@@ -231,4 +233,4 @@
|
|||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
46
WhatsNew.txt
46
WhatsNew.txt
@@ -1,6 +1,42 @@
|
|||||||
|
|
||||||
This is a list of major changes in SDL's version history.
|
This is a list of major changes in SDL's version history.
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
2.30.0:
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
General:
|
||||||
|
* Added support for 2 bits-per-pixel indexed surface formats
|
||||||
|
* Added the function SDL_GameControllerGetSteamHandle() to get the Steam API handle for a controller, if available
|
||||||
|
* Added the event SDL_CONTROLLERSTEAMHANDLEUPDATED which is sent when the Steam API handle for a controller changes. This could also change the name, VID, and PID of the controller.
|
||||||
|
* Added the environment variable SDL_LOGGING to control default log output
|
||||||
|
|
||||||
|
macOS:
|
||||||
|
* Added the hint SDL_HINT_JOYSTICK_IOKIT to control whether the IOKit controller driver should be used
|
||||||
|
* Added the hint SDL_HINT_JOYSTICK_MFI to control whether the GCController controller driver should be used
|
||||||
|
* Added the hint SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE to choose whether high or low power GPU should be used for rendering, in the case where there are multiple GPUs available
|
||||||
|
|
||||||
|
Xbox:
|
||||||
|
* Added the function SDL_GDKGetDefaultUser()
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
2.28.2:
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
General:
|
||||||
|
* Added the hint SDL_HINT_JOYSTICK_WGI to control whether to use Windows.Gaming.Input for controllers
|
||||||
|
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
2.28.0:
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
General:
|
||||||
|
* Added SDL_HasWindowSurface() and SDL_DestroyWindowSurface() to switch between the window surface and rendering APIs
|
||||||
|
* Added a display event SDL_DISPLAYEVENT_MOVED which is sent when the primary monitor changes or displays change position relative to each other
|
||||||
|
* Added the hint SDL_HINT_ENABLE_SCREEN_KEYBOARD to control whether the on-screen keyboard should be shown when text input is active
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
2.26.0:
|
2.26.0:
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
@@ -24,7 +60,7 @@ General:
|
|||||||
* Added access to the individual left and right gyro sensors of the combined Joy-Cons controller
|
* Added access to the individual left and right gyro sensors of the combined Joy-Cons controller
|
||||||
* Added a microsecond timestamp to SDL_SensorEvent and SDL_ControllerSensorEvent, when the hardware provides that information
|
* Added a microsecond timestamp to SDL_SensorEvent and SDL_ControllerSensorEvent, when the hardware provides that information
|
||||||
* Added SDL_SensorGetDataWithTimestamp() and SDL_GameControllerGetSensorDataWithTimestamp() to retrieve the last sensor data with the associated microsecond timestamp
|
* Added SDL_SensorGetDataWithTimestamp() and SDL_GameControllerGetSensorDataWithTimestamp() to retrieve the last sensor data with the associated microsecond timestamp
|
||||||
* Added the hint SDL_HINT_HIDAPI_IGNORE_DEVICES to have the SDL HID API ignore specific devices
|
* Added the hint SDL_HINT_HIDAPI_IGNORE_DEVICES to have the SDL HID API ignore specific devices
|
||||||
* SDL_GetRevision() now includes more information about the SDL build, including the git commit hash if available
|
* SDL_GetRevision() now includes more information about the SDL build, including the git commit hash if available
|
||||||
|
|
||||||
Windows:
|
Windows:
|
||||||
@@ -645,7 +681,7 @@ iOS:
|
|||||||
|
|
||||||
tvOS:
|
tvOS:
|
||||||
* Added support for Apple TV
|
* Added support for Apple TV
|
||||||
* Added a hint SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION to control whether he Apple TV remote's joystick axes will automatically match the rotation of the remote.
|
* Added a hint SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION to control whether he Apple TV remote's joystick axes will automatically match the rotation of the remote.
|
||||||
|
|
||||||
Android:
|
Android:
|
||||||
* Fixed SDL not resizing window when Android screen resolution changes
|
* Fixed SDL not resizing window when Android screen resolution changes
|
||||||
@@ -790,8 +826,8 @@ Linux:
|
|||||||
* Added experimental Wayland and Mir support, disabled by default
|
* Added experimental Wayland and Mir support, disabled by default
|
||||||
|
|
||||||
Android:
|
Android:
|
||||||
* Joystick support (minimum SDK version required to build SDL is now 12,
|
* Joystick support (minimum SDK version required to build SDL is now 12,
|
||||||
the required runtime version remains at 10, but on such devices joystick
|
the required runtime version remains at 10, but on such devices joystick
|
||||||
support won't be available).
|
support won't be available).
|
||||||
* Hotplugging support for joysticks
|
* Hotplugging support for joysticks
|
||||||
* Added a hint SDL_HINT_ACCELEROMETER_AS_JOYSTICK to control whether the accelerometer should be listed as a 3 axis joystick, which it will by default.
|
* Added a hint SDL_HINT_ACCELEROMETER_AS_JOYSTICK to control whether the accelerometer should be listed as a 3 axis joystick, which it will by default.
|
||||||
@@ -844,7 +880,7 @@ iOS:
|
|||||||
|
|
||||||
Android:
|
Android:
|
||||||
IMPORTANT: You MUST get the updated SDLActivity.java to match C code
|
IMPORTANT: You MUST get the updated SDLActivity.java to match C code
|
||||||
* Moved EGL initialization to native code
|
* Moved EGL initialization to native code
|
||||||
* Fixed the accelerometer axis rotation relative to the device rotation
|
* Fixed the accelerometer axis rotation relative to the device rotation
|
||||||
* Fixed race conditions when handling the EGL context on pause/resume
|
* Fixed race conditions when handling the EGL context on pause/resume
|
||||||
* Touch devices are available for enumeration immediately after init
|
* Touch devices are available for enumeration immediately after init
|
||||||
|
@@ -118,7 +118,7 @@ initializeTextures(SDL_Renderer *renderer)
|
|||||||
|
|
||||||
/* load the ship */
|
/* load the ship */
|
||||||
bmp_surface = SDL_LoadBMP("ship.bmp");
|
bmp_surface = SDL_LoadBMP("ship.bmp");
|
||||||
if (bmp_surface == NULL) {
|
if (!bmp_surface) {
|
||||||
fatalError("could not ship.bmp");
|
fatalError("could not ship.bmp");
|
||||||
}
|
}
|
||||||
/* set blue to transparent on the ship */
|
/* set blue to transparent on the ship */
|
||||||
@@ -140,7 +140,7 @@ initializeTextures(SDL_Renderer *renderer)
|
|||||||
|
|
||||||
/* load the space background */
|
/* load the space background */
|
||||||
bmp_surface = SDL_LoadBMP("space.bmp");
|
bmp_surface = SDL_LoadBMP("space.bmp");
|
||||||
if (bmp_surface == NULL) {
|
if (!bmp_surface) {
|
||||||
fatalError("could not load space.bmp");
|
fatalError("could not load space.bmp");
|
||||||
}
|
}
|
||||||
/* create space texture from surface */
|
/* create space texture from surface */
|
||||||
@@ -179,7 +179,7 @@ main(int argc, char *argv[])
|
|||||||
printf("There are %d joysticks available\n", SDL_NumJoysticks());
|
printf("There are %d joysticks available\n", SDL_NumJoysticks());
|
||||||
printf("Default joystick (index 0) is %s\n", SDL_JoystickName(0));
|
printf("Default joystick (index 0) is %s\n", SDL_JoystickName(0));
|
||||||
accelerometer = SDL_JoystickOpen(0);
|
accelerometer = SDL_JoystickOpen(0);
|
||||||
if (accelerometer == NULL) {
|
if (!accelerometer) {
|
||||||
fatalError("Could not open joystick (accelerometer)");
|
fatalError("Could not open joystick (accelerometer)");
|
||||||
}
|
}
|
||||||
printf("joystick number of axis = %d\n",
|
printf("joystick number of axis = %d\n",
|
||||||
|
@@ -84,14 +84,16 @@ stepParticles(double deltaTime)
|
|||||||
/* is the particle actually active, or is it marked for deletion? */
|
/* is the particle actually active, or is it marked for deletion? */
|
||||||
if (curr->isActive) {
|
if (curr->isActive) {
|
||||||
/* is the particle off the screen? */
|
/* is the particle off the screen? */
|
||||||
if (curr->y > screen_h)
|
if (curr->y > screen_h) {
|
||||||
curr->isActive = 0;
|
curr->isActive = 0;
|
||||||
else if (curr->y < 0)
|
} else if (curr->y < 0) {
|
||||||
curr->isActive = 0;
|
curr->isActive = 0;
|
||||||
if (curr->x > screen_w)
|
}
|
||||||
|
if (curr->x > screen_w) {
|
||||||
curr->isActive = 0;
|
curr->isActive = 0;
|
||||||
else if (curr->x < 0)
|
} else if (curr->x < 0) {
|
||||||
curr->isActive = 0;
|
curr->isActive = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* step velocity, then step position */
|
/* step velocity, then step position */
|
||||||
curr->yvel += ACCEL * deltaMilliseconds;
|
curr->yvel += ACCEL * deltaMilliseconds;
|
||||||
@@ -133,15 +135,17 @@ stepParticles(double deltaTime)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* if we're a dust particle, shrink our size */
|
/* if we're a dust particle, shrink our size */
|
||||||
if (curr->type == dust)
|
if (curr->type == dust) {
|
||||||
curr->size -= deltaMilliseconds * 0.010f;
|
curr->size -= deltaMilliseconds * 0.010f;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if we're still active, pack ourselves in the array next
|
/* if we're still active, pack ourselves in the array next
|
||||||
to the last active guy (pack the array tightly) */
|
to the last active guy (pack the array tightly) */
|
||||||
if (curr->isActive)
|
if (curr->isActive) {
|
||||||
*(slot++) = *curr;
|
*(slot++) = *curr;
|
||||||
|
}
|
||||||
} /* endif (curr->isActive) */
|
} /* endif (curr->isActive) */
|
||||||
curr++;
|
curr++;
|
||||||
}
|
}
|
||||||
@@ -188,8 +192,9 @@ explodeEmitter(struct particle *emitter)
|
|||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 200; i++) {
|
for (i = 0; i < 200; i++) {
|
||||||
|
|
||||||
if (num_active_particles >= MAX_PARTICLES)
|
if (num_active_particles >= MAX_PARTICLES) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* come up with a random angle and speed for new particle */
|
/* come up with a random angle and speed for new particle */
|
||||||
float theta = randomFloat(0, 2.0f * 3.141592);
|
float theta = randomFloat(0, 2.0f * 3.141592);
|
||||||
@@ -226,8 +231,9 @@ void
|
|||||||
spawnTrailFromEmitter(struct particle *emitter)
|
spawnTrailFromEmitter(struct particle *emitter)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (num_active_particles >= MAX_PARTICLES)
|
if (num_active_particles >= MAX_PARTICLES) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* select the particle at the slot at the end of our array */
|
/* select the particle at the slot at the end of our array */
|
||||||
struct particle *p = &particles[num_active_particles];
|
struct particle *p = &particles[num_active_particles];
|
||||||
@@ -262,8 +268,9 @@ void
|
|||||||
spawnEmitterParticle(GLfloat x, GLfloat y)
|
spawnEmitterParticle(GLfloat x, GLfloat y)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (num_active_particles >= MAX_PARTICLES)
|
if (num_active_particles >= MAX_PARTICLES) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* find particle at endpoint of array */
|
/* find particle at endpoint of array */
|
||||||
struct particle *p = &particles[num_active_particles];
|
struct particle *p = &particles[num_active_particles];
|
||||||
@@ -327,7 +334,7 @@ initializeTexture()
|
|||||||
to format passed into OpenGL */
|
to format passed into OpenGL */
|
||||||
|
|
||||||
bmp_surface = SDL_LoadBMP("stroke.bmp");
|
bmp_surface = SDL_LoadBMP("stroke.bmp");
|
||||||
if (bmp_surface == NULL) {
|
if (!bmp_surface) {
|
||||||
fatalError("could not load stroke.bmp");
|
fatalError("could not load stroke.bmp");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -108,7 +108,7 @@ initializeTexture(SDL_Renderer *renderer)
|
|||||||
SDL_Surface *bmp_surface;
|
SDL_Surface *bmp_surface;
|
||||||
/* load the bmp */
|
/* load the bmp */
|
||||||
bmp_surface = SDL_LoadBMP("icon.bmp");
|
bmp_surface = SDL_LoadBMP("icon.bmp");
|
||||||
if (bmp_surface == NULL) {
|
if (!bmp_surface) {
|
||||||
fatalError("could not load bmp");
|
fatalError("could not load bmp");
|
||||||
}
|
}
|
||||||
/* set white to transparent on the happyface */
|
/* set white to transparent on the happyface */
|
||||||
|
@@ -207,9 +207,9 @@ playSound(struct sound *s)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* if this channel's sound is older than the oldest so far, set it to oldest */
|
/* if this channel's sound is older than the oldest so far, set it to oldest */
|
||||||
if (mixer.channels[i].timestamp <
|
if (mixer.channels[i].timestamp < mixer.channels[oldest_channel].timestamp) {
|
||||||
mixer.channels[oldest_channel].timestamp)
|
|
||||||
oldest_channel = i;
|
oldest_channel = i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* no empty channels, take the oldest one */
|
/* no empty channels, take the oldest one */
|
||||||
|
@@ -57,7 +57,7 @@ initializeTexture(SDL_Renderer *renderer)
|
|||||||
{
|
{
|
||||||
SDL_Surface *bmp_surface;
|
SDL_Surface *bmp_surface;
|
||||||
bmp_surface = SDL_LoadBMP("stroke.bmp");
|
bmp_surface = SDL_LoadBMP("stroke.bmp");
|
||||||
if (bmp_surface == NULL) {
|
if (!bmp_surface) {
|
||||||
fatalError("could not load stroke.bmp");
|
fatalError("could not load stroke.bmp");
|
||||||
}
|
}
|
||||||
brush =
|
brush =
|
||||||
|
@@ -19,10 +19,10 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.26.0</string>
|
<string>2.30.4</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>SDLX</string>
|
<string>SDLX</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>2.26.0</string>
|
<string>2.30.4</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
Title SDL 2.0.0
|
Title SDL 2.30.4
|
||||||
Version 1
|
Version 1
|
||||||
Description SDL Library for Mac OS X (http://www.libsdl.org)
|
Description SDL Library for Mac OS X (http://www.libsdl.org)
|
||||||
DefaultLocation /Library/Frameworks
|
DefaultLocation /Library/Frameworks
|
||||||
|
@@ -31,8 +31,15 @@ endmacro()
|
|||||||
|
|
||||||
set(SDL2_FOUND TRUE)
|
set(SDL2_FOUND TRUE)
|
||||||
|
|
||||||
string(REGEX REPLACE "SDL2\\.framework.*" "SDL2.framework" SDL2_FRAMEWORK_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
# Compute the installation prefix relative to this file.
|
||||||
string(REGEX REPLACE "SDL2\\.framework.*" "" SDL2_FRAMEWORK_PARENT_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
set(SDL2_FRAMEWORK_PATH "${CMAKE_CURRENT_LIST_DIR}") # > /SDL2.framework/Resources/CMake/
|
||||||
|
get_filename_component(SDL2_FRAMEWORK_PATH "${SDL2_FRAMEWORK_PATH}" REALPATH) # > /SDL2.framework/Versions/Current/Resources/CMake
|
||||||
|
get_filename_component(SDL2_FRAMEWORK_PATH "${SDL2_FRAMEWORK_PATH}" REALPATH) # > /SDL2.framework/Versions/A/Resources/CMake/
|
||||||
|
get_filename_component(SDL2_FRAMEWORK_PATH "${SDL2_FRAMEWORK_PATH}" PATH) # > /SDL2.framework/Versions/A/Resources/
|
||||||
|
get_filename_component(SDL2_FRAMEWORK_PATH "${SDL2_FRAMEWORK_PATH}" PATH) # > /SDL2.framework/Versions/A/
|
||||||
|
get_filename_component(SDL2_FRAMEWORK_PATH "${SDL2_FRAMEWORK_PATH}" PATH) # > /SDL2.framework/Versions/
|
||||||
|
get_filename_component(SDL2_FRAMEWORK_PATH "${SDL2_FRAMEWORK_PATH}" PATH) # > /SDL2.framework/
|
||||||
|
get_filename_component(SDL2_FRAMEWORK_PARENT_PATH "${SDL2_FRAMEWORK_PATH}" PATH) # > /
|
||||||
|
|
||||||
# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
|
# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
|
||||||
|
|
||||||
@@ -49,14 +56,16 @@ set(SDL2_LIBRARIES "SDL2::SDL2")
|
|||||||
# This is done for compatibility with CMake generated SDL2-target.cmake files.
|
# This is done for compatibility with CMake generated SDL2-target.cmake files.
|
||||||
|
|
||||||
if(NOT TARGET SDL2::SDL2)
|
if(NOT TARGET SDL2::SDL2)
|
||||||
add_library(SDL2::SDL2 INTERFACE IMPORTED)
|
add_library(SDL2::SDL2 SHARED IMPORTED)
|
||||||
set_target_properties(SDL2::SDL2
|
set_target_properties(SDL2::SDL2
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
INTERFACE_COMPILE_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\""
|
FRAMEWORK "TRUE"
|
||||||
|
IMPORTED_LOCATION "${SDL2_FRAMEWORK_PATH}/Versions/A/SDL2"
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
|
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
|
||||||
INTERFACE_LINK_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\";SHELL:-framework SDL2"
|
|
||||||
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
|
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
|
||||||
INTERFACE_SDL2_SHARED "ON"
|
INTERFACE_SDL2_SHARED "ON"
|
||||||
|
COMPATIBLE_INTERFACE_STRING "SDL_VERSION"
|
||||||
|
INTERFACE_SDL_VERSION "SDL2"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
set(SDL2_SDL2_FOUND TRUE)
|
set(SDL2_SDL2_FOUND TRUE)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2024 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
|
||||||
|
File diff suppressed because it is too large
Load Diff
119
acinclude/libtool.m4
vendored
119
acinclude/libtool.m4
vendored
@@ -219,8 +219,8 @@ esac
|
|||||||
ofile=libtool
|
ofile=libtool
|
||||||
can_build_shared=yes
|
can_build_shared=yes
|
||||||
|
|
||||||
# All known linkers require a '.a' archive for static linking (except MSVC,
|
# All known linkers require a '.a' archive for static linking (except MSVC and
|
||||||
# which needs '.lib').
|
# ICC, which need '.lib').
|
||||||
libext=a
|
libext=a
|
||||||
|
|
||||||
with_gnu_ld=$lt_cv_prog_gnu_ld
|
with_gnu_ld=$lt_cv_prog_gnu_ld
|
||||||
@@ -1365,7 +1365,7 @@ mips64*-*linux*)
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
|
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
|
||||||
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*)
|
||||||
# Find out what ABI is being produced by ac_compile, and set linker
|
# Find out what ABI is being produced by ac_compile, and set linker
|
||||||
# options accordingly. Note that the listed cases only cover the
|
# options accordingly. Note that the listed cases only cover the
|
||||||
# situations where additional linker options are needed (such as when
|
# situations where additional linker options are needed (such as when
|
||||||
@@ -1380,7 +1380,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
|||||||
x86_64-*kfreebsd*-gnu)
|
x86_64-*kfreebsd*-gnu)
|
||||||
LD="${LD-ld} -m elf_i386_fbsd"
|
LD="${LD-ld} -m elf_i386_fbsd"
|
||||||
;;
|
;;
|
||||||
x86_64-*linux*)
|
x86_64-*linux*|x86_64-gnu*)
|
||||||
case `/usr/bin/file conftest.o` in
|
case `/usr/bin/file conftest.o` in
|
||||||
*x86-64*)
|
*x86-64*)
|
||||||
LD="${LD-ld} -m elf32_x86_64"
|
LD="${LD-ld} -m elf32_x86_64"
|
||||||
@@ -1409,7 +1409,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
|||||||
x86_64-*kfreebsd*-gnu)
|
x86_64-*kfreebsd*-gnu)
|
||||||
LD="${LD-ld} -m elf_x86_64_fbsd"
|
LD="${LD-ld} -m elf_x86_64_fbsd"
|
||||||
;;
|
;;
|
||||||
x86_64-*linux*)
|
x86_64-*linux*|x86_64-gnu*)
|
||||||
LD="${LD-ld} -m elf_x86_64"
|
LD="${LD-ld} -m elf_x86_64"
|
||||||
;;
|
;;
|
||||||
powerpcle-*linux*|powerpc64le-*linux*)
|
powerpcle-*linux*|powerpc64le-*linux*)
|
||||||
@@ -1540,15 +1540,8 @@ old_postinstall_cmds='chmod 644 $oldlib'
|
|||||||
old_postuninstall_cmds=
|
old_postuninstall_cmds=
|
||||||
|
|
||||||
if test -n "$RANLIB"; then
|
if test -n "$RANLIB"; then
|
||||||
case $host_os in
|
|
||||||
bitrig* | openbsd*)
|
|
||||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
|
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
|
||||||
|
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
@@ -1687,7 +1680,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
|||||||
lt_cv_sys_max_cmd_len=-1;
|
lt_cv_sys_max_cmd_len=-1;
|
||||||
;;
|
;;
|
||||||
|
|
||||||
cygwin* | mingw* | cegcc*)
|
cygwin* | mingw* | windows* | cegcc*)
|
||||||
# On Win9x/ME, this test blows up -- it succeeds, but takes
|
# On Win9x/ME, this test blows up -- it succeeds, but takes
|
||||||
# about 5 minutes as the teststring grows exponentially.
|
# about 5 minutes as the teststring grows exponentially.
|
||||||
# Worse, since 9x/ME are not pre-emptively multitasking,
|
# Worse, since 9x/ME are not pre-emptively multitasking,
|
||||||
@@ -1930,7 +1923,7 @@ else
|
|||||||
lt_cv_dlopen_self=yes
|
lt_cv_dlopen_self=yes
|
||||||
;;
|
;;
|
||||||
|
|
||||||
mingw* | pw32* | cegcc*)
|
mingw* | windows* | pw32* | cegcc*)
|
||||||
lt_cv_dlopen=LoadLibrary
|
lt_cv_dlopen=LoadLibrary
|
||||||
lt_cv_dlopen_libs=
|
lt_cv_dlopen_libs=
|
||||||
;;
|
;;
|
||||||
@@ -2298,7 +2291,7 @@ if test yes = "$GCC"; then
|
|||||||
*) lt_awk_arg='/^libraries:/' ;;
|
*) lt_awk_arg='/^libraries:/' ;;
|
||||||
esac
|
esac
|
||||||
case $host_os in
|
case $host_os in
|
||||||
mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
|
mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
|
||||||
*) lt_sed_strip_eq='s|=/|/|g' ;;
|
*) lt_sed_strip_eq='s|=/|/|g' ;;
|
||||||
esac
|
esac
|
||||||
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
|
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
|
||||||
@@ -2356,7 +2349,7 @@ BEGIN {RS = " "; FS = "/|\n";} {
|
|||||||
# AWK program above erroneously prepends '/' to C:/dos/paths
|
# AWK program above erroneously prepends '/' to C:/dos/paths
|
||||||
# for these hosts.
|
# for these hosts.
|
||||||
case $host_os in
|
case $host_os in
|
||||||
mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
|
mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
|
||||||
$SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
|
$SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
|
||||||
esac
|
esac
|
||||||
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
|
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
|
||||||
@@ -2525,7 +2518,7 @@ bsdi[[45]]*)
|
|||||||
# libtool to hard-code these into programs
|
# libtool to hard-code these into programs
|
||||||
;;
|
;;
|
||||||
|
|
||||||
cygwin* | mingw* | pw32* | cegcc*)
|
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||||
version_type=windows
|
version_type=windows
|
||||||
shrext_cmds=.dll
|
shrext_cmds=.dll
|
||||||
need_version=no
|
need_version=no
|
||||||
@@ -2558,7 +2551,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
|||||||
m4_if([$1], [],[
|
m4_if([$1], [],[
|
||||||
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
|
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
|
||||||
;;
|
;;
|
||||||
mingw* | cegcc*)
|
mingw* | windows* | cegcc*)
|
||||||
# MinGW DLLs use traditional 'lib' prefix
|
# MinGW DLLs use traditional 'lib' prefix
|
||||||
#soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
#soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||||
soname_spec='`echo $libname | $SED -e 's/^lib//'`$shared_ext' # SDL customization
|
soname_spec='`echo $libname | $SED -e 's/^lib//'`$shared_ext' # SDL customization
|
||||||
@@ -2571,14 +2564,14 @@ m4_if([$1], [],[
|
|||||||
dynamic_linker='Win32 ld.exe'
|
dynamic_linker='Win32 ld.exe'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*,cl*)
|
*,cl* | *,icl*)
|
||||||
# Native MSVC
|
# Native MSVC or ICC
|
||||||
libname_spec='$name'
|
libname_spec='$name'
|
||||||
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||||
library_names_spec='$libname.dll.lib'
|
library_names_spec='$libname.dll.lib'
|
||||||
|
|
||||||
case $build_os in
|
case $build_os in
|
||||||
mingw*)
|
mingw* | windows*)
|
||||||
sys_lib_search_path_spec=
|
sys_lib_search_path_spec=
|
||||||
lt_save_ifs=$IFS
|
lt_save_ifs=$IFS
|
||||||
IFS=';'
|
IFS=';'
|
||||||
@@ -2628,7 +2621,7 @@ m4_if([$1], [],[
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
# Assume MSVC wrapper
|
# Assume MSVC and ICC wrapper
|
||||||
library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
|
library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
|
||||||
dynamic_linker='Win32 ld.exe'
|
dynamic_linker='Win32 ld.exe'
|
||||||
;;
|
;;
|
||||||
@@ -3267,7 +3260,7 @@ if test yes = "$GCC"; then
|
|||||||
# Check if gcc -print-prog-name=ld gives a path.
|
# Check if gcc -print-prog-name=ld gives a path.
|
||||||
AC_MSG_CHECKING([for ld used by $CC])
|
AC_MSG_CHECKING([for ld used by $CC])
|
||||||
case $host in
|
case $host in
|
||||||
*-*-mingw*)
|
*-*-mingw* | *-*-windows*)
|
||||||
# gcc leaves a trailing carriage return, which upsets mingw
|
# gcc leaves a trailing carriage return, which upsets mingw
|
||||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||||
*)
|
*)
|
||||||
@@ -3376,7 +3369,7 @@ case $reload_flag in
|
|||||||
esac
|
esac
|
||||||
reload_cmds='$LD$reload_flag -o $output$reload_objs'
|
reload_cmds='$LD$reload_flag -o $output$reload_objs'
|
||||||
case $host_os in
|
case $host_os in
|
||||||
cygwin* | mingw* | pw32* | cegcc*)
|
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||||
if test yes != "$GCC"; then
|
if test yes != "$GCC"; then
|
||||||
reload_cmds=false
|
reload_cmds=false
|
||||||
fi
|
fi
|
||||||
@@ -3476,7 +3469,7 @@ cygwin*)
|
|||||||
lt_cv_deplibs_check_method=pass_all # SDL customization
|
lt_cv_deplibs_check_method=pass_all # SDL customization
|
||||||
;;
|
;;
|
||||||
|
|
||||||
mingw* | pw32*)
|
mingw* | windows* | pw32*)
|
||||||
# Base MSYS/MinGW do not provide the 'file' command needed by
|
# Base MSYS/MinGW do not provide the 'file' command needed by
|
||||||
# func_win32_libid shell function, so use a weaker test based on 'objdump',
|
# func_win32_libid shell function, so use a weaker test based on 'objdump',
|
||||||
# unless we find 'file', for example because we are cross-compiling.
|
# unless we find 'file', for example because we are cross-compiling.
|
||||||
@@ -3641,7 +3634,7 @@ file_magic_glob=
|
|||||||
want_nocaseglob=no
|
want_nocaseglob=no
|
||||||
if test "$build" = "$host"; then
|
if test "$build" = "$host"; then
|
||||||
case $host_os in
|
case $host_os in
|
||||||
mingw* | pw32*)
|
mingw* | windows* | pw32*)
|
||||||
if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
|
if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
|
||||||
want_nocaseglob=yes
|
want_nocaseglob=yes
|
||||||
else
|
else
|
||||||
@@ -3693,7 +3686,7 @@ else
|
|||||||
# Tru64's nm complains that /dev/null is an invalid object file
|
# Tru64's nm complains that /dev/null is an invalid object file
|
||||||
# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
|
# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
|
||||||
case $build_os in
|
case $build_os in
|
||||||
mingw*) lt_bad_file=conftest.nm/nofile ;;
|
mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
|
||||||
*) lt_bad_file=/dev/null ;;
|
*) lt_bad_file=/dev/null ;;
|
||||||
esac
|
esac
|
||||||
case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
|
case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
|
||||||
@@ -3784,7 +3777,7 @@ lt_cv_sharedlib_from_linklib_cmd,
|
|||||||
[lt_cv_sharedlib_from_linklib_cmd='unknown'
|
[lt_cv_sharedlib_from_linklib_cmd='unknown'
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
cygwin* | mingw* | pw32* | cegcc*)
|
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||||
# two different shell functions defined in ltmain.sh;
|
# two different shell functions defined in ltmain.sh;
|
||||||
# decide which one to use based on capabilities of $DLLTOOL
|
# decide which one to use based on capabilities of $DLLTOOL
|
||||||
case `$DLLTOOL --help 2>&1` in
|
case `$DLLTOOL --help 2>&1` in
|
||||||
@@ -3929,7 +3922,7 @@ case $host_os in
|
|||||||
aix*)
|
aix*)
|
||||||
symcode='[[BCDT]]'
|
symcode='[[BCDT]]'
|
||||||
;;
|
;;
|
||||||
cygwin* | mingw* | pw32* | cegcc*)
|
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||||
symcode='[[ABCDGISTW]]'
|
symcode='[[ABCDGISTW]]'
|
||||||
;;
|
;;
|
||||||
hpux*)
|
hpux*)
|
||||||
@@ -4008,7 +4001,7 @@ $lt_c_name_lib_hook\
|
|||||||
# Handle CRLF in mingw tool chain
|
# Handle CRLF in mingw tool chain
|
||||||
opt_cr=
|
opt_cr=
|
||||||
case $build_os in
|
case $build_os in
|
||||||
mingw*)
|
mingw* | windows*)
|
||||||
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
|
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -4023,7 +4016,7 @@ for ac_symprfx in "" "_"; do
|
|||||||
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
|
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
|
||||||
# Fake it for dumpbin and say T for any non-static function,
|
# Fake it for dumpbin and say T for any non-static function,
|
||||||
# D for any global variable and I for any imported variable.
|
# D for any global variable and I for any imported variable.
|
||||||
# Also find C++ and __fastcall symbols from MSVC++,
|
# Also find C++ and __fastcall symbols from MSVC++ or ICC,
|
||||||
# which start with @ or ?.
|
# which start with @ or ?.
|
||||||
lt_cv_sys_global_symbol_pipe="$AWK ['"\
|
lt_cv_sys_global_symbol_pipe="$AWK ['"\
|
||||||
" {last_section=section; section=\$ 3};"\
|
" {last_section=section; section=\$ 3};"\
|
||||||
@@ -4235,7 +4228,7 @@ m4_if([$1], [CXX], [
|
|||||||
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
|
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
|
||||||
# PIC is the default for these OSes.
|
# PIC is the default for these OSes.
|
||||||
;;
|
;;
|
||||||
mingw* | cygwin* | os2* | pw32* | cegcc*)
|
mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
|
||||||
# This hack is so that the source file can tell whether it is being
|
# This hack is so that the source file can tell whether it is being
|
||||||
# built for inclusion in a dll (and should export symbols for example).
|
# built for inclusion in a dll (and should export symbols for example).
|
||||||
# Although the cygwin gcc ignores -fPIC, still need this for old-style
|
# Although the cygwin gcc ignores -fPIC, still need this for old-style
|
||||||
@@ -4311,7 +4304,7 @@ m4_if([$1], [CXX], [
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
mingw* | cygwin* | os2* | pw32* | cegcc*)
|
mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
|
||||||
# This hack is so that the source file can tell whether it is being
|
# This hack is so that the source file can tell whether it is being
|
||||||
# built for inclusion in a dll (and should export symbols for example).
|
# built for inclusion in a dll (and should export symbols for example).
|
||||||
m4_if([$1], [GCJ], [],
|
m4_if([$1], [GCJ], [],
|
||||||
@@ -4559,7 +4552,7 @@ m4_if([$1], [CXX], [
|
|||||||
# PIC is the default for these OSes.
|
# PIC is the default for these OSes.
|
||||||
;;
|
;;
|
||||||
|
|
||||||
mingw* | cygwin* | pw32* | os2* | cegcc*)
|
mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
|
||||||
# This hack is so that the source file can tell whether it is being
|
# This hack is so that the source file can tell whether it is being
|
||||||
# built for inclusion in a dll (and should export symbols for example).
|
# built for inclusion in a dll (and should export symbols for example).
|
||||||
# Although the cygwin gcc ignores -fPIC, still need this for old-style
|
# Although the cygwin gcc ignores -fPIC, still need this for old-style
|
||||||
@@ -4663,7 +4656,7 @@ m4_if([$1], [CXX], [
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
mingw* | cygwin* | pw32* | os2* | cegcc*)
|
mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
|
||||||
# This hack is so that the source file can tell whether it is being
|
# This hack is so that the source file can tell whether it is being
|
||||||
# built for inclusion in a dll (and should export symbols for example).
|
# built for inclusion in a dll (and should export symbols for example).
|
||||||
m4_if([$1], [GCJ], [],
|
m4_if([$1], [GCJ], [],
|
||||||
@@ -4938,9 +4931,9 @@ m4_if([$1], [CXX], [
|
|||||||
pw32*)
|
pw32*)
|
||||||
_LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
|
_LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
|
||||||
;;
|
;;
|
||||||
cygwin* | mingw* | cegcc*)
|
cygwin* | mingw* | windows* | cegcc*)
|
||||||
case $cc_basename in
|
case $cc_basename in
|
||||||
cl*)
|
cl* | icl*)
|
||||||
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -4996,16 +4989,16 @@ dnl Note also adjust exclude_expsyms for C++ above.
|
|||||||
extract_expsyms_cmds=
|
extract_expsyms_cmds=
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
cygwin* | mingw* | pw32* | cegcc*)
|
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
# FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
|
||||||
# When not using gcc, we currently assume that we are using
|
# When not using gcc, we currently assume that we are using
|
||||||
# Microsoft Visual C++.
|
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||||
if test yes != "$GCC"; then
|
if test yes != "$GCC"; then
|
||||||
with_gnu_ld=no
|
with_gnu_ld=no
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
interix*)
|
interix*)
|
||||||
# we just hope/assume this is gcc and not c89 (= MSVC++)
|
# we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
|
||||||
with_gnu_ld=yes
|
with_gnu_ld=yes
|
||||||
;;
|
;;
|
||||||
openbsd* | bitrig*)
|
openbsd* | bitrig*)
|
||||||
@@ -5111,7 +5104,7 @@ _LT_EOF
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
cygwin* | mingw* | pw32* | cegcc*)
|
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||||
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
|
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
|
||||||
# as there is no search path for DLLs.
|
# as there is no search path for DLLs.
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
|
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
|
||||||
@@ -5568,14 +5561,14 @@ _LT_EOF
|
|||||||
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
|
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
|
||||||
;;
|
;;
|
||||||
|
|
||||||
cygwin* | mingw* | pw32* | cegcc*)
|
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||||
# When not using gcc, we currently assume that we are using
|
# When not using gcc, we currently assume that we are using
|
||||||
# Microsoft Visual C++.
|
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||||
# no search path for DLLs.
|
# no search path for DLLs.
|
||||||
case $cc_basename in
|
case $cc_basename in
|
||||||
cl*)
|
cl* | icl*)
|
||||||
# Native MSVC
|
# Native MSVC or ICC
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||||
_LT_TAGVAR(always_export_symbols, $1)=yes
|
_LT_TAGVAR(always_export_symbols, $1)=yes
|
||||||
@@ -5585,14 +5578,14 @@ _LT_EOF
|
|||||||
# Tell ltmain to make .dll files, not .so files.
|
# Tell ltmain to make .dll files, not .so files.
|
||||||
shrext_cmds=.dll
|
shrext_cmds=.dll
|
||||||
# FIXME: Setting linknames here is a bad hack.
|
# FIXME: Setting linknames here is a bad hack.
|
||||||
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
|
_LT_TAGVAR(archive_cmds, $1)='$CC -Fe $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
|
||||||
_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
|
_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
|
||||||
cp "$export_symbols" "$output_objdir/$soname.def";
|
cp "$export_symbols" "$output_objdir/$soname.def";
|
||||||
echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
|
echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
|
||||||
else
|
else
|
||||||
$SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
|
$SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
|
||||||
fi~
|
fi~
|
||||||
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
|
$CC -Fe $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
|
||||||
linknames='
|
linknames='
|
||||||
# The linker will not automatically build a static lib if we build a DLL.
|
# The linker will not automatically build a static lib if we build a DLL.
|
||||||
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
|
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
|
||||||
@@ -5616,7 +5609,7 @@ _LT_EOF
|
|||||||
fi'
|
fi'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Assume MSVC wrapper
|
# Assume MSVC and ICC wrapper
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||||
# Tell ltmain to make .lib files, not .a files.
|
# Tell ltmain to make .lib files, not .a files.
|
||||||
@@ -6435,7 +6428,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||||||
# Commands to make compiler produce verbose output that lists
|
# Commands to make compiler produce verbose output that lists
|
||||||
# what "hidden" libraries, object files and flags are used when
|
# what "hidden" libraries, object files and flags are used when
|
||||||
# linking a shared library.
|
# linking a shared library.
|
||||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||||
|
|
||||||
else
|
else
|
||||||
GXX=no
|
GXX=no
|
||||||
@@ -6644,10 +6637,10 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
cygwin* | mingw* | pw32* | cegcc*)
|
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||||
case $GXX,$cc_basename in
|
case $GXX,$cc_basename in
|
||||||
,cl* | no,cl*)
|
,cl* | no,cl* | ,icl* | no,icl*)
|
||||||
# Native MSVC
|
# Native MSVC or ICC
|
||||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||||
# no search path for DLLs.
|
# no search path for DLLs.
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||||
@@ -6811,7 +6804,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||||||
# explicitly linking system object files so we need to strip them
|
# explicitly linking system object files so we need to strip them
|
||||||
# from the output so that they don't get included in the library
|
# from the output so that they don't get included in the library
|
||||||
# dependencies.
|
# dependencies.
|
||||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "[[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if test yes = "$GXX"; then
|
if test yes = "$GXX"; then
|
||||||
@@ -6876,7 +6869,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||||||
# explicitly linking system object files so we need to strip them
|
# explicitly linking system object files so we need to strip them
|
||||||
# from the output so that they don't get included in the library
|
# from the output so that they don't get included in the library
|
||||||
# dependencies.
|
# dependencies.
|
||||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "[[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if test yes = "$GXX"; then
|
if test yes = "$GXX"; then
|
||||||
@@ -7215,7 +7208,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||||||
# Commands to make compiler produce verbose output that lists
|
# Commands to make compiler produce verbose output that lists
|
||||||
# what "hidden" libraries, object files and flags are used when
|
# what "hidden" libraries, object files and flags are used when
|
||||||
# linking a shared library.
|
# linking a shared library.
|
||||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||||
|
|
||||||
else
|
else
|
||||||
# FIXME: insert proper C++ library support
|
# FIXME: insert proper C++ library support
|
||||||
@@ -7299,7 +7292,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||||||
# Commands to make compiler produce verbose output that lists
|
# Commands to make compiler produce verbose output that lists
|
||||||
# what "hidden" libraries, object files and flags are used when
|
# what "hidden" libraries, object files and flags are used when
|
||||||
# linking a shared library.
|
# linking a shared library.
|
||||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||||
else
|
else
|
||||||
# g++ 2.7 appears to require '-G' NOT '-shared' on this
|
# g++ 2.7 appears to require '-G' NOT '-shared' on this
|
||||||
# platform.
|
# platform.
|
||||||
@@ -7310,7 +7303,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||||||
# Commands to make compiler produce verbose output that lists
|
# Commands to make compiler produce verbose output that lists
|
||||||
# what "hidden" libraries, object files and flags are used when
|
# what "hidden" libraries, object files and flags are used when
|
||||||
# linking a shared library.
|
# linking a shared library.
|
||||||
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
|
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
|
||||||
@@ -8331,7 +8324,7 @@ AC_CACHE_VAL(lt_cv_to_host_file_cmd,
|
|||||||
[case $host in
|
[case $host in
|
||||||
*-*-mingw* )
|
*-*-mingw* )
|
||||||
case $build in
|
case $build in
|
||||||
*-*-mingw* ) # actually msys
|
*-*-mingw* | *-*-windows* ) # actually msys
|
||||||
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
|
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
|
||||||
;;
|
;;
|
||||||
*-*-cygwin* )
|
*-*-cygwin* )
|
||||||
@@ -8344,7 +8337,7 @@ AC_CACHE_VAL(lt_cv_to_host_file_cmd,
|
|||||||
;;
|
;;
|
||||||
*-*-cygwin* )
|
*-*-cygwin* )
|
||||||
case $build in
|
case $build in
|
||||||
*-*-mingw* ) # actually msys
|
*-*-mingw* | *-*-windows* ) # actually msys
|
||||||
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
|
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
|
||||||
;;
|
;;
|
||||||
*-*-cygwin* )
|
*-*-cygwin* )
|
||||||
@@ -8370,9 +8363,9 @@ AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
|
|||||||
[#assume ordinary cross tools, or native build.
|
[#assume ordinary cross tools, or native build.
|
||||||
lt_cv_to_tool_file_cmd=func_convert_file_noop
|
lt_cv_to_tool_file_cmd=func_convert_file_noop
|
||||||
case $host in
|
case $host in
|
||||||
*-*-mingw* )
|
*-*-mingw* | *-*-windows* )
|
||||||
case $build in
|
case $build in
|
||||||
*-*-mingw* ) # actually msys
|
*-*-mingw* | *-*-windows* ) # actually msys
|
||||||
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
|
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
2
acinclude/ltoptions.m4
vendored
2
acinclude/ltoptions.m4
vendored
@@ -128,7 +128,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
|||||||
[enable_win32_dll=yes
|
[enable_win32_dll=yes
|
||||||
|
|
||||||
case $host in
|
case $host in
|
||||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-cegcc*)
|
||||||
AC_CHECK_TOOL(AS, as, false)
|
AC_CHECK_TOOL(AS, as, false)
|
||||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||||
|
@@ -8,22 +8,22 @@ else {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 31
|
if (buildAsApplication) {
|
||||||
|
namespace "org.libsdl.app"
|
||||||
|
}
|
||||||
|
compileSdkVersion 34
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
if (buildAsApplication) {
|
minSdkVersion 19
|
||||||
applicationId "org.libsdl.app"
|
targetSdkVersion 34
|
||||||
}
|
|
||||||
minSdkVersion 16
|
|
||||||
targetSdkVersion 31
|
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
ndkBuild {
|
ndkBuild {
|
||||||
arguments "APP_PLATFORM=android-16"
|
arguments "APP_PLATFORM=android-19"
|
||||||
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||||
}
|
}
|
||||||
// cmake {
|
// cmake {
|
||||||
// arguments "-DANDROID_APP_PLATFORM=android-16", "-DANDROID_STL=c++_static"
|
// arguments "-DANDROID_APP_PLATFORM=android-19", "-DANDROID_STL=c++_static"
|
||||||
// // abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
// // abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||||
// abiFilters 'arm64-v8a'
|
// abiFilters 'arm64-v8a'
|
||||||
// }
|
// }
|
||||||
@@ -53,10 +53,10 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
lintOptions {
|
lint {
|
||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buildAsLibrary) {
|
if (buildAsLibrary) {
|
||||||
libraryVariants.all { variant ->
|
libraryVariants.all { variant ->
|
||||||
variant.outputs.each { output ->
|
variant.outputs.each { output ->
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
com.gamemaker.game
|
com.gamemaker.game
|
||||||
-->
|
-->
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.libsdl.app"
|
|
||||||
android:versionCode="1"
|
android:versionCode="1"
|
||||||
android:versionName="1.0"
|
android:versionName="1.0"
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
@@ -63,7 +62,7 @@
|
|||||||
<application android:label="@string/app_name"
|
<application android:label="@string/app_name"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
android:theme="@style/AppTheme"
|
||||||
android:hardwareAccelerated="true" >
|
android:hardwareAccelerated="true" >
|
||||||
|
|
||||||
<!-- Example of setting SDL hints from AndroidManifest.xml:
|
<!-- Example of setting SDL hints from AndroidManifest.xml:
|
||||||
|
@@ -186,7 +186,7 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
|
|||||||
// Because on Chromebooks we show up as a dual-mode device, it will attempt to connect TRANSPORT_AUTO, which will use TRANSPORT_BREDR instead
|
// Because on Chromebooks we show up as a dual-mode device, it will attempt to connect TRANSPORT_AUTO, which will use TRANSPORT_BREDR instead
|
||||||
// of TRANSPORT_LE. Let's force ourselves to connect low energy.
|
// of TRANSPORT_LE. Let's force ourselves to connect low energy.
|
||||||
private BluetoothGatt connectGatt(boolean managed) {
|
private BluetoothGatt connectGatt(boolean managed) {
|
||||||
if (Build.VERSION.SDK_INT >= 23) {
|
if (Build.VERSION.SDK_INT >= 23 /* Android 6.0 (M) */) {
|
||||||
try {
|
try {
|
||||||
return mDevice.connectGatt(mManager.getContext(), managed, this, TRANSPORT_LE);
|
return mDevice.connectGatt(mManager.getContext(), managed, this, TRANSPORT_LE);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -429,7 +429,7 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (newState == 0) {
|
else if (newState == 0) {
|
||||||
mIsConnected = false;
|
mIsConnected = false;
|
||||||
}
|
}
|
||||||
|
@@ -170,7 +170,7 @@ public class HIDDeviceManager {
|
|||||||
Log.i(TAG," Interface protocol: " + mUsbInterface.getInterfaceProtocol());
|
Log.i(TAG," Interface protocol: " + mUsbInterface.getInterfaceProtocol());
|
||||||
Log.i(TAG," Endpoint count: " + mUsbInterface.getEndpointCount());
|
Log.i(TAG," Endpoint count: " + mUsbInterface.getEndpointCount());
|
||||||
|
|
||||||
// Get endpoint details
|
// Get endpoint details
|
||||||
for (int epi = 0; epi < mUsbInterface.getEndpointCount(); epi++)
|
for (int epi = 0; epi < mUsbInterface.getEndpointCount(); epi++)
|
||||||
{
|
{
|
||||||
UsbEndpoint mEndpoint = mUsbInterface.getEndpoint(epi);
|
UsbEndpoint mEndpoint = mUsbInterface.getEndpoint(epi);
|
||||||
@@ -251,6 +251,8 @@ public class HIDDeviceManager {
|
|||||||
0x20d6, // PowerA
|
0x20d6, // PowerA
|
||||||
0x24c6, // PowerA
|
0x24c6, // PowerA
|
||||||
0x2c22, // Qanba
|
0x2c22, // Qanba
|
||||||
|
0x2dc8, // 8BitDo
|
||||||
|
0x9886, // ASTRO Gaming
|
||||||
};
|
};
|
||||||
|
|
||||||
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
|
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
|
||||||
@@ -271,15 +273,19 @@ public class HIDDeviceManager {
|
|||||||
final int XB1_IFACE_SUBCLASS = 71;
|
final int XB1_IFACE_SUBCLASS = 71;
|
||||||
final int XB1_IFACE_PROTOCOL = 208;
|
final int XB1_IFACE_PROTOCOL = 208;
|
||||||
final int[] SUPPORTED_VENDORS = {
|
final int[] SUPPORTED_VENDORS = {
|
||||||
|
0x03f0, // HP
|
||||||
|
0x044f, // Thrustmaster
|
||||||
0x045e, // Microsoft
|
0x045e, // Microsoft
|
||||||
0x0738, // Mad Catz
|
0x0738, // Mad Catz
|
||||||
0x0e6f, // PDP
|
0x0e6f, // PDP
|
||||||
0x0f0d, // Hori
|
0x0f0d, // Hori
|
||||||
|
0x10f5, // Turtle Beach
|
||||||
0x1532, // Razer Wildcat
|
0x1532, // Razer Wildcat
|
||||||
0x20d6, // PowerA
|
0x20d6, // PowerA
|
||||||
0x24c6, // PowerA
|
0x24c6, // PowerA
|
||||||
0x2dc8, /* 8BitDo */
|
0x2dc8, // 8BitDo
|
||||||
0x2e24, // Hyperkin
|
0x2e24, // Hyperkin
|
||||||
|
0x3537, // GameSir
|
||||||
};
|
};
|
||||||
|
|
||||||
if (usbInterface.getId() == 0 &&
|
if (usbInterface.getId() == 0 &&
|
||||||
@@ -353,13 +359,19 @@ public class HIDDeviceManager {
|
|||||||
private void initializeBluetooth() {
|
private void initializeBluetooth() {
|
||||||
Log.d(TAG, "Initializing Bluetooth");
|
Log.d(TAG, "Initializing Bluetooth");
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT <= 30 &&
|
if (Build.VERSION.SDK_INT >= 31 /* Android 12 */ &&
|
||||||
|
mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH_CONNECT, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
|
||||||
|
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH_CONNECT");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT <= 30 /* Android 11.0 (R) */ &&
|
||||||
mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
|
mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
|
||||||
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH");
|
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE) || (Build.VERSION.SDK_INT < 18)) {
|
if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE) || (Build.VERSION.SDK_INT < 18 /* Android 4.3 (JELLY_BEAN_MR2) */)) {
|
||||||
Log.d(TAG, "Couldn't initialize Bluetooth, this version of Android does not support Bluetooth LE");
|
Log.d(TAG, "Couldn't initialize Bluetooth, this version of Android does not support Bluetooth LE");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -524,7 +536,7 @@ public class HIDDeviceManager {
|
|||||||
for (HIDDevice device : mDevicesById.values()) {
|
for (HIDDevice device : mDevicesById.values()) {
|
||||||
device.setFrozen(frozen);
|
device.setFrozen(frozen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -573,7 +585,7 @@ public class HIDDeviceManager {
|
|||||||
try {
|
try {
|
||||||
final int FLAG_MUTABLE = 0x02000000; // PendingIntent.FLAG_MUTABLE, but don't require SDK 31
|
final int FLAG_MUTABLE = 0x02000000; // PendingIntent.FLAG_MUTABLE, but don't require SDK 31
|
||||||
int flags;
|
int flags;
|
||||||
if (Build.VERSION.SDK_INT >= 31) {
|
if (Build.VERSION.SDK_INT >= 31 /* Android 12.0 (S) */) {
|
||||||
flags = FLAG_MUTABLE;
|
flags = FLAG_MUTABLE;
|
||||||
} else {
|
} else {
|
||||||
flags = 0;
|
flags = 0;
|
||||||
|
@@ -52,7 +52,7 @@ class HIDDeviceUSB implements HIDDevice {
|
|||||||
@Override
|
@Override
|
||||||
public String getSerialNumber() {
|
public String getSerialNumber() {
|
||||||
String result = null;
|
String result = null;
|
||||||
if (Build.VERSION.SDK_INT >= 21) {
|
if (Build.VERSION.SDK_INT >= 21 /* Android 5.0 (LOLLIPOP) */) {
|
||||||
try {
|
try {
|
||||||
result = mDevice.getSerialNumber();
|
result = mDevice.getSerialNumber();
|
||||||
}
|
}
|
||||||
@@ -74,7 +74,7 @@ class HIDDeviceUSB implements HIDDevice {
|
|||||||
@Override
|
@Override
|
||||||
public String getManufacturerName() {
|
public String getManufacturerName() {
|
||||||
String result = null;
|
String result = null;
|
||||||
if (Build.VERSION.SDK_INT >= 21) {
|
if (Build.VERSION.SDK_INT >= 21 /* Android 5.0 (LOLLIPOP) */) {
|
||||||
result = mDevice.getManufacturerName();
|
result = mDevice.getManufacturerName();
|
||||||
}
|
}
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
@@ -86,7 +86,7 @@ class HIDDeviceUSB implements HIDDevice {
|
|||||||
@Override
|
@Override
|
||||||
public String getProductName() {
|
public String getProductName() {
|
||||||
String result = null;
|
String result = null;
|
||||||
if (Build.VERSION.SDK_INT >= 21) {
|
if (Build.VERSION.SDK_INT >= 21 /* Android 5.0 (LOLLIPOP) */) {
|
||||||
result = mDevice.getProductName();
|
result = mDevice.getProductName();
|
||||||
}
|
}
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
|
@@ -29,6 +29,7 @@ public class SDL {
|
|||||||
|
|
||||||
// This function stores the current activity (SDL or not)
|
// This function stores the current activity (SDL or not)
|
||||||
public static void setContext(Context context) {
|
public static void setContext(Context context) {
|
||||||
|
SDLAudioManager.setContext(context);
|
||||||
mContext = context;
|
mContext = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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 = 2;
|
private static final int SDL_MAJOR_VERSION = 2;
|
||||||
private static final int SDL_MINOR_VERSION = 26;
|
private static final int SDL_MINOR_VERSION = 30;
|
||||||
private static final int SDL_MICRO_VERSION = 0;
|
private static final int SDL_MICRO_VERSION = 4;
|
||||||
/*
|
/*
|
||||||
// Display InputType.SOURCE/CLASS of events and devices
|
// Display InputType.SOURCE/CLASS of events and devices
|
||||||
//
|
//
|
||||||
@@ -93,7 +93,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
|
|
||||||
s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class;
|
s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class;
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= 23) {
|
||||||
tst = InputDevice.SOURCE_BLUETOOTH_STYLUS;
|
tst = InputDevice.SOURCE_BLUETOOTH_STYLUS;
|
||||||
if ((s & tst) == tst) src += " BLUETOOTH_STYLUS";
|
if ((s & tst) == tst) src += " BLUETOOTH_STYLUS";
|
||||||
s2 &= ~tst;
|
s2 &= ~tst;
|
||||||
@@ -107,7 +107,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
if ((s & tst) == tst) src += " GAMEPAD";
|
if ((s & tst) == tst) src += " GAMEPAD";
|
||||||
s2 &= ~tst;
|
s2 &= ~tst;
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= 21) {
|
||||||
tst = InputDevice.SOURCE_HDMI;
|
tst = InputDevice.SOURCE_HDMI;
|
||||||
if ((s & tst) == tst) src += " HDMI";
|
if ((s & tst) == tst) src += " HDMI";
|
||||||
s2 &= ~tst;
|
s2 &= ~tst;
|
||||||
@@ -146,7 +146,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
if ((s & tst) == tst) src += " TOUCHSCREEN";
|
if ((s & tst) == tst) src += " TOUCHSCREEN";
|
||||||
s2 &= ~tst;
|
s2 &= ~tst;
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
if (Build.VERSION.SDK_INT >= 18) {
|
||||||
tst = InputDevice.SOURCE_TOUCH_NAVIGATION;
|
tst = InputDevice.SOURCE_TOUCH_NAVIGATION;
|
||||||
if ((s & tst) == tst) src += " TOUCH_NAVIGATION";
|
if ((s & tst) == tst) src += " TOUCH_NAVIGATION";
|
||||||
s2 &= ~tst;
|
s2 &= ~tst;
|
||||||
@@ -170,7 +170,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public static boolean mIsResumedCalled, mHasFocus;
|
public static boolean mIsResumedCalled, mHasFocus;
|
||||||
public static final boolean mHasMultiWindow = (Build.VERSION.SDK_INT >= 24);
|
public static final boolean mHasMultiWindow = (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */);
|
||||||
|
|
||||||
// Cursor types
|
// Cursor types
|
||||||
// private static final int SDL_SYSTEM_CURSOR_NONE = -1;
|
// private static final int SDL_SYSTEM_CURSOR_NONE = -1;
|
||||||
@@ -224,9 +224,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
|
|
||||||
protected static SDLGenericMotionListener_API12 getMotionListener() {
|
protected static SDLGenericMotionListener_API12 getMotionListener() {
|
||||||
if (mMotionListener == null) {
|
if (mMotionListener == null) {
|
||||||
if (Build.VERSION.SDK_INT >= 26) {
|
if (Build.VERSION.SDK_INT >= 26 /* Android 8.0 (O) */) {
|
||||||
mMotionListener = new SDLGenericMotionListener_API26();
|
mMotionListener = new SDLGenericMotionListener_API26();
|
||||||
} else if (Build.VERSION.SDK_INT >= 24) {
|
} else if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||||
mMotionListener = new SDLGenericMotionListener_API24();
|
mMotionListener = new SDLGenericMotionListener_API24();
|
||||||
} else {
|
} else {
|
||||||
mMotionListener = new SDLGenericMotionListener_API12();
|
mMotionListener = new SDLGenericMotionListener_API12();
|
||||||
@@ -393,7 +393,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
mHIDDeviceManager = HIDDeviceManager.acquire(this);
|
mHIDDeviceManager = HIDDeviceManager.acquire(this);
|
||||||
|
|
||||||
// Set up the surface
|
// Set up the surface
|
||||||
mSurface = createSDLSurface(getApplication());
|
mSurface = createSDLSurface(this);
|
||||||
|
|
||||||
mLayout = new RelativeLayout(this);
|
mLayout = new RelativeLayout(this);
|
||||||
mLayout.addView(mSurface);
|
mLayout.addView(mSurface);
|
||||||
@@ -404,7 +404,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
SDLActivity.onNativeOrientationChanged(mCurrentOrientation);
|
SDLActivity.onNativeOrientationChanged(mCurrentOrientation);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (Build.VERSION.SDK_INT < 24) {
|
if (Build.VERSION.SDK_INT < 24 /* Android 7.0 (N) */) {
|
||||||
mCurrentLocale = getContext().getResources().getConfiguration().locale;
|
mCurrentLocale = getContext().getResources().getConfiguration().locale;
|
||||||
} else {
|
} else {
|
||||||
mCurrentLocale = getContext().getResources().getConfiguration().getLocales().get(0);
|
mCurrentLocale = getContext().getResources().getConfiguration().getLocales().get(0);
|
||||||
@@ -588,6 +588,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
mHIDDeviceManager = null;
|
mHIDDeviceManager = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SDLAudioManager.release(this);
|
||||||
|
|
||||||
if (SDLActivity.mBrokenLibraries) {
|
if (SDLActivity.mBrokenLibraries) {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
return;
|
return;
|
||||||
@@ -766,7 +768,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case COMMAND_CHANGE_WINDOW_STYLE:
|
case COMMAND_CHANGE_WINDOW_STYLE:
|
||||||
if (Build.VERSION.SDK_INT >= 19) {
|
if (Build.VERSION.SDK_INT >= 19 /* Android 4.4 (KITKAT) */) {
|
||||||
if (context instanceof Activity) {
|
if (context instanceof Activity) {
|
||||||
Window window = ((Activity) context).getWindow();
|
Window window = ((Activity) context).getWindow();
|
||||||
if (window != null) {
|
if (window != null) {
|
||||||
@@ -841,7 +843,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
msg.obj = data;
|
msg.obj = data;
|
||||||
boolean result = commandHandler.sendMessage(msg);
|
boolean result = commandHandler.sendMessage(msg);
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= 19) {
|
if (Build.VERSION.SDK_INT >= 19 /* Android 4.4 (KITKAT) */) {
|
||||||
if (command == COMMAND_CHANGE_WINDOW_STYLE) {
|
if (command == COMMAND_CHANGE_WINDOW_STYLE) {
|
||||||
// Ensure we don't return until the resize has actually happened,
|
// Ensure we don't return until the resize has actually happened,
|
||||||
// or 500ms have passed.
|
// or 500ms have passed.
|
||||||
@@ -969,15 +971,18 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
/* If set, hint "explicitly controls which UI orientations are allowed". */
|
/* If set, hint "explicitly controls which UI orientations are allowed". */
|
||||||
if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft")) {
|
if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft")) {
|
||||||
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
|
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
|
||||||
} else if (hint.contains("LandscapeRight")) {
|
|
||||||
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
|
|
||||||
} else if (hint.contains("LandscapeLeft")) {
|
} else if (hint.contains("LandscapeLeft")) {
|
||||||
|
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
|
||||||
|
} else if (hint.contains("LandscapeRight")) {
|
||||||
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
|
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hint.contains("Portrait") && hint.contains("PortraitUpsideDown")) {
|
/* exact match to 'Portrait' to distinguish with PortraitUpsideDown */
|
||||||
|
boolean contains_Portrait = hint.contains("Portrait ") || hint.endsWith("Portrait");
|
||||||
|
|
||||||
|
if (contains_Portrait && hint.contains("PortraitUpsideDown")) {
|
||||||
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
|
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
|
||||||
} else if (hint.contains("Portrait")) {
|
} else if (contains_Portrait) {
|
||||||
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||||
} else if (hint.contains("PortraitUpsideDown")) {
|
} else if (hint.contains("PortraitUpsideDown")) {
|
||||||
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
|
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
|
||||||
@@ -990,8 +995,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
/* No valid hint, nothing is explicitly allowed */
|
/* No valid hint, nothing is explicitly allowed */
|
||||||
if (!is_portrait_allowed && !is_landscape_allowed) {
|
if (!is_portrait_allowed && !is_landscape_allowed) {
|
||||||
if (resizable) {
|
if (resizable) {
|
||||||
/* All orientations are allowed */
|
/* All orientations are allowed, respecting user orientation lock setting */
|
||||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
|
req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
|
||||||
} else {
|
} else {
|
||||||
/* Fixed window and nothing specified. Get orientation from w/h of created window */
|
/* Fixed window and nothing specified. Get orientation from w/h of created window */
|
||||||
req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
|
req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
|
||||||
@@ -1000,8 +1005,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
/* At least one orientation is allowed */
|
/* At least one orientation is allowed */
|
||||||
if (resizable) {
|
if (resizable) {
|
||||||
if (is_portrait_allowed && is_landscape_allowed) {
|
if (is_portrait_allowed && is_landscape_allowed) {
|
||||||
/* hint allows both landscape and portrait, promote to full sensor */
|
/* hint allows both landscape and portrait, promote to full user */
|
||||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
|
req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
|
||||||
} else {
|
} else {
|
||||||
/* Use the only one allowed "orientation" */
|
/* Use the only one allowed "orientation" */
|
||||||
req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
|
req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
|
||||||
@@ -1090,7 +1095,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
// thus SDK version 27. If we are in DeX mode and not API 27 or higher, as a result,
|
// thus SDK version 27. If we are in DeX mode and not API 27 or higher, as a result,
|
||||||
// we should stick to relative mode.
|
// we should stick to relative mode.
|
||||||
//
|
//
|
||||||
if ((Build.VERSION.SDK_INT < 27) && isDeXMode()) {
|
if (Build.VERSION.SDK_INT < 27 /* Android 8.1 (O_MR1) */ && isDeXMode()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1180,7 +1185,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
* This method is called by SDL using JNI.
|
* This method is called by SDL using JNI.
|
||||||
*/
|
*/
|
||||||
public static boolean isDeXMode() {
|
public static boolean isDeXMode() {
|
||||||
if (Build.VERSION.SDK_INT < 24) {
|
if (Build.VERSION.SDK_INT < 24 /* Android 7.0 (N) */) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@@ -1340,23 +1345,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((source & InputDevice.SOURCE_KEYBOARD) == InputDevice.SOURCE_KEYBOARD) {
|
|
||||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
|
||||||
if (isTextInputEvent(event)) {
|
|
||||||
if (ic != null) {
|
|
||||||
ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
|
||||||
} else {
|
|
||||||
SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onNativeKeyDown(keyCode);
|
|
||||||
return true;
|
|
||||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
|
||||||
onNativeKeyUp(keyCode);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((source & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) {
|
if ((source & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) {
|
||||||
// on some devices key events are sent for mouse BUTTON_BACK/FORWARD presses
|
// on some devices key events are sent for mouse BUTTON_BACK/FORWARD presses
|
||||||
// they are ignored here because sending them as mouse input to SDL is messy
|
// they are ignored here because sending them as mouse input to SDL is messy
|
||||||
@@ -1371,6 +1359,21 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||||
|
if (isTextInputEvent(event)) {
|
||||||
|
if (ic != null) {
|
||||||
|
ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||||
|
} else {
|
||||||
|
SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onNativeKeyDown(keyCode);
|
||||||
|
return true;
|
||||||
|
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||||
|
onNativeKeyUp(keyCode);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1617,7 +1620,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
private final Runnable rehideSystemUi = new Runnable() {
|
private final Runnable rehideSystemUi = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (Build.VERSION.SDK_INT >= 19) {
|
if (Build.VERSION.SDK_INT >= 19 /* Android 4.4 (KITKAT) */) {
|
||||||
int flags = View.SYSTEM_UI_FLAG_FULLSCREEN |
|
int flags = View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||||
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
|
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
|
||||||
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
|
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
|
||||||
@@ -1670,7 +1673,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
Bitmap bitmap = Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888);
|
Bitmap bitmap = Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888);
|
||||||
++mLastCursorID;
|
++mLastCursorID;
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= 24) {
|
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||||
try {
|
try {
|
||||||
mCursors.put(mLastCursorID, PointerIcon.create(bitmap, hotSpotX, hotSpotY));
|
mCursors.put(mLastCursorID, PointerIcon.create(bitmap, hotSpotX, hotSpotY));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -1686,7 +1689,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
* This method is called by SDL using JNI.
|
* This method is called by SDL using JNI.
|
||||||
*/
|
*/
|
||||||
public static void destroyCustomCursor(int cursorID) {
|
public static void destroyCustomCursor(int cursorID) {
|
||||||
if (Build.VERSION.SDK_INT >= 24) {
|
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||||
try {
|
try {
|
||||||
mCursors.remove(cursorID);
|
mCursors.remove(cursorID);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -1700,7 +1703,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
*/
|
*/
|
||||||
public static boolean setCustomCursor(int cursorID) {
|
public static boolean setCustomCursor(int cursorID) {
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= 24) {
|
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||||
try {
|
try {
|
||||||
mSurface.setPointerIcon(mCursors.get(cursorID));
|
mSurface.setPointerIcon(mCursors.get(cursorID));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -1755,7 +1758,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
cursor_type = 1002; //PointerIcon.TYPE_HAND;
|
cursor_type = 1002; //PointerIcon.TYPE_HAND;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (Build.VERSION.SDK_INT >= 24) {
|
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||||
try {
|
try {
|
||||||
mSurface.setPointerIcon(PointerIcon.getSystemIcon(SDL.getContext(), cursor_type));
|
mSurface.setPointerIcon(PointerIcon.getSystemIcon(SDL.getContext(), cursor_type));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -1769,7 +1772,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
* This method is called by SDL using JNI.
|
* This method is called by SDL using JNI.
|
||||||
*/
|
*/
|
||||||
public static void requestPermission(String permission, int requestCode) {
|
public static void requestPermission(String permission, int requestCode) {
|
||||||
if (Build.VERSION.SDK_INT < 23) {
|
if (Build.VERSION.SDK_INT < 23 /* Android 6.0 (M) */) {
|
||||||
nativePermissionResult(requestCode, true);
|
nativePermissionResult(requestCode, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1798,7 +1801,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
i.setData(Uri.parse(url));
|
i.setData(Uri.parse(url));
|
||||||
|
|
||||||
int flags = Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_MULTIPLE_TASK;
|
int flags = Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_MULTIPLE_TASK;
|
||||||
if (Build.VERSION.SDK_INT >= 21) {
|
if (Build.VERSION.SDK_INT >= 21 /* Android 5.0 (LOLLIPOP) */) {
|
||||||
flags |= Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
|
flags |= Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
|
||||||
} else {
|
} else {
|
||||||
flags |= Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET;
|
flags |= Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET;
|
||||||
@@ -2002,6 +2005,18 @@ 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
|
||||||
|
// and https://bugzilla.libsdl.org/show_bug.cgi?id=2265
|
||||||
|
if (beforeLength > 0 && afterLength == 0) {
|
||||||
|
// backspace(s)
|
||||||
|
while (beforeLength-- > 0) {
|
||||||
|
nativeGenerateScancodeForUnichar('\b');
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!super.deleteSurroundingText(beforeLength, afterLength)) {
|
if (!super.deleteSurroundingText(beforeLength, afterLength)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
package org.libsdl.app;
|
package org.libsdl.app;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.media.AudioDeviceCallback;
|
||||||
|
import android.media.AudioDeviceInfo;
|
||||||
import android.media.AudioFormat;
|
import android.media.AudioFormat;
|
||||||
import android.media.AudioManager;
|
import android.media.AudioManager;
|
||||||
import android.media.AudioRecord;
|
import android.media.AudioRecord;
|
||||||
@@ -8,34 +11,67 @@ import android.media.MediaRecorder;
|
|||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
public class SDLAudioManager
|
import java.util.Arrays;
|
||||||
{
|
|
||||||
|
public class SDLAudioManager {
|
||||||
protected static final String TAG = "SDLAudio";
|
protected static final String TAG = "SDLAudio";
|
||||||
|
|
||||||
protected static AudioTrack mAudioTrack;
|
protected static AudioTrack mAudioTrack;
|
||||||
protected static AudioRecord mAudioRecord;
|
protected static AudioRecord mAudioRecord;
|
||||||
|
protected static Context mContext;
|
||||||
|
|
||||||
|
private static final int[] NO_DEVICES = {};
|
||||||
|
|
||||||
|
private static AudioDeviceCallback mAudioDeviceCallback;
|
||||||
|
|
||||||
public static void initialize() {
|
public static void initialize() {
|
||||||
mAudioTrack = null;
|
mAudioTrack = null;
|
||||||
mAudioRecord = null;
|
mAudioRecord = null;
|
||||||
|
mAudioDeviceCallback = null;
|
||||||
|
|
||||||
|
if(Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */)
|
||||||
|
{
|
||||||
|
mAudioDeviceCallback = new AudioDeviceCallback() {
|
||||||
|
@Override
|
||||||
|
public void onAudioDevicesAdded(AudioDeviceInfo[] addedDevices) {
|
||||||
|
Arrays.stream(addedDevices).forEach(deviceInfo -> addAudioDevice(deviceInfo.isSink(), deviceInfo.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAudioDevicesRemoved(AudioDeviceInfo[] removedDevices) {
|
||||||
|
Arrays.stream(removedDevices).forEach(deviceInfo -> removeAudioDevice(deviceInfo.isSink(), deviceInfo.getId()));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setContext(Context context) {
|
||||||
|
mContext = context;
|
||||||
|
if (context != null) {
|
||||||
|
registerAudioDeviceCallback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void release(Context context) {
|
||||||
|
unregisterAudioDeviceCallback(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
|
|
||||||
protected static String getAudioFormatString(int audioFormat) {
|
protected static String getAudioFormatString(int audioFormat) {
|
||||||
switch (audioFormat) {
|
switch (audioFormat) {
|
||||||
case AudioFormat.ENCODING_PCM_8BIT:
|
case AudioFormat.ENCODING_PCM_8BIT:
|
||||||
return "8-bit";
|
return "8-bit";
|
||||||
case AudioFormat.ENCODING_PCM_16BIT:
|
case AudioFormat.ENCODING_PCM_16BIT:
|
||||||
return "16-bit";
|
return "16-bit";
|
||||||
case AudioFormat.ENCODING_PCM_FLOAT:
|
case AudioFormat.ENCODING_PCM_FLOAT:
|
||||||
return "float";
|
return "float";
|
||||||
default:
|
default:
|
||||||
return Integer.toString(audioFormat);
|
return Integer.toString(audioFormat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static int[] open(boolean isCapture, int sampleRate, int audioFormat, int desiredChannels, int desiredFrames) {
|
protected static int[] open(boolean isCapture, int sampleRate, int audioFormat, int desiredChannels, int desiredFrames, int deviceId) {
|
||||||
int channelConfig;
|
int channelConfig;
|
||||||
int sampleSize;
|
int sampleSize;
|
||||||
int frameSize;
|
int frameSize;
|
||||||
@@ -43,14 +79,14 @@ public class SDLAudioManager
|
|||||||
Log.v(TAG, "Opening " + (isCapture ? "capture" : "playback") + ", requested " + desiredFrames + " frames of " + desiredChannels + " channel " + getAudioFormatString(audioFormat) + " audio at " + sampleRate + " Hz");
|
Log.v(TAG, "Opening " + (isCapture ? "capture" : "playback") + ", requested " + desiredFrames + " frames of " + desiredChannels + " channel " + getAudioFormatString(audioFormat) + " audio at " + sampleRate + " Hz");
|
||||||
|
|
||||||
/* On older devices let's use known good settings */
|
/* On older devices let's use known good settings */
|
||||||
if (Build.VERSION.SDK_INT < 21) {
|
if (Build.VERSION.SDK_INT < 21 /* Android 5.0 (LOLLIPOP) */) {
|
||||||
if (desiredChannels > 2) {
|
if (desiredChannels > 2) {
|
||||||
desiredChannels = 2;
|
desiredChannels = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* AudioTrack has sample rate limitation of 48000 (fixed in 5.0.2) */
|
/* AudioTrack has sample rate limitation of 48000 (fixed in 5.0.2) */
|
||||||
if (Build.VERSION.SDK_INT < 22) {
|
if (Build.VERSION.SDK_INT < 22 /* Android 5.1 (LOLLIPOP_MR1) */) {
|
||||||
if (sampleRate < 8000) {
|
if (sampleRate < 8000) {
|
||||||
sampleRate = 8000;
|
sampleRate = 8000;
|
||||||
} else if (sampleRate > 48000) {
|
} else if (sampleRate > 48000) {
|
||||||
@@ -59,7 +95,7 @@ public class SDLAudioManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (audioFormat == AudioFormat.ENCODING_PCM_FLOAT) {
|
if (audioFormat == AudioFormat.ENCODING_PCM_FLOAT) {
|
||||||
int minSDKVersion = (isCapture ? 23 : 21);
|
int minSDKVersion = (isCapture ? 23 /* Android 6.0 (M) */ : 21 /* Android 5.0 (LOLLIPOP) */);
|
||||||
if (Build.VERSION.SDK_INT < minSDKVersion) {
|
if (Build.VERSION.SDK_INT < minSDKVersion) {
|
||||||
audioFormat = AudioFormat.ENCODING_PCM_16BIT;
|
audioFormat = AudioFormat.ENCODING_PCM_16BIT;
|
||||||
}
|
}
|
||||||
@@ -120,7 +156,7 @@ public class SDLAudioManager
|
|||||||
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1 | AudioFormat.CHANNEL_OUT_BACK_CENTER;
|
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1 | AudioFormat.CHANNEL_OUT_BACK_CENTER;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
if (Build.VERSION.SDK_INT >= 23) {
|
if (Build.VERSION.SDK_INT >= 23 /* Android 6.0 (M) */) {
|
||||||
channelConfig = AudioFormat.CHANNEL_OUT_7POINT1_SURROUND;
|
channelConfig = AudioFormat.CHANNEL_OUT_7POINT1_SURROUND;
|
||||||
} else {
|
} else {
|
||||||
Log.v(TAG, "Requested " + desiredChannels + " channels, getting 5.1 surround");
|
Log.v(TAG, "Requested " + desiredChannels + " channels, getting 5.1 surround");
|
||||||
@@ -201,6 +237,10 @@ public class SDLAudioManager
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */ && deviceId != 0) {
|
||||||
|
mAudioRecord.setPreferredDevice(getOutputAudioDeviceInfo(deviceId));
|
||||||
|
}
|
||||||
|
|
||||||
mAudioRecord.startRecording();
|
mAudioRecord.startRecording();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,6 +264,10 @@ public class SDLAudioManager
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */ && deviceId != 0) {
|
||||||
|
mAudioTrack.setPreferredDevice(getInputAudioDeviceInfo(deviceId));
|
||||||
|
}
|
||||||
|
|
||||||
mAudioTrack.play();
|
mAudioTrack.play();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,11 +282,73 @@ public class SDLAudioManager
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static AudioDeviceInfo getInputAudioDeviceInfo(int deviceId) {
|
||||||
|
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||||
|
AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
|
||||||
|
return Arrays.stream(audioManager.getDevices(AudioManager.GET_DEVICES_INPUTS))
|
||||||
|
.filter(deviceInfo -> deviceInfo.getId() == deviceId)
|
||||||
|
.findFirst()
|
||||||
|
.orElse(null);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static AudioDeviceInfo getOutputAudioDeviceInfo(int deviceId) {
|
||||||
|
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||||
|
AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
|
||||||
|
return Arrays.stream(audioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS))
|
||||||
|
.filter(deviceInfo -> deviceInfo.getId() == deviceId)
|
||||||
|
.findFirst()
|
||||||
|
.orElse(null);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void registerAudioDeviceCallback() {
|
||||||
|
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||||
|
AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
|
||||||
|
audioManager.registerAudioDeviceCallback(mAudioDeviceCallback, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void unregisterAudioDeviceCallback(Context context) {
|
||||||
|
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||||
|
AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
|
||||||
|
audioManager.unregisterAudioDeviceCallback(mAudioDeviceCallback);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is called by SDL using JNI.
|
* This method is called by SDL using JNI.
|
||||||
*/
|
*/
|
||||||
public static int[] audioOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames) {
|
public static int[] getAudioOutputDevices() {
|
||||||
return open(false, sampleRate, audioFormat, desiredChannels, desiredFrames);
|
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||||
|
AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
|
||||||
|
return Arrays.stream(audioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS)).mapToInt(AudioDeviceInfo::getId).toArray();
|
||||||
|
} else {
|
||||||
|
return NO_DEVICES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is called by SDL using JNI.
|
||||||
|
*/
|
||||||
|
public static int[] getAudioInputDevices() {
|
||||||
|
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||||
|
AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
|
||||||
|
return Arrays.stream(audioManager.getDevices(AudioManager.GET_DEVICES_INPUTS)).mapToInt(AudioDeviceInfo::getId).toArray();
|
||||||
|
} else {
|
||||||
|
return NO_DEVICES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is called by SDL using JNI.
|
||||||
|
*/
|
||||||
|
public static int[] audioOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames, int deviceId) {
|
||||||
|
return open(false, sampleRate, audioFormat, desiredChannels, desiredFrames, deviceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -254,6 +360,11 @@ public class SDLAudioManager
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (android.os.Build.VERSION.SDK_INT < 21 /* Android 5.0 (LOLLIPOP) */) {
|
||||||
|
Log.e(TAG, "Attempted to make an incompatible audio call with uninitialized audio! (floating-point output is supported since Android 5.0 Lollipop)");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < buffer.length;) {
|
for (int i = 0; i < buffer.length;) {
|
||||||
int result = mAudioTrack.write(buffer, i, buffer.length - i, AudioTrack.WRITE_BLOCKING);
|
int result = mAudioTrack.write(buffer, i, buffer.length - i, AudioTrack.WRITE_BLOCKING);
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
@@ -326,18 +437,22 @@ public class SDLAudioManager
|
|||||||
/**
|
/**
|
||||||
* This method is called by SDL using JNI.
|
* This method is called by SDL using JNI.
|
||||||
*/
|
*/
|
||||||
public static int[] captureOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames) {
|
public static int[] captureOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames, int deviceId) {
|
||||||
return open(true, sampleRate, audioFormat, desiredChannels, desiredFrames);
|
return open(true, sampleRate, audioFormat, desiredChannels, desiredFrames, deviceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This method is called by SDL using JNI. */
|
/** This method is called by SDL using JNI. */
|
||||||
public static int captureReadFloatBuffer(float[] buffer, boolean blocking) {
|
public static int captureReadFloatBuffer(float[] buffer, boolean blocking) {
|
||||||
return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
|
if (Build.VERSION.SDK_INT < 23 /* Android 6.0 (M) */) {
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This method is called by SDL using JNI. */
|
/** This method is called by SDL using JNI. */
|
||||||
public static int captureReadShortBuffer(short[] buffer, boolean blocking) {
|
public static int captureReadShortBuffer(short[] buffer, boolean blocking) {
|
||||||
if (Build.VERSION.SDK_INT < 23) {
|
if (Build.VERSION.SDK_INT < 23 /* Android 6.0 (M) */) {
|
||||||
return mAudioRecord.read(buffer, 0, buffer.length);
|
return mAudioRecord.read(buffer, 0, buffer.length);
|
||||||
} else {
|
} else {
|
||||||
return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
|
return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
|
||||||
@@ -346,7 +461,7 @@ public class SDLAudioManager
|
|||||||
|
|
||||||
/** This method is called by SDL using JNI. */
|
/** This method is called by SDL using JNI. */
|
||||||
public static int captureReadByteBuffer(byte[] buffer, boolean blocking) {
|
public static int captureReadByteBuffer(byte[] buffer, boolean blocking) {
|
||||||
if (Build.VERSION.SDK_INT < 23) {
|
if (Build.VERSION.SDK_INT < 23 /* Android 6.0 (M) */) {
|
||||||
return mAudioRecord.read(buffer, 0, buffer.length);
|
return mAudioRecord.read(buffer, 0, buffer.length);
|
||||||
} else {
|
} else {
|
||||||
return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
|
return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
|
||||||
@@ -391,4 +506,9 @@ public class SDLAudioManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static native int nativeSetupJNI();
|
public static native int nativeSetupJNI();
|
||||||
|
|
||||||
|
public static native void removeAudioDevice(boolean isCapture, int deviceId);
|
||||||
|
|
||||||
|
public static native void addAudioDevice(boolean isCapture, int deviceId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -24,7 +24,7 @@ public class SDLControllerManager
|
|||||||
public static native int nativeAddJoystick(int device_id, String name, String desc,
|
public static native int nativeAddJoystick(int device_id, String name, String desc,
|
||||||
int vendor_id, int product_id,
|
int vendor_id, int product_id,
|
||||||
boolean is_accelerometer, int button_mask,
|
boolean is_accelerometer, int button_mask,
|
||||||
int naxes, int nhats, int nballs);
|
int naxes, int axis_mask, int nhats, int nballs);
|
||||||
public static native int nativeRemoveJoystick(int device_id);
|
public static native int nativeRemoveJoystick(int device_id);
|
||||||
public static native int nativeAddHaptic(int device_id, String name);
|
public static native int nativeAddHaptic(int device_id, String name);
|
||||||
public static native int nativeRemoveHaptic(int device_id);
|
public static native int nativeRemoveHaptic(int device_id);
|
||||||
@@ -42,7 +42,7 @@ public class SDLControllerManager
|
|||||||
|
|
||||||
public static void initialize() {
|
public static void initialize() {
|
||||||
if (mJoystickHandler == null) {
|
if (mJoystickHandler == null) {
|
||||||
if (Build.VERSION.SDK_INT >= 19) {
|
if (Build.VERSION.SDK_INT >= 19 /* Android 4.4 (KITKAT) */) {
|
||||||
mJoystickHandler = new SDLJoystickHandler_API19();
|
mJoystickHandler = new SDLJoystickHandler_API19();
|
||||||
} else {
|
} else {
|
||||||
mJoystickHandler = new SDLJoystickHandler_API16();
|
mJoystickHandler = new SDLJoystickHandler_API16();
|
||||||
@@ -50,7 +50,7 @@ public class SDLControllerManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mHapticHandler == null) {
|
if (mHapticHandler == null) {
|
||||||
if (Build.VERSION.SDK_INT >= 26) {
|
if (Build.VERSION.SDK_INT >= 26 /* Android 8.0 (O) */) {
|
||||||
mHapticHandler = new SDLHapticHandler_API26();
|
mHapticHandler = new SDLHapticHandler_API26();
|
||||||
} else {
|
} else {
|
||||||
mHapticHandler = new SDLHapticHandler();
|
mHapticHandler = new SDLHapticHandler();
|
||||||
@@ -168,6 +168,32 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
|||||||
arg1Axis = MotionEvent.AXIS_GAS;
|
arg1Axis = MotionEvent.AXIS_GAS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure the AXIS_Z is sorted between AXIS_RY and AXIS_RZ.
|
||||||
|
// This is because the usual pairing are:
|
||||||
|
// - AXIS_X + AXIS_Y (left stick).
|
||||||
|
// - AXIS_RX, AXIS_RY (sometimes the right stick, sometimes triggers).
|
||||||
|
// - AXIS_Z, AXIS_RZ (sometimes the right stick, sometimes triggers).
|
||||||
|
// This sorts the axes in the above order, which tends to be correct
|
||||||
|
// for Xbox-ish game pads that have the right stick on RX/RY and the
|
||||||
|
// triggers on Z/RZ.
|
||||||
|
//
|
||||||
|
// Gamepads that don't have AXIS_Z/AXIS_RZ but use
|
||||||
|
// AXIS_LTRIGGER/AXIS_RTRIGGER are unaffected by this.
|
||||||
|
//
|
||||||
|
// References:
|
||||||
|
// - https://developer.android.com/develop/ui/views/touch-and-input/game-controllers/controller-input
|
||||||
|
// - https://www.kernel.org/doc/html/latest/input/gamepad.html
|
||||||
|
if (arg0Axis == MotionEvent.AXIS_Z) {
|
||||||
|
arg0Axis = MotionEvent.AXIS_RZ - 1;
|
||||||
|
} else if (arg0Axis > MotionEvent.AXIS_Z && arg0Axis < MotionEvent.AXIS_RZ) {
|
||||||
|
--arg0Axis;
|
||||||
|
}
|
||||||
|
if (arg1Axis == MotionEvent.AXIS_Z) {
|
||||||
|
arg1Axis = MotionEvent.AXIS_RZ - 1;
|
||||||
|
} else if (arg1Axis > MotionEvent.AXIS_Z && arg1Axis < MotionEvent.AXIS_RZ) {
|
||||||
|
--arg1Axis;
|
||||||
|
}
|
||||||
|
|
||||||
return arg0Axis - arg1Axis;
|
return arg0Axis - arg1Axis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -210,7 +236,7 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
|||||||
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), false,
|
getVendorId(joystickDevice), getProductId(joystickDevice), false,
|
||||||
getButtonMask(joystickDevice), joystick.axes.size(), joystick.hats.size()/2, 0);
|
getButtonMask(joystickDevice), joystick.axes.size(), getAxisMask(joystick.axes), joystick.hats.size()/2, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -291,6 +317,9 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
|||||||
public int getVendorId(InputDevice joystickDevice) {
|
public int getVendorId(InputDevice joystickDevice) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
public int getAxisMask(List<InputDevice.MotionRange> ranges) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
public int getButtonMask(InputDevice joystickDevice) {
|
public int getButtonMask(InputDevice joystickDevice) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -308,6 +337,43 @@ class SDLJoystickHandler_API19 extends SDLJoystickHandler_API16 {
|
|||||||
return joystickDevice.getVendorId();
|
return joystickDevice.getVendorId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getAxisMask(List<InputDevice.MotionRange> ranges) {
|
||||||
|
// For compatibility, keep computing the axis mask like before,
|
||||||
|
// only really distinguishing 2, 4 and 6 axes.
|
||||||
|
int axis_mask = 0;
|
||||||
|
if (ranges.size() >= 2) {
|
||||||
|
// ((1 << SDL_GAMEPAD_AXIS_LEFTX) | (1 << SDL_GAMEPAD_AXIS_LEFTY))
|
||||||
|
axis_mask |= 0x0003;
|
||||||
|
}
|
||||||
|
if (ranges.size() >= 4) {
|
||||||
|
// ((1 << SDL_GAMEPAD_AXIS_RIGHTX) | (1 << SDL_GAMEPAD_AXIS_RIGHTY))
|
||||||
|
axis_mask |= 0x000c;
|
||||||
|
}
|
||||||
|
if (ranges.size() >= 6) {
|
||||||
|
// ((1 << SDL_GAMEPAD_AXIS_LEFT_TRIGGER) | (1 << SDL_GAMEPAD_AXIS_RIGHT_TRIGGER))
|
||||||
|
axis_mask |= 0x0030;
|
||||||
|
}
|
||||||
|
// Also add an indicator bit for whether the sorting order has changed.
|
||||||
|
// This serves to disable outdated gamecontrollerdb.txt mappings.
|
||||||
|
boolean have_z = false;
|
||||||
|
boolean have_past_z_before_rz = false;
|
||||||
|
for (InputDevice.MotionRange range : ranges) {
|
||||||
|
int axis = range.getAxis();
|
||||||
|
if (axis == MotionEvent.AXIS_Z) {
|
||||||
|
have_z = true;
|
||||||
|
} else if (axis > MotionEvent.AXIS_Z && axis < MotionEvent.AXIS_RZ) {
|
||||||
|
have_past_z_before_rz = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (have_z && have_past_z_before_rz) {
|
||||||
|
// If both these exist, the compare() function changed sorting order.
|
||||||
|
// Set a bit to indicate this fact.
|
||||||
|
axis_mask |= 0x8000;
|
||||||
|
}
|
||||||
|
return axis_mask;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getButtonMask(InputDevice joystickDevice) {
|
public int getButtonMask(InputDevice joystickDevice) {
|
||||||
int button_mask = 0;
|
int button_mask = 0;
|
||||||
@@ -480,13 +546,15 @@ class SDLHapticHandler {
|
|||||||
if (haptic == null) {
|
if (haptic == null) {
|
||||||
InputDevice device = InputDevice.getDevice(deviceIds[i]);
|
InputDevice device = InputDevice.getDevice(deviceIds[i]);
|
||||||
Vibrator vib = device.getVibrator();
|
Vibrator vib = device.getVibrator();
|
||||||
if (vib.hasVibrator()) {
|
if (vib != null) {
|
||||||
haptic = new SDLHaptic();
|
if (vib.hasVibrator()) {
|
||||||
haptic.device_id = deviceIds[i];
|
haptic = new SDLHaptic();
|
||||||
haptic.name = device.getName();
|
haptic.device_id = deviceIds[i];
|
||||||
haptic.vib = vib;
|
haptic.name = device.getName();
|
||||||
mHaptics.add(haptic);
|
haptic.vib = vib;
|
||||||
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
|
mHaptics.add(haptic);
|
||||||
|
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -743,7 +811,7 @@ class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsRelativeMouse() {
|
public boolean supportsRelativeMouse() {
|
||||||
return (!SDLActivity.isDeXMode() || (Build.VERSION.SDK_INT >= 27));
|
return (!SDLActivity.isDeXMode() || Build.VERSION.SDK_INT >= 27 /* Android 8.1 (O_MR1) */);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -753,7 +821,7 @@ class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean setRelativeMouseEnabled(boolean enabled) {
|
public boolean setRelativeMouseEnabled(boolean enabled) {
|
||||||
if (!SDLActivity.isDeXMode() || (Build.VERSION.SDK_INT >= 27)) {
|
if (!SDLActivity.isDeXMode() || Build.VERSION.SDK_INT >= 27 /* Android 8.1 (O_MR1) */) {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
SDLActivity.getContentView().requestPointerCapture();
|
SDLActivity.getContentView().requestPointerCapture();
|
||||||
} else {
|
} else {
|
||||||
|
@@ -116,7 +116,7 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||||||
int nDeviceHeight = height;
|
int nDeviceHeight = height;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (Build.VERSION.SDK_INT >= 17) {
|
if (Build.VERSION.SDK_INT >= 17 /* Android 4.2 (JELLY_BEAN_MR1) */) {
|
||||||
DisplayMetrics realMetrics = new DisplayMetrics();
|
DisplayMetrics realMetrics = new DisplayMetrics();
|
||||||
mDisplay.getRealMetrics( realMetrics );
|
mDisplay.getRealMetrics( realMetrics );
|
||||||
nDeviceWidth = realMetrics.widthPixels;
|
nDeviceWidth = realMetrics.widthPixels;
|
||||||
@@ -163,7 +163,7 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||||||
|
|
||||||
// Don't skip in MultiWindow.
|
// Don't skip in MultiWindow.
|
||||||
if (skip) {
|
if (skip) {
|
||||||
if (Build.VERSION.SDK_INT >= 24) {
|
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||||
if (SDLActivity.mSingleton.isInMultiWindowMode()) {
|
if (SDLActivity.mSingleton.isInMultiWindowMode()) {
|
||||||
Log.v("SDL", "Don't skip in Multi-Window");
|
Log.v("SDL", "Don't skip in Multi-Window");
|
||||||
skip = false;
|
skip = false;
|
||||||
|
@@ -1,8 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
|
<style name="AppTheme" parent="android:Theme.NoTitleBar.Fullscreen">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -6,7 +6,7 @@ buildscript {
|
|||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.0.3'
|
classpath 'com.android.tools.build:gradle:8.1.1'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#Thu Nov 11 18:20:34 PST 2021
|
#Thu Nov 11 18:20:34 PST 2021
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
4
android-project/gradlew
vendored
4
android-project/gradlew
vendored
@@ -126,8 +126,8 @@ if $cygwin ; then
|
|||||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
i=0
|
i=0
|
||||||
for arg in "$@" ; do
|
for arg in "$@" ; do
|
||||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
CHECK=`echo "$arg"|grep -E -c "$OURCYGPATTERN" -`
|
||||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
CHECK2=`echo "$arg"|grep -E -c "^-"` ### Determine if an option
|
||||||
|
|
||||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Build the Android libraries without needing a project
|
# Build the Android libraries without needing a project
|
||||||
# (AndroidManifest.xml, jni/{Application,Android}.mk, etc.)
|
# (AndroidManifest.xml, jni/{Application,Android}.mk, etc.)
|
||||||
|
32
build-scripts/clang-format-src.sh
Executable file
32
build-scripts/clang-format-src.sh
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cd "$(dirname $0)/../src"
|
||||||
|
|
||||||
|
echo "Running clang-format in $(pwd)"
|
||||||
|
|
||||||
|
find . -regex '.*\.[chm]p*' -exec clang-format -i {} \;
|
||||||
|
|
||||||
|
# Revert third-party code
|
||||||
|
git checkout \
|
||||||
|
events/imKStoUCS.* \
|
||||||
|
hidapi \
|
||||||
|
joystick/controller_type.c \
|
||||||
|
joystick/controller_type.h \
|
||||||
|
joystick/hidapi/steam/controller_constants.h \
|
||||||
|
joystick/hidapi/steam/controller_structs.h \
|
||||||
|
libm \
|
||||||
|
stdlib/SDL_malloc.c \
|
||||||
|
stdlib/SDL_qsort.c \
|
||||||
|
stdlib/SDL_strtokr.c \
|
||||||
|
video/arm \
|
||||||
|
video/khronos \
|
||||||
|
video/x11/edid-parse.c \
|
||||||
|
video/yuv2rgb
|
||||||
|
clang-format -i hidapi/SDL_hidapi.c
|
||||||
|
|
||||||
|
# Revert generated code
|
||||||
|
git checkout dynapi/SDL_dynapi_overrides.h
|
||||||
|
git checkout dynapi/SDL_dynapi_procs.h
|
||||||
|
git checkout render/metal/SDL_shaders_metal_*.h
|
||||||
|
|
||||||
|
echo "clang-format complete!"
|
70
build-scripts/config.guess
vendored
70
build-scripts/config.guess
vendored
@@ -1,10 +1,10 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Attempt to guess a canonical system name.
|
# Attempt to guess a canonical system name.
|
||||||
# Copyright 1992-2022 Free Software Foundation, Inc.
|
# Copyright 1992-2024 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||||
|
|
||||||
timestamp='2022-05-25'
|
timestamp='2024-01-01'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
@@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'`
|
|||||||
usage="\
|
usage="\
|
||||||
Usage: $0 [OPTION]
|
Usage: $0 [OPTION]
|
||||||
|
|
||||||
Output the configuration name of the system \`$me' is run on.
|
Output the configuration name of the system '$me' is run on.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-h, --help print this help, then exit
|
-h, --help print this help, then exit
|
||||||
@@ -60,13 +60,13 @@ version="\
|
|||||||
GNU config.guess ($timestamp)
|
GNU config.guess ($timestamp)
|
||||||
|
|
||||||
Originally written by Per Bothner.
|
Originally written by Per Bothner.
|
||||||
Copyright 1992-2022 Free Software Foundation, Inc.
|
Copyright 1992-2024 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
|
|
||||||
help="
|
help="
|
||||||
Try \`$me --help' for more information."
|
Try '$me --help' for more information."
|
||||||
|
|
||||||
# Parse command line
|
# Parse command line
|
||||||
while test $# -gt 0 ; do
|
while test $# -gt 0 ; do
|
||||||
@@ -102,8 +102,8 @@ GUESS=
|
|||||||
# temporary files to be created and, as you can see below, it is a
|
# temporary files to be created and, as you can see below, it is a
|
||||||
# headache to deal with in a portable fashion.
|
# headache to deal with in a portable fashion.
|
||||||
|
|
||||||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
|
||||||
# use `HOST_CC' if defined, but it is deprecated.
|
# use 'HOST_CC' if defined, but it is deprecated.
|
||||||
|
|
||||||
# Portable tmp directory creation inspired by the Autoconf team.
|
# Portable tmp directory creation inspired by the Autoconf team.
|
||||||
|
|
||||||
@@ -155,6 +155,9 @@ Linux|GNU|GNU/*)
|
|||||||
|
|
||||||
set_cc_for_build
|
set_cc_for_build
|
||||||
cat <<-EOF > "$dummy.c"
|
cat <<-EOF > "$dummy.c"
|
||||||
|
#if defined(__ANDROID__)
|
||||||
|
LIBC=android
|
||||||
|
#else
|
||||||
#include <features.h>
|
#include <features.h>
|
||||||
#if defined(__UCLIBC__)
|
#if defined(__UCLIBC__)
|
||||||
LIBC=uclibc
|
LIBC=uclibc
|
||||||
@@ -162,6 +165,8 @@ Linux|GNU|GNU/*)
|
|||||||
LIBC=dietlibc
|
LIBC=dietlibc
|
||||||
#elif defined(__GLIBC__)
|
#elif defined(__GLIBC__)
|
||||||
LIBC=gnu
|
LIBC=gnu
|
||||||
|
#elif defined(__LLVM_LIBC__)
|
||||||
|
LIBC=llvm
|
||||||
#else
|
#else
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
/* First heuristic to detect musl libc. */
|
/* First heuristic to detect musl libc. */
|
||||||
@@ -169,6 +174,7 @@ Linux|GNU|GNU/*)
|
|||||||
LIBC=musl
|
LIBC=musl
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
EOF
|
EOF
|
||||||
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
||||||
eval "$cc_set_libc"
|
eval "$cc_set_libc"
|
||||||
@@ -459,7 +465,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
|
|||||||
UNAME_RELEASE=`uname -v`
|
UNAME_RELEASE=`uname -v`
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# Japanese Language versions have a version number like `4.1.3-JL'.
|
# Japanese Language versions have a version number like '4.1.3-JL'.
|
||||||
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
|
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
|
||||||
GUESS=sparc-sun-sunos$SUN_REL
|
GUESS=sparc-sun-sunos$SUN_REL
|
||||||
;;
|
;;
|
||||||
@@ -904,7 +910,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*:FreeBSD:*:*)
|
*:FreeBSD:*:*)
|
||||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
UNAME_PROCESSOR=`uname -p`
|
||||||
case $UNAME_PROCESSOR in
|
case $UNAME_PROCESSOR in
|
||||||
amd64)
|
amd64)
|
||||||
UNAME_PROCESSOR=x86_64 ;;
|
UNAME_PROCESSOR=x86_64 ;;
|
||||||
@@ -966,11 +972,37 @@ EOF
|
|||||||
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
||||||
GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
|
GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
|
||||||
;;
|
;;
|
||||||
|
x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
|
||||||
|
GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
|
||||||
|
;;
|
||||||
|
*:[Mm]anagarm:*:*)
|
||||||
|
GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
|
||||||
|
;;
|
||||||
*:Minix:*:*)
|
*:Minix:*:*)
|
||||||
GUESS=$UNAME_MACHINE-unknown-minix
|
GUESS=$UNAME_MACHINE-unknown-minix
|
||||||
;;
|
;;
|
||||||
aarch64:Linux:*:*)
|
aarch64:Linux:*:*)
|
||||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
set_cc_for_build
|
||||||
|
CPU=$UNAME_MACHINE
|
||||||
|
LIBCABI=$LIBC
|
||||||
|
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
||||||
|
ABI=64
|
||||||
|
sed 's/^ //' << EOF > "$dummy.c"
|
||||||
|
#ifdef __ARM_EABI__
|
||||||
|
#ifdef __ARM_PCS_VFP
|
||||||
|
ABI=eabihf
|
||||||
|
#else
|
||||||
|
ABI=eabi
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
EOF
|
||||||
|
cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
|
||||||
|
eval "$cc_set_abi"
|
||||||
|
case $ABI in
|
||||||
|
eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
GUESS=$CPU-unknown-linux-$LIBCABI
|
||||||
;;
|
;;
|
||||||
aarch64_be:Linux:*:*)
|
aarch64_be:Linux:*:*)
|
||||||
UNAME_MACHINE=aarch64_be
|
UNAME_MACHINE=aarch64_be
|
||||||
@@ -1036,7 +1068,16 @@ EOF
|
|||||||
k1om:Linux:*:*)
|
k1om:Linux:*:*)
|
||||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||||
;;
|
;;
|
||||||
loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
|
kvx:Linux:*:*)
|
||||||
|
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||||
|
;;
|
||||||
|
kvx:cos:*:*)
|
||||||
|
GUESS=$UNAME_MACHINE-unknown-cos
|
||||||
|
;;
|
||||||
|
kvx:mbr:*:*)
|
||||||
|
GUESS=$UNAME_MACHINE-unknown-mbr
|
||||||
|
;;
|
||||||
|
loongarch32:Linux:*:* | loongarch64:Linux:*:*)
|
||||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||||
;;
|
;;
|
||||||
m32r*:Linux:*:*)
|
m32r*:Linux:*:*)
|
||||||
@@ -1191,7 +1232,7 @@ EOF
|
|||||||
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
|
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
|
||||||
;;
|
;;
|
||||||
i*86:OS/2:*:*)
|
i*86:OS/2:*:*)
|
||||||
# If we were able to find `uname', then EMX Unix compatibility
|
# If we were able to find 'uname', then EMX Unix compatibility
|
||||||
# is probably installed.
|
# is probably installed.
|
||||||
GUESS=$UNAME_MACHINE-pc-os2-emx
|
GUESS=$UNAME_MACHINE-pc-os2-emx
|
||||||
;;
|
;;
|
||||||
@@ -1332,7 +1373,7 @@ EOF
|
|||||||
GUESS=ns32k-sni-sysv
|
GUESS=ns32k-sni-sysv
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
|
||||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||||
GUESS=i586-unisys-sysv4
|
GUESS=i586-unisys-sysv4
|
||||||
;;
|
;;
|
||||||
@@ -1554,6 +1595,9 @@ EOF
|
|||||||
*:Unleashed:*:*)
|
*:Unleashed:*:*)
|
||||||
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
|
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
|
||||||
;;
|
;;
|
||||||
|
*:Ironclad:*:*)
|
||||||
|
GUESS=$UNAME_MACHINE-unknown-ironclad
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Do we have a guess based on uname results?
|
# Do we have a guess based on uname results?
|
||||||
|
239
build-scripts/config.sub
vendored
239
build-scripts/config.sub
vendored
@@ -1,10 +1,10 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright 1992-2022 Free Software Foundation, Inc.
|
# Copyright 1992-2024 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||||
|
|
||||||
timestamp='2022-01-03'
|
timestamp='2024-01-01'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
@@ -76,13 +76,13 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||||||
version="\
|
version="\
|
||||||
GNU config.sub ($timestamp)
|
GNU config.sub ($timestamp)
|
||||||
|
|
||||||
Copyright 1992-2022 Free Software Foundation, Inc.
|
Copyright 1992-2024 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
|
|
||||||
help="
|
help="
|
||||||
Try \`$me --help' for more information."
|
Try '$me --help' for more information."
|
||||||
|
|
||||||
# Parse command line
|
# Parse command line
|
||||||
while test $# -gt 0 ; do
|
while test $# -gt 0 ; do
|
||||||
@@ -130,7 +130,7 @@ IFS=$saved_IFS
|
|||||||
# Separate into logical components for further validation
|
# Separate into logical components for further validation
|
||||||
case $1 in
|
case $1 in
|
||||||
*-*-*-*-*)
|
*-*-*-*-*)
|
||||||
echo Invalid configuration \`"$1"\': more than four components >&2
|
echo "Invalid configuration '$1': more than four components" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
*-*-*-*)
|
*-*-*-*)
|
||||||
@@ -145,7 +145,8 @@ case $1 in
|
|||||||
nto-qnx* | linux-* | uclinux-uclibc* \
|
nto-qnx* | linux-* | uclinux-uclibc* \
|
||||||
| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
|
| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
|
||||||
| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
|
| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
|
||||||
| storm-chaos* | os2-emx* | rtmk-nova*)
|
| storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \
|
||||||
|
| windows-* )
|
||||||
basic_machine=$field1
|
basic_machine=$field1
|
||||||
basic_os=$maybe_os
|
basic_os=$maybe_os
|
||||||
;;
|
;;
|
||||||
@@ -943,7 +944,7 @@ $basic_machine
|
|||||||
EOF
|
EOF
|
||||||
IFS=$saved_IFS
|
IFS=$saved_IFS
|
||||||
;;
|
;;
|
||||||
# We use `pc' rather than `unknown'
|
# We use 'pc' rather than 'unknown'
|
||||||
# because (1) that's what they normally are, and
|
# because (1) that's what they normally are, and
|
||||||
# (2) the word "unknown" tends to confuse beginning users.
|
# (2) the word "unknown" tends to confuse beginning users.
|
||||||
i*86 | x86_64)
|
i*86 | x86_64)
|
||||||
@@ -1075,7 +1076,7 @@ case $cpu-$vendor in
|
|||||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||||
cpu=i586
|
cpu=i586
|
||||||
;;
|
;;
|
||||||
pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
|
pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
|
||||||
cpu=i686
|
cpu=i686
|
||||||
;;
|
;;
|
||||||
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||||
@@ -1180,7 +1181,7 @@ case $cpu-$vendor in
|
|||||||
case $cpu in
|
case $cpu in
|
||||||
1750a | 580 \
|
1750a | 580 \
|
||||||
| a29k \
|
| a29k \
|
||||||
| aarch64 | aarch64_be \
|
| aarch64 | aarch64_be | aarch64c | arm64ec \
|
||||||
| abacus \
|
| abacus \
|
||||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
|
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
|
||||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
|
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
|
||||||
@@ -1199,50 +1200,29 @@ case $cpu-$vendor in
|
|||||||
| d10v | d30v | dlx | dsp16xx \
|
| d10v | d30v | dlx | dsp16xx \
|
||||||
| e2k | elxsi | epiphany \
|
| e2k | elxsi | epiphany \
|
||||||
| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
|
| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
|
||||||
|
| javascript \
|
||||||
| h8300 | h8500 \
|
| h8300 | h8500 \
|
||||||
| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||||
| hexagon \
|
| hexagon \
|
||||||
| i370 | i*86 | i860 | i960 | ia16 | ia64 \
|
| i370 | i*86 | i860 | i960 | ia16 | ia64 \
|
||||||
| ip2k | iq2000 \
|
| ip2k | iq2000 \
|
||||||
| k1om \
|
| k1om \
|
||||||
|
| kvx \
|
||||||
| le32 | le64 \
|
| le32 | le64 \
|
||||||
| lm32 \
|
| lm32 \
|
||||||
| loongarch32 | loongarch64 | loongarchx32 \
|
| loongarch32 | loongarch64 \
|
||||||
| m32c | m32r | m32rle \
|
| m32c | m32r | m32rle \
|
||||||
| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
|
| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
|
||||||
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
|
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
|
||||||
| m88110 | m88k | maxq | mb | mcore | mep | metag \
|
| m88110 | m88k | maxq | mb | mcore | mep | metag \
|
||||||
| microblaze | microblazeel \
|
| microblaze | microblazeel \
|
||||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
| mips* \
|
||||||
| mips16 \
|
|
||||||
| mips64 | mips64eb | mips64el \
|
|
||||||
| mips64octeon | mips64octeonel \
|
|
||||||
| mips64orion | mips64orionel \
|
|
||||||
| mips64r5900 | mips64r5900el \
|
|
||||||
| mips64vr | mips64vrel \
|
|
||||||
| mips64vr4100 | mips64vr4100el \
|
|
||||||
| mips64vr4300 | mips64vr4300el \
|
|
||||||
| mips64vr5000 | mips64vr5000el \
|
|
||||||
| mips64vr5900 | mips64vr5900el \
|
|
||||||
| mipsisa32 | mipsisa32el \
|
|
||||||
| mipsisa32r2 | mipsisa32r2el \
|
|
||||||
| mipsisa32r3 | mipsisa32r3el \
|
|
||||||
| mipsisa32r5 | mipsisa32r5el \
|
|
||||||
| mipsisa32r6 | mipsisa32r6el \
|
|
||||||
| mipsisa64 | mipsisa64el \
|
|
||||||
| mipsisa64r2 | mipsisa64r2el \
|
|
||||||
| mipsisa64r3 | mipsisa64r3el \
|
|
||||||
| mipsisa64r5 | mipsisa64r5el \
|
|
||||||
| mipsisa64r6 | mipsisa64r6el \
|
|
||||||
| mipsisa64sb1 | mipsisa64sb1el \
|
|
||||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
|
||||||
| mipsr5900 | mipsr5900el \
|
|
||||||
| mipstx39 | mipstx39el \
|
|
||||||
| mmix \
|
| mmix \
|
||||||
| mn10200 | mn10300 \
|
| mn10200 | mn10300 \
|
||||||
| moxie \
|
| moxie \
|
||||||
| mt \
|
| mt \
|
||||||
| msp430 \
|
| msp430 \
|
||||||
|
| nanomips* \
|
||||||
| nds32 | nds32le | nds32be \
|
| nds32 | nds32le | nds32be \
|
||||||
| nfp \
|
| nfp \
|
||||||
| nios | nios2 | nios2eb | nios2el \
|
| nios | nios2 | nios2eb | nios2el \
|
||||||
@@ -1274,6 +1254,7 @@ case $cpu-$vendor in
|
|||||||
| ubicom32 \
|
| ubicom32 \
|
||||||
| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
|
| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
|
||||||
| vax \
|
| vax \
|
||||||
|
| vc4 \
|
||||||
| visium \
|
| visium \
|
||||||
| w65 \
|
| w65 \
|
||||||
| wasm32 | wasm64 \
|
| wasm32 | wasm64 \
|
||||||
@@ -1285,7 +1266,7 @@ case $cpu-$vendor in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
|
echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -1306,11 +1287,12 @@ esac
|
|||||||
|
|
||||||
# Decode manufacturer-specific aliases for certain operating systems.
|
# Decode manufacturer-specific aliases for certain operating systems.
|
||||||
|
|
||||||
if test x$basic_os != x
|
if test x"$basic_os" != x
|
||||||
then
|
then
|
||||||
|
|
||||||
# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
|
# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
|
||||||
# set os.
|
# set os.
|
||||||
|
obj=
|
||||||
case $basic_os in
|
case $basic_os in
|
||||||
gnu/linux*)
|
gnu/linux*)
|
||||||
kernel=linux
|
kernel=linux
|
||||||
@@ -1341,6 +1323,10 @@ EOF
|
|||||||
kernel=linux
|
kernel=linux
|
||||||
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
|
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
|
||||||
;;
|
;;
|
||||||
|
managarm*)
|
||||||
|
kernel=managarm
|
||||||
|
os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
kernel=
|
kernel=
|
||||||
os=$basic_os
|
os=$basic_os
|
||||||
@@ -1506,10 +1492,16 @@ case $os in
|
|||||||
os=eabi
|
os=eabi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
aout* | coff* | elf* | pe*)
|
||||||
|
# These are machine code file formats, not OSes
|
||||||
|
obj=$os
|
||||||
|
os=
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# No normalization, but not necessarily accepted, that comes below.
|
# No normalization, but not necessarily accepted, that comes below.
|
||||||
;;
|
;;
|
||||||
@@ -1528,12 +1520,15 @@ else
|
|||||||
# system, and we'll never get to this point.
|
# system, and we'll never get to this point.
|
||||||
|
|
||||||
kernel=
|
kernel=
|
||||||
|
obj=
|
||||||
case $cpu-$vendor in
|
case $cpu-$vendor in
|
||||||
score-*)
|
score-*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
spu-*)
|
spu-*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
*-acorn)
|
*-acorn)
|
||||||
os=riscix1.2
|
os=riscix1.2
|
||||||
@@ -1543,28 +1538,35 @@ case $cpu-$vendor in
|
|||||||
os=gnu
|
os=gnu
|
||||||
;;
|
;;
|
||||||
arm*-semi)
|
arm*-semi)
|
||||||
os=aout
|
os=
|
||||||
|
obj=aout
|
||||||
;;
|
;;
|
||||||
c4x-* | tic4x-*)
|
c4x-* | tic4x-*)
|
||||||
os=coff
|
os=
|
||||||
|
obj=coff
|
||||||
;;
|
;;
|
||||||
c8051-*)
|
c8051-*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
clipper-intergraph)
|
clipper-intergraph)
|
||||||
os=clix
|
os=clix
|
||||||
;;
|
;;
|
||||||
hexagon-*)
|
hexagon-*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
tic54x-*)
|
tic54x-*)
|
||||||
os=coff
|
os=
|
||||||
|
obj=coff
|
||||||
;;
|
;;
|
||||||
tic55x-*)
|
tic55x-*)
|
||||||
os=coff
|
os=
|
||||||
|
obj=coff
|
||||||
;;
|
;;
|
||||||
tic6x-*)
|
tic6x-*)
|
||||||
os=coff
|
os=
|
||||||
|
obj=coff
|
||||||
;;
|
;;
|
||||||
# This must come before the *-dec entry.
|
# This must come before the *-dec entry.
|
||||||
pdp10-*)
|
pdp10-*)
|
||||||
@@ -1586,19 +1588,24 @@ case $cpu-$vendor in
|
|||||||
os=sunos3
|
os=sunos3
|
||||||
;;
|
;;
|
||||||
m68*-cisco)
|
m68*-cisco)
|
||||||
os=aout
|
os=
|
||||||
|
obj=aout
|
||||||
;;
|
;;
|
||||||
mep-*)
|
mep-*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
mips*-cisco)
|
mips*-cisco)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
mips*-*)
|
mips*-*|nanomips*-*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
or32-*)
|
or32-*)
|
||||||
os=coff
|
os=
|
||||||
|
obj=coff
|
||||||
;;
|
;;
|
||||||
*-tti) # must be before sparc entry or we get the wrong os.
|
*-tti) # must be before sparc entry or we get the wrong os.
|
||||||
os=sysv3
|
os=sysv3
|
||||||
@@ -1607,7 +1614,8 @@ case $cpu-$vendor in
|
|||||||
os=sunos4.1.1
|
os=sunos4.1.1
|
||||||
;;
|
;;
|
||||||
pru-*)
|
pru-*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
*-be)
|
*-be)
|
||||||
os=beos
|
os=beos
|
||||||
@@ -1688,10 +1696,12 @@ case $cpu-$vendor in
|
|||||||
os=uxpv
|
os=uxpv
|
||||||
;;
|
;;
|
||||||
*-rom68k)
|
*-rom68k)
|
||||||
os=coff
|
os=
|
||||||
|
obj=coff
|
||||||
;;
|
;;
|
||||||
*-*bug)
|
*-*bug)
|
||||||
os=coff
|
os=
|
||||||
|
obj=coff
|
||||||
;;
|
;;
|
||||||
*-apple)
|
*-apple)
|
||||||
os=macos
|
os=macos
|
||||||
@@ -1709,10 +1719,11 @@ esac
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Now, validate our (potentially fixed-up) OS.
|
# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
|
||||||
|
|
||||||
case $os in
|
case $os in
|
||||||
# Sometimes we do "kernel-libc", so those need to count as OSes.
|
# Sometimes we do "kernel-libc", so those need to count as OSes.
|
||||||
musl* | newlib* | relibc* | uclibc*)
|
llvm* | musl* | newlib* | relibc* | uclibc*)
|
||||||
;;
|
;;
|
||||||
# Likewise for "kernel-abi"
|
# Likewise for "kernel-abi"
|
||||||
eabi* | gnueabi*)
|
eabi* | gnueabi*)
|
||||||
@@ -1720,6 +1731,9 @@ case $os in
|
|||||||
# VxWorks passes extra cpu info in the 4th filed.
|
# VxWorks passes extra cpu info in the 4th filed.
|
||||||
simlinux | simwindows | spe)
|
simlinux | simwindows | spe)
|
||||||
;;
|
;;
|
||||||
|
# See `case $cpu-$os` validation below
|
||||||
|
ghcjs)
|
||||||
|
;;
|
||||||
# Now accept the basic system types.
|
# Now accept the basic system types.
|
||||||
# The portable systems comes first.
|
# The portable systems comes first.
|
||||||
# Each alternative MUST end in a * to match a version number.
|
# Each alternative MUST end in a * to match a version number.
|
||||||
@@ -1728,7 +1742,7 @@ case $os in
|
|||||||
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
||||||
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
|
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
|
||||||
| hiux* | abug | nacl* | netware* | windows* \
|
| hiux* | abug | nacl* | netware* | windows* \
|
||||||
| os9* | macos* | osx* | ios* \
|
| os9* | macos* | osx* | ios* | tvos* | watchos* \
|
||||||
| mpw* | magic* | mmixware* | mon960* | lnews* \
|
| mpw* | magic* | mmixware* | mon960* | lnews* \
|
||||||
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
|
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
|
||||||
| aos* | aros* | cloudabi* | sortix* | twizzler* \
|
| aos* | aros* | cloudabi* | sortix* | twizzler* \
|
||||||
@@ -1737,11 +1751,11 @@ case $os in
|
|||||||
| mirbsd* | netbsd* | dicos* | openedition* | ose* \
|
| mirbsd* | netbsd* | dicos* | openedition* | ose* \
|
||||||
| bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
|
| bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
|
||||||
| ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
|
| ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
|
||||||
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
|
| bosx* | nextstep* | cxux* | oabi* \
|
||||||
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
|
| ptx* | ecoff* | winnt* | domain* | vsta* \
|
||||||
| udi* | lites* | ieee* | go32* | aux* | hcos* \
|
| udi* | lites* | ieee* | go32* | aux* | hcos* \
|
||||||
| chorusrdb* | cegcc* | glidix* | serenity* \
|
| chorusrdb* | cegcc* | glidix* | serenity* \
|
||||||
| cygwin* | msys* | pe* | moss* | proelf* | rtems* \
|
| cygwin* | msys* | moss* | proelf* | rtems* \
|
||||||
| midipix* | mingw32* | mingw64* | mint* \
|
| midipix* | mingw32* | mingw64* | mint* \
|
||||||
| uxpv* | beos* | mpeix* | udk* | moxiebox* \
|
| uxpv* | beos* | mpeix* | udk* | moxiebox* \
|
||||||
| interix* | uwin* | mks* | rhapsody* | darwin* \
|
| interix* | uwin* | mks* | rhapsody* | darwin* \
|
||||||
@@ -1754,49 +1768,116 @@ case $os in
|
|||||||
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
||||||
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
||||||
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
|
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
|
||||||
| fiwix* )
|
| fiwix* | mlibc* | cos* | mbr* | ironclad* )
|
||||||
;;
|
;;
|
||||||
# This one is extra strict with allowed versions
|
# This one is extra strict with allowed versions
|
||||||
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
|
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
|
||||||
# Don't forget version if it is 3.2v4 or newer.
|
# Don't forget version if it is 3.2v4 or newer.
|
||||||
;;
|
;;
|
||||||
|
# This refers to builds using the UEFI calling convention
|
||||||
|
# (which depends on the architecture) and PE file format.
|
||||||
|
# Note that this is both a different calling convention and
|
||||||
|
# different file format than that of GNU-EFI
|
||||||
|
# (x86_64-w64-mingw32).
|
||||||
|
uefi)
|
||||||
|
;;
|
||||||
none)
|
none)
|
||||||
;;
|
;;
|
||||||
|
kernel* | msvc* )
|
||||||
|
# Restricted further below
|
||||||
|
;;
|
||||||
|
'')
|
||||||
|
if test x"$obj" = x
|
||||||
|
then
|
||||||
|
echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2
|
||||||
|
fi
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
|
echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $obj in
|
||||||
|
aout* | coff* | elf* | pe*)
|
||||||
|
;;
|
||||||
|
'')
|
||||||
|
# empty is fine
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Here we handle the constraint that a (synthetic) cpu and os are
|
||||||
|
# valid only in combination with each other and nowhere else.
|
||||||
|
case $cpu-$os in
|
||||||
|
# The "javascript-unknown-ghcjs" triple is used by GHC; we
|
||||||
|
# accept it here in order to tolerate that, but reject any
|
||||||
|
# variations.
|
||||||
|
javascript-ghcjs)
|
||||||
|
;;
|
||||||
|
javascript-* | *-ghcjs)
|
||||||
|
echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# As a final step for OS-related things, validate the OS-kernel combination
|
# As a final step for OS-related things, validate the OS-kernel combination
|
||||||
# (given a valid OS), if there is a kernel.
|
# (given a valid OS), if there is a kernel.
|
||||||
case $kernel-$os in
|
case $kernel-$os-$obj in
|
||||||
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
|
linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \
|
||||||
| linux-musl* | linux-relibc* | linux-uclibc* )
|
| linux-mlibc*- | linux-musl*- | linux-newlib*- \
|
||||||
|
| linux-relibc*- | linux-uclibc*- )
|
||||||
;;
|
;;
|
||||||
uclinux-uclibc* )
|
uclinux-uclibc*- )
|
||||||
;;
|
;;
|
||||||
-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
|
managarm-mlibc*- | managarm-kernel*- )
|
||||||
|
;;
|
||||||
|
windows*-msvc*-)
|
||||||
|
;;
|
||||||
|
-dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \
|
||||||
|
| -uclibc*- )
|
||||||
# These are just libc implementations, not actual OSes, and thus
|
# These are just libc implementations, not actual OSes, and thus
|
||||||
# require a kernel.
|
# require a kernel.
|
||||||
echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
|
echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
kfreebsd*-gnu* | kopensolaris*-gnu*)
|
-kernel*- )
|
||||||
|
echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
|
||||||
|
exit 1
|
||||||
;;
|
;;
|
||||||
vxworks-simlinux | vxworks-simwindows | vxworks-spe)
|
*-kernel*- )
|
||||||
|
echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
|
||||||
|
exit 1
|
||||||
;;
|
;;
|
||||||
nto-qnx*)
|
*-msvc*- )
|
||||||
|
echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
|
||||||
|
exit 1
|
||||||
;;
|
;;
|
||||||
os2-emx)
|
kfreebsd*-gnu*- | kopensolaris*-gnu*-)
|
||||||
;;
|
;;
|
||||||
*-eabi* | *-gnueabi*)
|
vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
|
||||||
;;
|
;;
|
||||||
-*)
|
nto-qnx*-)
|
||||||
|
;;
|
||||||
|
os2-emx-)
|
||||||
|
;;
|
||||||
|
*-eabi*- | *-gnueabi*-)
|
||||||
|
;;
|
||||||
|
none--*)
|
||||||
|
# None (no kernel, i.e. freestanding / bare metal),
|
||||||
|
# can be paired with an machine code file format
|
||||||
|
;;
|
||||||
|
-*-)
|
||||||
# Blank kernel with real OS is always fine.
|
# Blank kernel with real OS is always fine.
|
||||||
;;
|
;;
|
||||||
*-*)
|
--*)
|
||||||
echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
|
# Blank kernel and OS with real machine code file format is always fine.
|
||||||
|
;;
|
||||||
|
*-*-*)
|
||||||
|
echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -1879,7 +1960,7 @@ case $vendor in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "$cpu-$vendor-${kernel:+$kernel-}$os"
|
echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
|
||||||
exit
|
exit
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2024 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
|
||||||
@@ -395,7 +395,7 @@ int main(void)
|
|||||||
printf(
|
printf(
|
||||||
"/*\n"
|
"/*\n"
|
||||||
" Simple DirectMedia Layer\n"
|
" Simple DirectMedia Layer\n"
|
||||||
" Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>\n"
|
" Copyright (C) 1997-2024 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,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2024 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
|
||||||
@@ -113,7 +113,7 @@ int main(void)
|
|||||||
printf(
|
printf(
|
||||||
"/*\n"
|
"/*\n"
|
||||||
" Simple DirectMedia Layer\n"
|
" Simple DirectMedia Layer\n"
|
||||||
" Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>\n"
|
" Copyright (C) 1997-2024 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"
|
||||||
|
@@ -2418,7 +2418,7 @@ libtool_validate_options ()
|
|||||||
case $host in
|
case $host in
|
||||||
# Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
|
# Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
|
||||||
# see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
|
# see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
|
||||||
*cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
|
*cygwin* | *mingw* | *windows* | *pw32* | *cegcc* | *solaris2* | *os2*)
|
||||||
# don't eliminate duplications in $postdeps and $predeps
|
# don't eliminate duplications in $postdeps and $predeps
|
||||||
opt_duplicate_compiler_generated_deps=:
|
opt_duplicate_compiler_generated_deps=:
|
||||||
;;
|
;;
|
||||||
@@ -2750,7 +2750,7 @@ EOF
|
|||||||
|
|
||||||
# func_convert_core_file_wine_to_w32 ARG
|
# func_convert_core_file_wine_to_w32 ARG
|
||||||
# Helper function used by file name conversion functions when $build is *nix,
|
# Helper function used by file name conversion functions when $build is *nix,
|
||||||
# and $host is mingw, cygwin, or some other w32 environment. Relies on a
|
# and $host is mingw, windows, cygwin, or some other w32 environment. Relies on a
|
||||||
# correctly configured wine environment available, with the winepath program
|
# correctly configured wine environment available, with the winepath program
|
||||||
# in $build's $PATH.
|
# in $build's $PATH.
|
||||||
#
|
#
|
||||||
@@ -2782,9 +2782,10 @@ func_convert_core_file_wine_to_w32 ()
|
|||||||
|
|
||||||
# func_convert_core_path_wine_to_w32 ARG
|
# func_convert_core_path_wine_to_w32 ARG
|
||||||
# Helper function used by path conversion functions when $build is *nix, and
|
# Helper function used by path conversion functions when $build is *nix, and
|
||||||
# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
|
# $host is mingw, windows, cygwin, or some other w32 environment. Relies on a
|
||||||
# configured wine environment available, with the winepath program in $build's
|
# correctly configured wine environment available, with the winepath program
|
||||||
# $PATH. Assumes ARG has no leading or trailing path separator characters.
|
# in $build's $PATH. Assumes ARG has no leading or trailing path separator
|
||||||
|
# characters.
|
||||||
#
|
#
|
||||||
# ARG is path to be converted from $build format to win32.
|
# ARG is path to be converted from $build format to win32.
|
||||||
# Result is available in $func_convert_core_path_wine_to_w32_result.
|
# Result is available in $func_convert_core_path_wine_to_w32_result.
|
||||||
@@ -3439,7 +3440,7 @@ func_mode_compile ()
|
|||||||
|
|
||||||
# On Cygwin there's no "real" PIC flag so we must build both object types
|
# On Cygwin there's no "real" PIC flag so we must build both object types
|
||||||
case $host_os in
|
case $host_os in
|
||||||
cygwin* | mingw* | pw32* | os2* | cegcc*)
|
cygwin* | mingw* | windows* | pw32* | os2* | cegcc*)
|
||||||
pic_mode=default
|
pic_mode=default
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -4316,7 +4317,7 @@ func_mode_install ()
|
|||||||
'exit $?'
|
'exit $?'
|
||||||
tstripme=$stripme
|
tstripme=$stripme
|
||||||
case $host_os in
|
case $host_os in
|
||||||
cygwin* | mingw* | pw32* | cegcc*)
|
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||||
case $realname in
|
case $realname in
|
||||||
*.dll.a)
|
*.dll.a)
|
||||||
tstripme=
|
tstripme=
|
||||||
@@ -4429,7 +4430,7 @@ func_mode_install ()
|
|||||||
|
|
||||||
# Do a test to see if this is really a libtool program.
|
# Do a test to see if this is really a libtool program.
|
||||||
case $host in
|
case $host in
|
||||||
*cygwin* | *mingw*)
|
*cygwin* | *mingw* | *windows*)
|
||||||
if func_ltwrapper_executable_p "$file"; then
|
if func_ltwrapper_executable_p "$file"; then
|
||||||
func_ltwrapper_scriptname "$file"
|
func_ltwrapper_scriptname "$file"
|
||||||
wrapper=$func_ltwrapper_scriptname_result
|
wrapper=$func_ltwrapper_scriptname_result
|
||||||
@@ -4657,7 +4658,7 @@ extern \"C\" {
|
|||||||
$RM $export_symbols
|
$RM $export_symbols
|
||||||
eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
|
eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
|
||||||
case $host in
|
case $host in
|
||||||
*cygwin* | *mingw* | *cegcc* )
|
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||||
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
|
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
|
||||||
eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
|
eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
|
||||||
;;
|
;;
|
||||||
@@ -4669,7 +4670,7 @@ extern \"C\" {
|
|||||||
eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
|
eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
|
||||||
eval '$MV "$nlist"T "$nlist"'
|
eval '$MV "$nlist"T "$nlist"'
|
||||||
case $host in
|
case $host in
|
||||||
*cygwin* | *mingw* | *cegcc* )
|
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||||
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
|
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
|
||||||
eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
|
eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
|
||||||
;;
|
;;
|
||||||
@@ -4683,7 +4684,7 @@ extern \"C\" {
|
|||||||
func_basename "$dlprefile"
|
func_basename "$dlprefile"
|
||||||
name=$func_basename_result
|
name=$func_basename_result
|
||||||
case $host in
|
case $host in
|
||||||
*cygwin* | *mingw* | *cegcc* )
|
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||||
# if an import library, we need to obtain dlname
|
# if an import library, we need to obtain dlname
|
||||||
if func_win32_import_lib_p "$dlprefile"; then
|
if func_win32_import_lib_p "$dlprefile"; then
|
||||||
func_tr_sh "$dlprefile"
|
func_tr_sh "$dlprefile"
|
||||||
@@ -4858,7 +4859,7 @@ static const void *lt_preloaded_setup() {
|
|||||||
# Transform the symbol file into the correct name.
|
# Transform the symbol file into the correct name.
|
||||||
symfileobj=$output_objdir/${my_outputname}S.$objext
|
symfileobj=$output_objdir/${my_outputname}S.$objext
|
||||||
case $host in
|
case $host in
|
||||||
*cygwin* | *mingw* | *cegcc* )
|
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||||
if test -f "$output_objdir/$my_outputname.def"; then
|
if test -f "$output_objdir/$my_outputname.def"; then
|
||||||
compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
|
compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
|
||||||
finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
|
finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
|
||||||
@@ -5201,7 +5202,7 @@ func_extract_archives ()
|
|||||||
#
|
#
|
||||||
# Emit a libtool wrapper script on stdout.
|
# Emit a libtool wrapper script on stdout.
|
||||||
# Don't directly open a file because we may want to
|
# Don't directly open a file because we may want to
|
||||||
# incorporate the script contents within a cygwin/mingw
|
# incorporate the script contents within a cygwin/mingw/windows
|
||||||
# wrapper executable. Must ONLY be called from within
|
# wrapper executable. Must ONLY be called from within
|
||||||
# func_mode_link because it depends on a number of variables
|
# func_mode_link because it depends on a number of variables
|
||||||
# set therein.
|
# set therein.
|
||||||
@@ -5209,7 +5210,7 @@ func_extract_archives ()
|
|||||||
# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
|
# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
|
||||||
# variable will take. If 'yes', then the emitted script
|
# variable will take. If 'yes', then the emitted script
|
||||||
# will assume that the directory where it is stored is
|
# will assume that the directory where it is stored is
|
||||||
# the $objdir directory. This is a cygwin/mingw-specific
|
# the $objdir directory. This is a cygwin/mingw/windows-specific
|
||||||
# behavior.
|
# behavior.
|
||||||
func_emit_wrapper ()
|
func_emit_wrapper ()
|
||||||
{
|
{
|
||||||
@@ -5333,7 +5334,7 @@ func_exec_program_core ()
|
|||||||
"
|
"
|
||||||
case $host in
|
case $host in
|
||||||
# Backslashes separate directories on plain windows
|
# Backslashes separate directories on plain windows
|
||||||
*-*-mingw | *-*-os2* | *-cegcc*)
|
*-*-mingw* | *-*-windows* | *-*-os2* | *-cegcc*)
|
||||||
$ECHO "\
|
$ECHO "\
|
||||||
if test -n \"\$lt_option_debug\"; then
|
if test -n \"\$lt_option_debug\"; then
|
||||||
\$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
|
\$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
|
||||||
@@ -5401,7 +5402,7 @@ func_exec_program ()
|
|||||||
file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
|
file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
|
||||||
done
|
done
|
||||||
|
|
||||||
# Usually 'no', except on cygwin/mingw when embedded into
|
# Usually 'no', except on cygwin/mingw/windows when embedded into
|
||||||
# the cwrapper.
|
# the cwrapper.
|
||||||
WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
|
WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
|
||||||
if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
|
if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
|
||||||
@@ -5558,7 +5559,7 @@ EOF
|
|||||||
/* declarations of non-ANSI functions */
|
/* declarations of non-ANSI functions */
|
||||||
#if defined __MINGW32__
|
#if defined __MINGW32__
|
||||||
# ifdef __STRICT_ANSI__
|
# ifdef __STRICT_ANSI__
|
||||||
int _putenv (const char *);
|
_CRTIMP int __cdecl _putenv (const char *);
|
||||||
# endif
|
# endif
|
||||||
#elif defined __CYGWIN__
|
#elif defined __CYGWIN__
|
||||||
# ifdef __STRICT_ANSI__
|
# ifdef __STRICT_ANSI__
|
||||||
@@ -5756,7 +5757,7 @@ main (int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
EOF
|
EOF
|
||||||
case $host in
|
case $host in
|
||||||
*mingw* | *cygwin* )
|
*mingw* | *windows* | *cygwin* )
|
||||||
# make stdout use "unix" line endings
|
# make stdout use "unix" line endings
|
||||||
echo " setmode(1,_O_BINARY);"
|
echo " setmode(1,_O_BINARY);"
|
||||||
;;
|
;;
|
||||||
@@ -5859,7 +5860,7 @@ EOF
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
mingw*)
|
mingw* | windows*)
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
{
|
{
|
||||||
char* p;
|
char* p;
|
||||||
@@ -5901,7 +5902,7 @@ EOF
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
mingw*)
|
mingw* | windows*)
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
/* execv doesn't actually work on mingw as expected on unix */
|
/* execv doesn't actually work on mingw as expected on unix */
|
||||||
newargz = prepare_spawn (newargz);
|
newargz = prepare_spawn (newargz);
|
||||||
@@ -6320,7 +6321,7 @@ lt_update_lib_path (const char *name, const char *value)
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
case $host_os in
|
case $host_os in
|
||||||
mingw*)
|
mingw* | windows*)
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
|
|
||||||
/* Prepares an argument vector before calling spawn().
|
/* Prepares an argument vector before calling spawn().
|
||||||
@@ -6495,7 +6496,7 @@ func_mode_link ()
|
|||||||
$debug_cmd
|
$debug_cmd
|
||||||
|
|
||||||
case $host in
|
case $host in
|
||||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||||
# It is impossible to link a dll without this setting, and
|
# It is impossible to link a dll without this setting, and
|
||||||
# we shouldn't force the makefile maintainer to figure out
|
# we shouldn't force the makefile maintainer to figure out
|
||||||
# what system we are compiling for in order to pass an extra
|
# what system we are compiling for in order to pass an extra
|
||||||
@@ -7003,7 +7004,7 @@ func_mode_link ()
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
case $host in
|
case $host in
|
||||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||||
testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
|
testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
|
||||||
case :$dllsearchpath: in
|
case :$dllsearchpath: in
|
||||||
*":$dir:"*) ;;
|
*":$dir:"*) ;;
|
||||||
@@ -7023,7 +7024,7 @@ func_mode_link ()
|
|||||||
-l*)
|
-l*)
|
||||||
if test X-lc = "X$arg" || test X-lm = "X$arg"; then
|
if test X-lc = "X$arg" || test X-lm = "X$arg"; then
|
||||||
case $host in
|
case $host in
|
||||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
|
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
|
||||||
# These systems don't actually have a C or math library (as such)
|
# These systems don't actually have a C or math library (as such)
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
@@ -7118,7 +7119,7 @@ func_mode_link ()
|
|||||||
|
|
||||||
-no-install)
|
-no-install)
|
||||||
case $host in
|
case $host in
|
||||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
|
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
|
||||||
# The PATH hackery in wrapper scripts is required on Windows
|
# The PATH hackery in wrapper scripts is required on Windows
|
||||||
# and Darwin in order for the loader to find any dlls it needs.
|
# and Darwin in order for the loader to find any dlls it needs.
|
||||||
func_warning "'-no-install' is ignored for $host"
|
func_warning "'-no-install' is ignored for $host"
|
||||||
@@ -7303,13 +7304,26 @@ func_mode_link ()
|
|||||||
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
|
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
|
||||||
# -specs=* GCC specs files
|
# -specs=* GCC specs files
|
||||||
# -stdlib=* select c++ std lib with clang
|
# -stdlib=* select c++ std lib with clang
|
||||||
|
# -fdiagnostics-color* simply affects output
|
||||||
|
# -frecord-gcc-switches used to verify flags were respected
|
||||||
# -fsanitize=* Clang/GCC memory and address sanitizer
|
# -fsanitize=* Clang/GCC memory and address sanitizer
|
||||||
|
# -fno-sanitize* Clang/GCC memory and address sanitizer
|
||||||
|
# -shared-libsan Link with shared sanitizer runtimes (Clang)
|
||||||
|
# -static-libsan Link with static sanitizer runtimes (Clang)
|
||||||
# -fuse-ld=* Linker select flags for GCC
|
# -fuse-ld=* Linker select flags for GCC
|
||||||
|
# -rtlib=* select c runtime lib with clang
|
||||||
|
# --unwindlib=* select unwinder library with clang
|
||||||
|
# -f{file|debug|macro|profile}-prefix-map=* needed for lto linking
|
||||||
# -Wa,* Pass flags directly to the assembler
|
# -Wa,* Pass flags directly to the assembler
|
||||||
|
# -Werror, -Werror=* Report (specified) warnings as errors
|
||||||
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
|
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
|
||||||
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
|
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
|
||||||
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
|
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*| \
|
||||||
-specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*)
|
-stdlib=*|-rtlib=*|--unwindlib=*| \
|
||||||
|
-specs=*|-fsanitize=*|-fno-sanitize*|-shared-libsan|-static-libsan| \
|
||||||
|
-ffile-prefix-map=*|-fdebug-prefix-map=*|-fmacro-prefix-map=*|-fprofile-prefix-map=*| \
|
||||||
|
-fdiagnostics-color*|-frecord-gcc-switches| \
|
||||||
|
-fuse-ld=*|-Wa,*|-Werror|-Werror=*)
|
||||||
func_quote_for_eval "$arg"
|
func_quote_for_eval "$arg"
|
||||||
arg=$func_quote_for_eval_result
|
arg=$func_quote_for_eval_result
|
||||||
func_append compile_command " $arg"
|
func_append compile_command " $arg"
|
||||||
@@ -8022,7 +8036,7 @@ func_mode_link ()
|
|||||||
fi
|
fi
|
||||||
case $host in
|
case $host in
|
||||||
# special handling for platforms with PE-DLLs.
|
# special handling for platforms with PE-DLLs.
|
||||||
*cygwin* | *mingw* | *cegcc* )
|
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||||
# Linker will automatically link against shared library if both
|
# Linker will automatically link against shared library if both
|
||||||
# static and shared are present. Therefore, ensure we extract
|
# static and shared are present. Therefore, ensure we extract
|
||||||
# symbols from the import library if a shared library is present
|
# symbols from the import library if a shared library is present
|
||||||
@@ -8166,7 +8180,7 @@ func_mode_link ()
|
|||||||
if test -n "$library_names" &&
|
if test -n "$library_names" &&
|
||||||
{ test no = "$use_static_libs" || test -z "$old_library"; }; then
|
{ test no = "$use_static_libs" || test -z "$old_library"; }; then
|
||||||
case $host in
|
case $host in
|
||||||
*cygwin* | *mingw* | *cegcc* | *os2*)
|
*cygwin* | *mingw* | *windows* | *cegcc* | *os2*)
|
||||||
# No point in relinking DLLs because paths are not encoded
|
# No point in relinking DLLs because paths are not encoded
|
||||||
func_append notinst_deplibs " $lib"
|
func_append notinst_deplibs " $lib"
|
||||||
need_relink=no
|
need_relink=no
|
||||||
@@ -8236,7 +8250,7 @@ func_mode_link ()
|
|||||||
elif test -n "$soname_spec"; then
|
elif test -n "$soname_spec"; then
|
||||||
# bleh windows
|
# bleh windows
|
||||||
case $host in
|
case $host in
|
||||||
*cygwin* | mingw* | *cegcc*) # | *os2* # SDL customization: removed OS/2 versioning support.
|
*cygwin* | mingw* | *windows* | *cegcc*) # | *os2* # SDL customization: removed OS/2 versioning support.
|
||||||
func_arith $current - $age
|
func_arith $current - $age
|
||||||
major=$func_arith_result
|
major=$func_arith_result
|
||||||
versuffix=-$major
|
versuffix=-$major
|
||||||
@@ -8845,7 +8859,7 @@ func_mode_link ()
|
|||||||
age=$number_minor
|
age=$number_minor
|
||||||
revision=$number_revision
|
revision=$number_revision
|
||||||
;;
|
;;
|
||||||
freebsd-aout|qnx|sunos)
|
freebsd-aout|qnx|sco|sunos)
|
||||||
current=$number_major
|
current=$number_major
|
||||||
revision=$number_minor
|
revision=$number_minor
|
||||||
age=0
|
age=0
|
||||||
@@ -9146,7 +9160,7 @@ func_mode_link ()
|
|||||||
if test yes = "$build_libtool_libs"; then
|
if test yes = "$build_libtool_libs"; then
|
||||||
if test -n "$rpath"; then
|
if test -n "$rpath"; then
|
||||||
case $host in
|
case $host in
|
||||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
|
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
|
||||||
# these systems don't actually have a c library (as such)!
|
# these systems don't actually have a c library (as such)!
|
||||||
;;
|
;;
|
||||||
*-*-rhapsody* | *-*-darwin1.[012])
|
*-*-rhapsody* | *-*-darwin1.[012])
|
||||||
@@ -9660,7 +9674,7 @@ EOF
|
|||||||
|
|
||||||
orig_export_symbols=
|
orig_export_symbols=
|
||||||
case $host_os in
|
case $host_os in
|
||||||
cygwin* | mingw* | cegcc*)
|
cygwin* | mingw* | windows* | cegcc*)
|
||||||
if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
|
if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
|
||||||
# exporting using user supplied symfile
|
# exporting using user supplied symfile
|
||||||
func_dll_def_p "$export_symbols" || {
|
func_dll_def_p "$export_symbols" || {
|
||||||
@@ -10330,7 +10344,7 @@ EOF
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
case $host in
|
case $host in
|
||||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||||
testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
|
testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
|
||||||
case :$dllsearchpath: in
|
case :$dllsearchpath: in
|
||||||
*":$libdir:"*) ;;
|
*":$libdir:"*) ;;
|
||||||
@@ -10408,7 +10422,7 @@ EOF
|
|||||||
# Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
|
# Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
|
||||||
wrappers_required=false
|
wrappers_required=false
|
||||||
;;
|
;;
|
||||||
*cygwin* | *mingw* )
|
*cygwin* | *mingw* | *windows* )
|
||||||
test yes = "$build_libtool_libs" || wrappers_required=false
|
test yes = "$build_libtool_libs" || wrappers_required=false
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -10561,7 +10575,7 @@ EOF
|
|||||||
*) exeext= ;;
|
*) exeext= ;;
|
||||||
esac
|
esac
|
||||||
case $host in
|
case $host in
|
||||||
*cygwin* | *mingw* )
|
*cygwin* | *mingw* | windows* )
|
||||||
func_dirname_and_basename "$output" "" "."
|
func_dirname_and_basename "$output" "" "."
|
||||||
output_name=$func_basename_result
|
output_name=$func_basename_result
|
||||||
output_path=$func_dirname_result
|
output_path=$func_dirname_result
|
||||||
@@ -10893,7 +10907,7 @@ EOF
|
|||||||
# tests/bindir.at for full details.
|
# tests/bindir.at for full details.
|
||||||
tdlname=$dlname
|
tdlname=$dlname
|
||||||
case $host,$output,$installed,$module,$dlname in
|
case $host,$output,$installed,$module,$dlname in
|
||||||
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
|
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *windows*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
|
||||||
# If a -bindir argument was supplied, place the dll there.
|
# If a -bindir argument was supplied, place the dll there.
|
||||||
if test -n "$bindir"; then
|
if test -n "$bindir"; then
|
||||||
func_relative_path "$install_libdir" "$bindir"
|
func_relative_path "$install_libdir" "$bindir"
|
||||||
|
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
cd `dirname $0`/..
|
||||||
|
|
||||||
ref_major=$(sed -ne 's/^#define SDL_MAJOR_VERSION *//p' include/SDL_version.h)
|
ref_major=$(sed -ne 's/^#define SDL_MAJOR_VERSION *//p' include/SDL_version.h)
|
||||||
ref_minor=$(sed -ne 's/^#define SDL_MINOR_VERSION *//p' include/SDL_version.h)
|
ref_minor=$(sed -ne 's/^#define SDL_MINOR_VERSION *//p' include/SDL_version.h)
|
||||||
ref_micro=$(sed -ne 's/^#define SDL_PATCHLEVEL *//p' include/SDL_version.h)
|
ref_micro=$(sed -ne 's/^#define SDL_PATCHLEVEL *//p' include/SDL_version.h)
|
||||||
@@ -139,6 +141,25 @@ else
|
|||||||
not_ok "Info-Framework.plist CFBundleVersion $version disagrees with SDL_version.h $ref_version"
|
not_ok "Info-Framework.plist CFBundleVersion $version disagrees with SDL_version.h $ref_version"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
version=$(sed -Ene 's/Title SDL (.*)/\1/p' Xcode/SDL/pkg-support/SDL.info)
|
||||||
|
|
||||||
|
if [ "$ref_version" = "$version" ]; then
|
||||||
|
ok "SDL.info Title $version"
|
||||||
|
else
|
||||||
|
not_ok "SDL.info Title $version disagrees with SDL_version.h $ref_version"
|
||||||
|
fi
|
||||||
|
|
||||||
|
marketing=$(sed -Ene 's/.*MARKETING_VERSION = (.*);/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj)
|
||||||
|
|
||||||
|
ref="$ref_version
|
||||||
|
$ref_version"
|
||||||
|
|
||||||
|
if [ "$ref" = "$marketing" ]; then
|
||||||
|
ok "project.pbxproj MARKETING_VERSION is consistent"
|
||||||
|
else
|
||||||
|
not_ok "project.pbxproj MARKETING_VERSION is inconsistent, expected $ref, got $marketing"
|
||||||
|
fi
|
||||||
|
|
||||||
# For simplicity this assumes we'll never break ABI before SDL 3.
|
# For simplicity this assumes we'll never break ABI before SDL 3.
|
||||||
dylib_compat=$(sed -Ene 's/.*DYLIB_COMPATIBILITY_VERSION = (.*);$/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj)
|
dylib_compat=$(sed -Ene 's/.*DYLIB_COMPATIBILITY_VERSION = (.*);$/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj)
|
||||||
|
|
||||||
|
@@ -1,7 +1,15 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
find . -type f -exec grep -Il "Copyright" {} \; \
|
if [ "$SED" = "" ]; then
|
||||||
|
if type gsed >/dev/null; then
|
||||||
|
SED=gsed
|
||||||
|
else
|
||||||
|
SED=sed
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
find . -type f \
|
||||||
| grep -v \.git \
|
| grep -v \.git \
|
||||||
| while read file; do \
|
| while read file; do \
|
||||||
LC_ALL=C sed -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
|
LC_ALL=C $SED -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
|
||||||
done
|
done
|
||||||
|
@@ -30,6 +30,10 @@ echo "Updating version to '$NEWVERSION' ..."
|
|||||||
# !!! FIXME: This first one is a kinda scary search/replace that might fail later if another X.Y.Z version is added to the file.
|
# !!! FIXME: This first one is a kinda scary search/replace that might fail later if another X.Y.Z version is added to the file.
|
||||||
perl -w -pi -e 's/(\<string\>)\d+\.\d+\.\d+/${1}'$NEWVERSION'/;' Xcode/SDL/Info-Framework.plist
|
perl -w -pi -e 's/(\<string\>)\d+\.\d+\.\d+/${1}'$NEWVERSION'/;' Xcode/SDL/Info-Framework.plist
|
||||||
|
|
||||||
|
perl -w -pi -e 's/(Title SDL )\d+\.\d+\.\d+/${1}'$NEWVERSION'/;' Xcode/SDL/pkg-support/SDL.info
|
||||||
|
|
||||||
|
perl -w -pi -e 's/(MARKETING_VERSION\s*=\s*)\d+\.\d+\.\d+/${1}'$NEWVERSION'/;' Xcode/SDL/SDL.xcodeproj/project.pbxproj
|
||||||
|
|
||||||
DYVER=`expr $MINOR \* 100 + 1`
|
DYVER=`expr $MINOR \* 100 + 1`
|
||||||
perl -w -pi -e 's/(DYLIB_CURRENT_VERSION\s*=\s*)\d+\.\d+\.\d+/${1}'$DYVER'.0.0/;' Xcode/SDL/SDL.xcodeproj/project.pbxproj
|
perl -w -pi -e 's/(DYLIB_CURRENT_VERSION\s*=\s*)\d+\.\d+\.\d+/${1}'$DYVER'.0.0/;' Xcode/SDL/SDL.xcodeproj/project.pbxproj
|
||||||
|
|
||||||
|
@@ -10,6 +10,7 @@ my $projectfullname = 'Simple Directmedia Layer';
|
|||||||
my $projectshortname = 'SDL';
|
my $projectshortname = 'SDL';
|
||||||
my $wikisubdir = '';
|
my $wikisubdir = '';
|
||||||
my $incsubdir = 'include';
|
my $incsubdir = 'include';
|
||||||
|
my $readmesubdir = undef;
|
||||||
my $apiprefixregex = undef;
|
my $apiprefixregex = undef;
|
||||||
my $versionfname = 'include/SDL_version.h';
|
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';
|
||||||
@@ -22,10 +23,12 @@ my $wikiurl = 'https://wiki.libsdl.org';
|
|||||||
my $bugreporturl = 'https://github.com/libsdl-org/sdlwiki/issues/new';
|
my $bugreporturl = 'https://github.com/libsdl-org/sdlwiki/issues/new';
|
||||||
my $srcpath = undef;
|
my $srcpath = undef;
|
||||||
my $wikipath = undef;
|
my $wikipath = undef;
|
||||||
|
my $wikireadmesubdir = 'README';
|
||||||
my $warn_about_missing = 0;
|
my $warn_about_missing = 0;
|
||||||
my $copy_direction = 0;
|
my $copy_direction = 0;
|
||||||
my $optionsfname = undef;
|
my $optionsfname = undef;
|
||||||
my $wikipreamble = undef;
|
my $wikipreamble = undef;
|
||||||
|
my $changeformat = undef;
|
||||||
|
|
||||||
foreach (@ARGV) {
|
foreach (@ARGV) {
|
||||||
$warn_about_missing = 1, next if $_ eq '--warn-about-missing';
|
$warn_about_missing = 1, next if $_ eq '--warn-about-missing';
|
||||||
@@ -36,6 +39,9 @@ foreach (@ARGV) {
|
|||||||
if (/\A--options=(.*)\Z/) {
|
if (/\A--options=(.*)\Z/) {
|
||||||
$optionsfname = $1;
|
$optionsfname = $1;
|
||||||
next;
|
next;
|
||||||
|
} elsif (/\A--changeformat=(.*)\Z/) {
|
||||||
|
$changeformat = $1;
|
||||||
|
next;
|
||||||
}
|
}
|
||||||
$srcpath = $_, next if not defined $srcpath;
|
$srcpath = $_, next if not defined $srcpath;
|
||||||
$wikipath = $_, next if not defined $wikipath;
|
$wikipath = $_, next if not defined $wikipath;
|
||||||
@@ -67,6 +73,7 @@ if (defined $optionsfname) {
|
|||||||
$projectshortname = $val, next if $key eq 'projectshortname';
|
$projectshortname = $val, next if $key eq 'projectshortname';
|
||||||
$wikisubdir = $val, next if $key eq 'wikisubdir';
|
$wikisubdir = $val, next if $key eq 'wikisubdir';
|
||||||
$incsubdir = $val, next if $key eq 'incsubdir';
|
$incsubdir = $val, next if $key eq 'incsubdir';
|
||||||
|
$readmesubdir = $val, next if $key eq 'readmesubdir';
|
||||||
$versionmajorregex = $val, next if $key eq 'versionmajorregex';
|
$versionmajorregex = $val, next if $key eq 'versionmajorregex';
|
||||||
$versionminorregex = $val, next if $key eq 'versionminorregex';
|
$versionminorregex = $val, next if $key eq 'versionminorregex';
|
||||||
$versionpatchregex = $val, next if $key eq 'versionpatchregex';
|
$versionpatchregex = $val, next if $key eq 'versionpatchregex';
|
||||||
@@ -131,6 +138,7 @@ sub wordwrap_with_bullet_indent { # don't call this directly.
|
|||||||
my $usual_prefix = ' ' x $bulletlen;
|
my $usual_prefix = ' ' x $bulletlen;
|
||||||
|
|
||||||
foreach (@wrappedlines) {
|
foreach (@wrappedlines) {
|
||||||
|
s/\s*\Z//;
|
||||||
$retval .= "$prefix$_\n";
|
$retval .= "$prefix$_\n";
|
||||||
$prefix = $usual_prefix;
|
$prefix = $usual_prefix;
|
||||||
}
|
}
|
||||||
@@ -255,10 +263,30 @@ sub wikify_chunk {
|
|||||||
$str .= "<syntaxhighlight lang='$codelang'>$code<\/syntaxhighlight>";
|
$str .= "<syntaxhighlight lang='$codelang'>$code<\/syntaxhighlight>";
|
||||||
}
|
}
|
||||||
} elsif ($wikitype eq 'md') {
|
} elsif ($wikitype eq 'md') {
|
||||||
|
# convert `code` things first, so they aren't mistaken for other markdown items.
|
||||||
|
my $codedstr = '';
|
||||||
|
while ($str =~ s/\A(.*?)(\`.*?\`)//ms) {
|
||||||
|
my $codeblock = $2;
|
||||||
|
$codedstr .= wikify_chunk($wikitype, $1, undef, undef);
|
||||||
|
if (defined $apiprefixregex) {
|
||||||
|
# Convert obvious API things to wikilinks, even inside `code` blocks,
|
||||||
|
# BUT ONLY IF the entire code block is the API thing,
|
||||||
|
# So something like "just call `SDL_Whatever`" will become
|
||||||
|
# "just call [`SDL_Whatever`](SDL_Whatever)", but
|
||||||
|
# "just call `SDL_Whatever(7)`" will not. It's just the safest
|
||||||
|
# way to do this without resorting to wrapping things in html <code> tags.
|
||||||
|
$codeblock =~ s/\A\`($apiprefixregex[a-zA-Z0-9_]+)\`\Z/[`$1`]($1)/gms;
|
||||||
|
}
|
||||||
|
$codedstr .= $codeblock;
|
||||||
|
}
|
||||||
|
|
||||||
# Convert obvious API things to wikilinks.
|
# Convert obvious API things to wikilinks.
|
||||||
if (defined $apiprefixregex) {
|
if (defined $apiprefixregex) {
|
||||||
$str =~ s/\b($apiprefixregex[a-zA-Z0-9_]+)/[$1]($1)/gms;
|
$str =~ s/\b($apiprefixregex[a-zA-Z0-9_]+)/[$1]($1)/gms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$str = $codedstr . $str;
|
||||||
|
|
||||||
if (defined $code) {
|
if (defined $code) {
|
||||||
$str .= "```$codelang$code```";
|
$str .= "```$codelang$code```";
|
||||||
}
|
}
|
||||||
@@ -325,6 +353,11 @@ sub dewikify_chunk {
|
|||||||
|
|
||||||
# bullets
|
# bullets
|
||||||
$str =~ s/^\* /- /gm;
|
$str =~ s/^\* /- /gm;
|
||||||
|
} elsif ($wikitype eq 'md') {
|
||||||
|
# Dump obvious wikilinks. The rest can just passthrough.
|
||||||
|
if (defined $apiprefixregex) {
|
||||||
|
$str =~ s/\[(\`?$apiprefixregex[a-zA-Z0-9_]+\`?)\]\($apiprefixregex[a-zA-Z0-9_]+\)/$1/gms;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined $code) {
|
if (defined $code) {
|
||||||
@@ -355,6 +388,30 @@ sub dewikify_chunk {
|
|||||||
|
|
||||||
# bullets
|
# bullets
|
||||||
$str =~ s/^\* /\n\\\(bu /gm;
|
$str =~ s/^\* /\n\\\(bu /gm;
|
||||||
|
} elsif ($wikitype eq 'md') {
|
||||||
|
# Dump obvious wikilinks.
|
||||||
|
if (defined $apiprefixregex) {
|
||||||
|
$str =~ s/\[(\`?$apiprefixregex[a-zA-Z0-9_]+\`?)\]\($apiprefixregex[a-zA-Z0-9_]+\)/\n.BR $1\n/gms;
|
||||||
|
}
|
||||||
|
|
||||||
|
# links
|
||||||
|
$str =~ s/\[(.*?)]\((https?\:\/\/.*?)\)/\n.URL "$2" "$1"\n/g;
|
||||||
|
|
||||||
|
# <code></code> is also popular. :/
|
||||||
|
$str =~ s/\s*\`(.*?)\`\s*/\n.BR $1\n/gms;
|
||||||
|
|
||||||
|
# bold+italic
|
||||||
|
$str =~ s/\s*\*\*\*(.*?)\*\*\*\s*/\n.BI $1\n/gms;
|
||||||
|
|
||||||
|
# bold
|
||||||
|
$str =~ s/\s*\*\*(.*?)\*\*\s*/\n.B $1\n/gms;
|
||||||
|
|
||||||
|
# italic
|
||||||
|
$str =~ s/\s*\*(.*?)\*\s*/\n.I $1\n/gms;
|
||||||
|
|
||||||
|
# bullets
|
||||||
|
$str =~ s/^\- /\n\\\(bu /gm;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
die("Unexpected wikitype when converting to manpages\n"); # !!! FIXME: need to handle Markdown wiki pages.
|
die("Unexpected wikitype when converting to manpages\n"); # !!! FIXME: need to handle Markdown wiki pages.
|
||||||
}
|
}
|
||||||
@@ -399,6 +456,23 @@ sub dewikify {
|
|||||||
return $retval;
|
return $retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub filecopy {
|
||||||
|
my $src = shift;
|
||||||
|
my $dst = shift;
|
||||||
|
my $endline = shift;
|
||||||
|
$endline = "\n" if not defined $endline;
|
||||||
|
|
||||||
|
open(COPYIN, '<', $src) or die("Failed to open '$src' for reading: $!\n");
|
||||||
|
open(COPYOUT, '>', $dst) or die("Failed to open '$dst' for writing: $!\n");
|
||||||
|
while (<COPYIN>) {
|
||||||
|
chomp;
|
||||||
|
s/[ \t\r\n]*\Z//;
|
||||||
|
print COPYOUT "$_$endline";
|
||||||
|
}
|
||||||
|
close(COPYOUT);
|
||||||
|
close(COPYIN);
|
||||||
|
}
|
||||||
|
|
||||||
sub usage {
|
sub usage {
|
||||||
die("USAGE: $0 <source code git clone path> <wiki git clone path> [--copy-to-headers|--copy-to-wiki|--copy-to-manpages] [--warn-about-missing]\n\n");
|
die("USAGE: $0 <source code git clone path> <wiki git clone path> [--copy-to-headers|--copy-to-wiki|--copy-to-manpages] [--warn-about-missing]\n\n");
|
||||||
}
|
}
|
||||||
@@ -415,6 +489,7 @@ my @standard_wiki_sections = (
|
|||||||
'Function Parameters',
|
'Function Parameters',
|
||||||
'Return Value',
|
'Return Value',
|
||||||
'Remarks',
|
'Remarks',
|
||||||
|
'Thread Safety',
|
||||||
'Version',
|
'Version',
|
||||||
'Code Examples',
|
'Code Examples',
|
||||||
'Related Functions'
|
'Related Functions'
|
||||||
@@ -438,9 +513,15 @@ my %headerfuncshasdoxygen = (); # $headerfuncschunk{"SDL_OpenAudio"} -> 1 if t
|
|||||||
my $incpath = "$srcpath";
|
my $incpath = "$srcpath";
|
||||||
$incpath .= "/$incsubdir" if $incsubdir ne '';
|
$incpath .= "/$incsubdir" if $incsubdir ne '';
|
||||||
|
|
||||||
|
my $wikireadmepath = "$wikipath/$wikireadmesubdir";
|
||||||
|
my $readmepath = undef;
|
||||||
|
if (defined $readmesubdir) {
|
||||||
|
$readmepath = "$srcpath/$readmesubdir";
|
||||||
|
}
|
||||||
|
|
||||||
opendir(DH, $incpath) or die("Can't opendir '$incpath': $!\n");
|
opendir(DH, $incpath) or die("Can't opendir '$incpath': $!\n");
|
||||||
while (readdir(DH)) {
|
while (my $d = readdir(DH)) {
|
||||||
my $dent = $_;
|
my $dent = $d;
|
||||||
next if not $dent =~ /$selectheaderregex/; # just selected headers.
|
next if not $dent =~ /$selectheaderregex/; # just selected headers.
|
||||||
open(FH, '<', "$incpath/$dent") or die("Can't open '$incpath/$dent': $!\n");
|
open(FH, '<', "$incpath/$dent") or die("Can't open '$incpath/$dent': $!\n");
|
||||||
|
|
||||||
@@ -588,8 +669,8 @@ my %wikitypes = (); # contains string of wiki page extension, like $wikitypes{"
|
|||||||
my %wikifuncs = (); # contains references to hash of strings, each string being the full contents of a section of a wiki page, like $wikifuncs{"SDL_OpenAudio"}{"Remarks"}.
|
my %wikifuncs = (); # contains references to hash of strings, each string being the full contents of a section of a wiki page, like $wikifuncs{"SDL_OpenAudio"}{"Remarks"}.
|
||||||
my %wikisectionorder = (); # contains references to array, each array item being a key to a wikipage section in the correct order, like $wikisectionorder{"SDL_OpenAudio"}[2] == 'Remarks'
|
my %wikisectionorder = (); # contains references to array, each array item being a key to a wikipage section in the correct order, like $wikisectionorder{"SDL_OpenAudio"}[2] == 'Remarks'
|
||||||
opendir(DH, $wikipath) or die("Can't opendir '$wikipath': $!\n");
|
opendir(DH, $wikipath) or die("Can't opendir '$wikipath': $!\n");
|
||||||
while (readdir(DH)) {
|
while (my $d = readdir(DH)) {
|
||||||
my $dent = $_;
|
my $dent = $d;
|
||||||
my $type = '';
|
my $type = '';
|
||||||
if ($dent =~ /\.(md|mediawiki)\Z/) {
|
if ($dent =~ /\.(md|mediawiki)\Z/) {
|
||||||
$type = $1;
|
$type = $1;
|
||||||
@@ -726,13 +807,14 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
next if not defined $wikifuncs{$fn}; # don't have a page for that function, skip it.
|
next if not defined $wikifuncs{$fn}; # don't have a page for that function, skip it.
|
||||||
my $wikitype = $wikitypes{$fn};
|
my $wikitype = $wikitypes{$fn};
|
||||||
my $sectionsref = $wikifuncs{$fn};
|
my $sectionsref = $wikifuncs{$fn};
|
||||||
my $remarks = %$sectionsref{'Remarks'};
|
my $remarks = $sectionsref->{'Remarks'};
|
||||||
my $params = %$sectionsref{'Function Parameters'};
|
my $params = $sectionsref->{'Function Parameters'};
|
||||||
my $returns = %$sectionsref{'Return Value'};
|
my $returns = $sectionsref->{'Return Value'};
|
||||||
my $version = %$sectionsref{'Version'};
|
my $threadsafety = $sectionsref->{'Thread Safety'};
|
||||||
my $related = %$sectionsref{'Related Functions'};
|
my $version = $sectionsref->{'Version'};
|
||||||
my $deprecated = %$sectionsref{'Deprecated'};
|
my $related = $sectionsref->{'Related Functions'};
|
||||||
my $brief = %$sectionsref{'[Brief]'};
|
my $deprecated = $sectionsref->{'Deprecated'};
|
||||||
|
my $brief = $sectionsref->{'[Brief]'};
|
||||||
my $addblank = 0;
|
my $addblank = 0;
|
||||||
my $str = '';
|
my $str = '';
|
||||||
|
|
||||||
@@ -797,6 +879,33 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
$str .= "${whitespace}$_\n";
|
$str .= "${whitespace}$_\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} elsif ($wikitype eq 'md') {
|
||||||
|
my $l;
|
||||||
|
$l = shift @lines;
|
||||||
|
die("Unexpected data parsing Markdown table") if (not $l =~ /\A\s*\|\s*\|\s*\|\s*\Z/);
|
||||||
|
$l = shift @lines;
|
||||||
|
die("Unexpected data parsing Markdown table") if (not $l =~ /\A\s*\|\s*\-*\s*\|\s*\-*\s*\|\s*\Z/);
|
||||||
|
while (scalar(@lines) >= 1) {
|
||||||
|
$l = shift @lines;
|
||||||
|
if ($l =~ /\A\s*\|\s*(.*?)\s*\|\s*(.*?)\s*\|\s*\Z/) {
|
||||||
|
my $name = $1;
|
||||||
|
my $desc = $2;
|
||||||
|
$name =~ s/\A\*\*(.*?)\*\*/$1/;
|
||||||
|
$name =~ s/\A\'\'\'(.*?)\'\'\'/$1/;
|
||||||
|
#print STDERR "FN: $fn NAME: $name DESC: $desc\n";
|
||||||
|
my $whitespacelen = length($name) + 8;
|
||||||
|
my $whitespace = ' ' x $whitespacelen;
|
||||||
|
$desc = wordwrap($desc, -$whitespacelen);
|
||||||
|
my @desclines = split /\n/, $desc;
|
||||||
|
my $firstline = shift @desclines;
|
||||||
|
$str .= "\\param $name $firstline\n";
|
||||||
|
foreach (@desclines) {
|
||||||
|
$str .= "${whitespace}$_\n";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
last; # we seem to have run out of table.
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
die("write me");
|
die("write me");
|
||||||
}
|
}
|
||||||
@@ -821,6 +930,21 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (defined $threadsafety) {
|
||||||
|
# !!! FIXME: lots of code duplication in all of these.
|
||||||
|
$str .= "\n" if $addblank; $addblank = 1;
|
||||||
|
my $v = dewikify($wikitype, $threadsafety);
|
||||||
|
my $whitespacelen = length("\\threadsafety") + 1;
|
||||||
|
my $whitespace = ' ' x $whitespacelen;
|
||||||
|
$v = wordwrap($v, -$whitespacelen);
|
||||||
|
my @desclines = split /\n/, $v;
|
||||||
|
my $firstline = shift @desclines;
|
||||||
|
$str .= "\\threadsafety $firstline\n";
|
||||||
|
foreach (@desclines) {
|
||||||
|
$str .= "${whitespace}$_\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (defined $version) {
|
if (defined $version) {
|
||||||
# !!! FIXME: lots of code duplication in all of these.
|
# !!! FIXME: lots of code duplication in all of these.
|
||||||
$str .= "\n" if $addblank; $addblank = 1;
|
$str .= "\n" if $addblank; $addblank = 1;
|
||||||
@@ -845,6 +969,7 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
s/\A(\:|\* )//;
|
s/\A(\:|\* )//;
|
||||||
s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func"
|
s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func"
|
||||||
s/\[\[(.*?)\]\]/$1/; # in case some wikilinks remain.
|
s/\[\[(.*?)\]\]/$1/; # in case some wikilinks remain.
|
||||||
|
s/\[(.*?)\]\(.*?\)/$1/; # in case some wikilinks remain.
|
||||||
s/\A\/*//;
|
s/\A\/*//;
|
||||||
$str .= "\\sa $_\n";
|
$str .= "\\sa $_\n";
|
||||||
}
|
}
|
||||||
@@ -905,11 +1030,32 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
rename($path, "$incpath/$header") or die("Can't rename '$path' to '$incpath/$header': $!\n");
|
rename($path, "$incpath/$header") or die("Can't rename '$path' to '$incpath/$header': $!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (defined $readmepath) {
|
||||||
|
if ( -d $wikireadmepath ) {
|
||||||
|
mkdir($readmepath); # just in case
|
||||||
|
opendir(DH, $wikireadmepath) or die("Can't opendir '$wikireadmepath': $!\n");
|
||||||
|
while (readdir(DH)) {
|
||||||
|
my $dent = $_;
|
||||||
|
if ($dent =~ /\A(.*?)\.md\Z/) { # we only bridge Markdown files here.
|
||||||
|
next if $1 eq 'FrontPage';
|
||||||
|
filecopy("$wikireadmepath/$dent", "$readmepath/README-$dent", "\r\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir(DH);
|
||||||
|
}
|
||||||
|
}
|
||||||
} elsif ($copy_direction == -1) { # --copy-to-wiki
|
} elsif ($copy_direction == -1) { # --copy-to-wiki
|
||||||
|
|
||||||
|
if (defined $changeformat) {
|
||||||
|
$dewikify_mode = $changeformat;
|
||||||
|
$wordwrap_mode = $changeformat;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (keys %headerfuncs) {
|
foreach (keys %headerfuncs) {
|
||||||
my $fn = $_;
|
my $fn = $_;
|
||||||
next if not $headerfuncshasdoxygen{$fn};
|
next if not $headerfuncshasdoxygen{$fn};
|
||||||
my $wikitype = defined $wikitypes{$fn} ? $wikitypes{$fn} : 'mediawiki'; # default to MediaWiki for new stuff FOR NOW.
|
my $origwikitype = defined $wikitypes{$fn} ? $wikitypes{$fn} : 'md'; # default to MarkDown for new stuff.
|
||||||
|
my $wikitype = (defined $changeformat) ? $changeformat : $origwikitype;
|
||||||
die("Unexpected wikitype '$wikitype'\n") if (($wikitype ne 'mediawiki') and ($wikitype ne 'md') and ($wikitype ne 'manpage'));
|
die("Unexpected wikitype '$wikitype'\n") if (($wikitype ne 'mediawiki') and ($wikitype ne 'md') and ($wikitype ne 'manpage'));
|
||||||
|
|
||||||
#print("$fn\n"); next;
|
#print("$fn\n"); next;
|
||||||
@@ -1047,6 +1193,21 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
}
|
}
|
||||||
$desc =~ s/[\s\n]+\Z//ms;
|
$desc =~ s/[\s\n]+\Z//ms;
|
||||||
$sections{'Version'} = wordwrap(wikify($wikitype, $desc)) . "\n";
|
$sections{'Version'} = wordwrap(wikify($wikitype, $desc)) . "\n";
|
||||||
|
} elsif ($l =~ /\A\\threadsafety\s+(.*)\Z/) {
|
||||||
|
my $desc = $1;
|
||||||
|
while (@doxygenlines) {
|
||||||
|
my $subline = $doxygenlines[0];
|
||||||
|
$subline =~ s/\A\s*//;
|
||||||
|
last if $subline =~ /\A\\/; # some sort of doxygen command, assume we're past this thing.
|
||||||
|
shift @doxygenlines; # dump this line from the array; we're using it.
|
||||||
|
if ($subline eq '') { # empty line, make sure it keeps the newline char.
|
||||||
|
$desc .= "\n";
|
||||||
|
} else {
|
||||||
|
$desc .= " $subline";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$desc =~ s/[\s\n]+\Z//ms;
|
||||||
|
$sections{'Thread Safety'} = wordwrap(wikify($wikitype, $desc)) . "\n";
|
||||||
} elsif ($l =~ /\A\\sa\s+(.*)\Z/) {
|
} elsif ($l =~ /\A\\sa\s+(.*)\Z/) {
|
||||||
my $sa = $1;
|
my $sa = $1;
|
||||||
$sa =~ s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func"
|
$sa =~ s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func"
|
||||||
@@ -1125,8 +1286,25 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
push @$wikisectionorderref, '[footer]';
|
push @$wikisectionorderref, '[footer]';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# If changing format, convert things that otherwise are passed through unmolested.
|
||||||
|
if (defined $changeformat) {
|
||||||
|
if (($dewikify_mode eq 'md') and ($origwikitype eq 'mediawiki')) {
|
||||||
|
$$sectionsref{'[footer]'} =~ s/\[\[(Category[a-zA-Z0-9_]+)\]\]/[$1]($1)/g;
|
||||||
|
} elsif (($dewikify_mode eq 'mediawiki') and ($origwikitype eq 'md')) {
|
||||||
|
$$sectionsref{'[footer]'} =~ s/\[(Category[a-zA-Z0-9_]+)\]\(.*?\)/[[$1]]/g;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (keys %only_wiki_sections) {
|
||||||
|
my $sect = $_;
|
||||||
|
if (defined $$sectionsref{$sect}) {
|
||||||
|
$$sectionsref{$sect} = wikify($wikitype, dewikify($origwikitype, $$sectionsref{$sect}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# !!! FIXME: This won't be CategoryAPI if we eventually handle things other than functions.
|
# !!! FIXME: This won't be CategoryAPI if we eventually handle things other than functions.
|
||||||
my $footer = $$sectionsref{'[footer]'};
|
my $footer = $$sectionsref{'[footer]'};
|
||||||
|
|
||||||
if ($wikitype eq 'mediawiki') {
|
if ($wikitype eq 'mediawiki') {
|
||||||
$footer =~ s/\[\[CategoryAPI\]\],?\s*//g;
|
$footer =~ s/\[\[CategoryAPI\]\],?\s*//g;
|
||||||
$footer = '[[CategoryAPI]]' . (($footer eq '') ? "\n" : ", $footer");
|
$footer = '[[CategoryAPI]]' . (($footer eq '') ? "\n" : ", $footer");
|
||||||
@@ -1137,10 +1315,11 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
$$sectionsref{'[footer]'} = $footer;
|
$$sectionsref{'[footer]'} = $footer;
|
||||||
|
|
||||||
if (defined $wikipreamble) {
|
if (defined $wikipreamble) {
|
||||||
|
my $wikified_preamble = wikify($wikitype, $wikipreamble);
|
||||||
if ($wikitype eq 'mediawiki') {
|
if ($wikitype eq 'mediawiki') {
|
||||||
print FH "====== $wikipreamble ======\n";
|
print FH "====== $wikified_preamble ======\n";
|
||||||
} elsif ($wikitype eq 'md') {
|
} elsif ($wikitype eq 'md') {
|
||||||
print FH "###### $wikipreamble\n";
|
print FH "###### $wikified_preamble\n";
|
||||||
} else { die("Unexpected wikitype '$wikitype'\n"); }
|
} else { die("Unexpected wikitype '$wikitype'\n"); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1185,9 +1364,51 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
|
|
||||||
print FH "\n\n";
|
print FH "\n\n";
|
||||||
close(FH);
|
close(FH);
|
||||||
|
|
||||||
|
if (defined $changeformat and ($origwikitype ne $wikitype)) {
|
||||||
|
system("cd '$wikipath' ; git mv '$_.${origwikitype}' '$_.${wikitype}'");
|
||||||
|
unlink("$wikipath/$_.${origwikitype}");
|
||||||
|
}
|
||||||
|
|
||||||
rename($path, "$wikipath/$_.${wikitype}") or die("Can't rename '$path' to '$wikipath/$_.${wikitype}': $!\n");
|
rename($path, "$wikipath/$_.${wikitype}") or die("Can't rename '$path' to '$wikipath/$_.${wikitype}': $!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (defined $readmepath) {
|
||||||
|
if ( -d $readmepath ) {
|
||||||
|
mkdir($wikireadmepath); # just in case
|
||||||
|
opendir(DH, $readmepath) or die("Can't opendir '$readmepath': $!\n");
|
||||||
|
while (my $d = readdir(DH)) {
|
||||||
|
my $dent = $d;
|
||||||
|
if ($dent =~ /\AREADME\-(.*?\.md)\Z/) { # we only bridge Markdown files here.
|
||||||
|
my $wikifname = $1;
|
||||||
|
next if $wikifname eq 'FrontPage.md';
|
||||||
|
filecopy("$readmepath/$dent", "$wikireadmepath/$wikifname", "\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir(DH);
|
||||||
|
|
||||||
|
my @pages = ();
|
||||||
|
opendir(DH, $wikireadmepath) or die("Can't opendir '$wikireadmepath': $!\n");
|
||||||
|
while (my $d = readdir(DH)) {
|
||||||
|
my $dent = $d;
|
||||||
|
if ($dent =~ /\A(.*?)\.(mediawiki|md)\Z/) {
|
||||||
|
my $wikiname = $1;
|
||||||
|
next if $wikiname eq 'FrontPage';
|
||||||
|
push @pages, $wikiname;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir(DH);
|
||||||
|
|
||||||
|
open(FH, '>', "$wikireadmepath/FrontPage.md") or die("Can't open '$wikireadmepath/FrontPage.md': $!\n");
|
||||||
|
print FH "# All READMEs available here\n\n";
|
||||||
|
foreach (sort @pages) {
|
||||||
|
my $wikiname = $_;
|
||||||
|
print FH "- [$wikiname]($wikiname)\n";
|
||||||
|
}
|
||||||
|
close(FH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} elsif ($copy_direction == -2) { # --copy-to-manpages
|
} elsif ($copy_direction == -2) { # --copy-to-manpages
|
||||||
# This only takes from the wiki data, since it has sections we omit from the headers, like code examples.
|
# This only takes from the wiki data, since it has sections we omit from the headers, like code examples.
|
||||||
|
|
||||||
@@ -1235,14 +1456,15 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
next if not defined $wikifuncs{$fn}; # don't have a page for that function, skip it.
|
next if not defined $wikifuncs{$fn}; # don't have a page for that function, skip it.
|
||||||
my $wikitype = $wikitypes{$fn};
|
my $wikitype = $wikitypes{$fn};
|
||||||
my $sectionsref = $wikifuncs{$fn};
|
my $sectionsref = $wikifuncs{$fn};
|
||||||
my $remarks = %$sectionsref{'Remarks'};
|
my $remarks = $sectionsref->{'Remarks'};
|
||||||
my $params = %$sectionsref{'Function Parameters'};
|
my $params = $sectionsref->{'Function Parameters'};
|
||||||
my $returns = %$sectionsref{'Return Value'};
|
my $returns = $sectionsref->{'Return Value'};
|
||||||
my $version = %$sectionsref{'Version'};
|
my $version = $sectionsref->{'Version'};
|
||||||
my $related = %$sectionsref{'Related Functions'};
|
my $threadsafety = $sectionsref->{'Thread Safety'};
|
||||||
my $examples = %$sectionsref{'Code Examples'};
|
my $related = $sectionsref->{'Related Functions'};
|
||||||
my $deprecated = %$sectionsref{'Deprecated'};
|
my $examples = $sectionsref->{'Code Examples'};
|
||||||
my $brief = %$sectionsref{'[Brief]'};
|
my $deprecated = $sectionsref->{'Deprecated'};
|
||||||
|
my $brief = $sectionsref->{'[Brief]'};
|
||||||
my $decl = $headerdecls{$fn};
|
my $decl = $headerdecls{$fn};
|
||||||
my $str = '';
|
my $str = '';
|
||||||
|
|
||||||
@@ -1329,6 +1551,28 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
$str .= ".I $name\n";
|
$str .= ".I $name\n";
|
||||||
$str .= "$desc\n";
|
$str .= "$desc\n";
|
||||||
}
|
}
|
||||||
|
} elsif ($wikitype eq 'md') {
|
||||||
|
my $l;
|
||||||
|
$l = shift @lines;
|
||||||
|
die("Unexpected data parsing Markdown table") if (not $l =~ /\A\s*\|\s*\|\s*\|\s*\Z/);
|
||||||
|
$l = shift @lines;
|
||||||
|
die("Unexpected data parsing Markdown table") if (not $l =~ /\A\s*\|\s*\-*\s*\|\s*\-*\s*\|\s*\Z/);
|
||||||
|
while (scalar(@lines) >= 1) {
|
||||||
|
$l = shift @lines;
|
||||||
|
if ($l =~ /\A\s*\|\s*(.*?)\s*\|\s*(.*?)\s*\|\s*\Z/) {
|
||||||
|
my $name = $1;
|
||||||
|
my $desc = $2;
|
||||||
|
$name =~ s/\A\*\*(.*?)\*\*/$1/;
|
||||||
|
$name =~ s/\A\'\'\'(.*?)\'\'\'/$1/;
|
||||||
|
$desc = dewikify($wikitype, $desc);
|
||||||
|
|
||||||
|
$str .= ".TP\n";
|
||||||
|
$str .= ".I $name\n";
|
||||||
|
$str .= "$desc\n";
|
||||||
|
} else {
|
||||||
|
last; # we seem to have run out of table.
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
die("write me");
|
die("write me");
|
||||||
}
|
}
|
||||||
@@ -1346,6 +1590,11 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
$dewikify_manpage_code_indent = 1;
|
$dewikify_manpage_code_indent = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (defined $threadsafety) {
|
||||||
|
$str .= ".SH THREAD SAFETY\n";
|
||||||
|
$str .= dewikify($wikitype, $threadsafety) . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
if (defined $version) {
|
if (defined $version) {
|
||||||
$str .= ".SH AVAILABILITY\n";
|
$str .= ".SH AVAILABILITY\n";
|
||||||
$str .= dewikify($wikitype, $version) . "\n";
|
$str .= dewikify($wikitype, $version) . "\n";
|
||||||
@@ -1361,8 +1610,11 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||||||
s/\A(\:|\* )//;
|
s/\A(\:|\* )//;
|
||||||
s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func"
|
s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func"
|
||||||
s/\[\[(.*?)\]\]/$1/; # in case some wikilinks remain.
|
s/\[\[(.*?)\]\]/$1/; # in case some wikilinks remain.
|
||||||
|
s/\[(.*?)\]\(.*?\)/$1/; # in case some wikilinks remain.
|
||||||
|
s/\A\*\s*\Z//;
|
||||||
s/\A\/*//;
|
s/\A\/*//;
|
||||||
s/\A\.BR\s+//; # dewikify added this, but we want to handle it.
|
s/\A\.BR\s+//; # dewikify added this, but we want to handle it.
|
||||||
|
s/\A\.I\s+//; # dewikify added this, but we want to handle it.
|
||||||
s/\A\s+//;
|
s/\A\s+//;
|
||||||
s/\s+\Z//;
|
s/\s+\Z//;
|
||||||
next if $_ eq '';
|
next if $_ eq '';
|
||||||
|
@@ -32,6 +32,8 @@ function(check_cpu_architecture ARCH VARIABLE)
|
|||||||
_internal_check_cpu_architecture("defined(__arm__) || defined(_M_ARM)" arm32 ${VARIABLE})
|
_internal_check_cpu_architecture("defined(__arm__) || defined(_M_ARM)" arm32 ${VARIABLE})
|
||||||
elseif(ARCH STREQUAL "arm64")
|
elseif(ARCH STREQUAL "arm64")
|
||||||
_internal_check_cpu_architecture("defined(__aarch64__) || defined(_M_ARM64)" arm64 ${VARIABLE})
|
_internal_check_cpu_architecture("defined(__aarch64__) || defined(_M_ARM64)" arm64 ${VARIABLE})
|
||||||
|
elseif(ARCH STREQUAL "loongarch64")
|
||||||
|
_internal_check_cpu_architecture("defined(__loongarch64)" loongarch64 ${VARIABLE})
|
||||||
else()
|
else()
|
||||||
message(WARNING "Unknown CPU architectures (${ARCH}).")
|
message(WARNING "Unknown CPU architectures (${ARCH}).")
|
||||||
set(${VARIABLE} FALSE)
|
set(${VARIABLE} FALSE)
|
||||||
|
@@ -29,7 +29,7 @@ ENDMACRO()
|
|||||||
|
|
||||||
# Message Output
|
# Message Output
|
||||||
macro(MESSAGE_WARN _TEXT)
|
macro(MESSAGE_WARN _TEXT)
|
||||||
message(STATUS "*** WARNING: ${_TEXT}")
|
message(WARNING "${_TEXT}")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(MESSAGE_ERROR _TEXT)
|
macro(MESSAGE_ERROR _TEXT)
|
||||||
@@ -64,7 +64,7 @@ macro(MESSAGE_TESTED_OPTION _NAME)
|
|||||||
message(STATUS " ${_NAME}${_PAD}(Wanted: ${_REQVALUE}): ${HAVE_${_STRIPPEDNAME}}")
|
message(STATUS " ${_NAME}${_PAD}(Wanted: ${_REQVALUE}): ${HAVE_${_STRIPPEDNAME}}")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(LISTTOSTR _LIST _OUTPUT)
|
function(LISTTOSTR _LIST _OUTPUT)
|
||||||
if(${ARGC} EQUAL 3)
|
if(${ARGC} EQUAL 3)
|
||||||
# prefix for each element
|
# prefix for each element
|
||||||
set(_LPREFIX ${ARGV2})
|
set(_LPREFIX ${ARGV2})
|
||||||
@@ -73,10 +73,12 @@ macro(LISTTOSTR _LIST _OUTPUT)
|
|||||||
endif()
|
endif()
|
||||||
# Do not use string(REPLACE ";" " ") here to avoid messing up list
|
# Do not use string(REPLACE ";" " ") here to avoid messing up list
|
||||||
# entries
|
# entries
|
||||||
|
set(res)
|
||||||
foreach(_ITEM ${${_LIST}})
|
foreach(_ITEM ${${_LIST}})
|
||||||
set(${_OUTPUT} "${${_OUTPUT}} ${_LPREFIX}${_ITEM}")
|
set(res "${res} ${_LPREFIX}${_ITEM}")
|
||||||
endforeach()
|
endforeach()
|
||||||
endmacro()
|
set(${_OUTPUT} "${res}" PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
macro(LISTTOSTRREV _LIST _OUTPUT)
|
macro(LISTTOSTRREV _LIST _OUTPUT)
|
||||||
if(${ARGC} EQUAL 3)
|
if(${ARGC} EQUAL 3)
|
||||||
@@ -122,3 +124,25 @@ if(CMAKE_VERSION VERSION_LESS 3.13.0)
|
|||||||
link_directories(${ARGN})
|
link_directories(${ARGN})
|
||||||
endmacro()
|
endmacro()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# CMP0087: install(CODE) and install(SCRIPT) support generator expressions.
|
||||||
|
if(POLICY CMP0087)
|
||||||
|
cmake_policy(SET CMP0087 NEW)
|
||||||
|
endif()
|
||||||
|
function(SDL_install_pdb TARGET DIRECTORY)
|
||||||
|
get_property(type TARGET ${TARGET} PROPERTY TYPE)
|
||||||
|
if(type MATCHES "^(SHARED_LIBRARY|EXECUTABLE)$")
|
||||||
|
if(NOT CMAKE_VERSION VERSION_LESS 3.1)
|
||||||
|
install(FILES $<TARGET_PDB_FILE:${TARGET}> DESTINATION "${DIRECTORY}" OPTIONAL)
|
||||||
|
endif()
|
||||||
|
elseif(type STREQUAL "STATIC_LIBRARY")
|
||||||
|
if(NOT CMAKE_VERSION VERSION_LESS 3.15)
|
||||||
|
# FIXME: Use $<TARGET_COMPILE_PDB_FILE:${TARGET} once it becomes available (https://gitlab.kitware.com/cmake/cmake/-/issues/25244)
|
||||||
|
if(CMAKE_GENERATOR MATCHES "^Visual Studio.*")
|
||||||
|
install(CODE "file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${DIRECTORY}\" TYPE FILE OPTIONAL FILES \"${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/${TARGET}.pdb\")")
|
||||||
|
else()
|
||||||
|
install(CODE "file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${DIRECTORY}\" TYPE FILE OPTIONAL FILES \"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${TARGET}.dir/${TARGET}.pdb\")")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
include(CMakeParseArguments)
|
include(CMakeParseArguments)
|
||||||
|
include(${SDL2_SOURCE_DIR}/cmake/sdlfind.cmake)
|
||||||
macro(FindLibraryAndSONAME _LIB)
|
macro(FindLibraryAndSONAME _LIB)
|
||||||
cmake_parse_arguments(FLAS "" "" "LIBDIRS" ${ARGN})
|
cmake_parse_arguments(FLAS "" "" "LIBDIRS" ${ARGN})
|
||||||
|
|
||||||
@@ -6,10 +7,18 @@ macro(FindLibraryAndSONAME _LIB)
|
|||||||
string(REGEX REPLACE "\\-" "_" _LNAME "${_UPPERLNAME}")
|
string(REGEX REPLACE "\\-" "_" _LNAME "${_UPPERLNAME}")
|
||||||
|
|
||||||
find_library(${_LNAME}_LIB ${_LIB} PATHS ${FLAS_LIBDIRS})
|
find_library(${_LNAME}_LIB ${_LIB} PATHS ${FLAS_LIBDIRS})
|
||||||
|
|
||||||
|
if(${_LNAME}_LIB MATCHES ".*\\${CMAKE_SHARED_LIBRARY_SUFFIX}.*" AND NOT ${_LNAME}_LIB MATCHES ".*\\${CMAKE_STATIC_LIBRARY_SUFFIX}.*")
|
||||||
|
set(${_LNAME}_SHARED TRUE)
|
||||||
|
else()
|
||||||
|
set(${_LNAME}_SHARED FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(${_LNAME}_LIB)
|
if(${_LNAME}_LIB)
|
||||||
# reduce the library name for shared linking
|
# reduce the library name for shared linking
|
||||||
|
|
||||||
get_filename_component(_LIB_REALPATH ${${_LNAME}_LIB} REALPATH) # resolves symlinks
|
get_filename_component(_LIB_REALPATH ${${_LNAME}_LIB} REALPATH) # resolves symlinks
|
||||||
|
get_filename_component(_LIB_DIRECTORY ${_LIB_REALPATH} DIRECTORY)
|
||||||
get_filename_component(_LIB_JUSTNAME ${_LIB_REALPATH} NAME)
|
get_filename_component(_LIB_JUSTNAME ${_LIB_REALPATH} NAME)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
@@ -18,6 +27,11 @@ macro(FindLibraryAndSONAME _LIB)
|
|||||||
string(REGEX REPLACE "(\\.[0-9]*)\\.[0-9\\.]*$" "\\1" _LIB_REGEXD "${_LIB_JUSTNAME}")
|
string(REGEX REPLACE "(\\.[0-9]*)\\.[0-9\\.]*$" "\\1" _LIB_REGEXD "${_LIB_JUSTNAME}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT EXISTS "${_LIB_DIRECTORY}/${_LIB_REGEXD}")
|
||||||
|
set(_LIB_REGEXD "${_LIB_JUSTNAME}")
|
||||||
|
endif()
|
||||||
|
set(${_LNAME}_LIBDIR "${_LIB_LIBDIR}")
|
||||||
|
|
||||||
SET(_DEBUG_FindSONAME FALSE)
|
SET(_DEBUG_FindSONAME FALSE)
|
||||||
if(_DEBUG_FindSONAME)
|
if(_DEBUG_FindSONAME)
|
||||||
message_warn("DYNLIB OUTPUTVAR: ${_LIB} ... ${_LNAME}_LIB")
|
message_warn("DYNLIB OUTPUTVAR: ${_LIB} ... ${_LNAME}_LIB")
|
||||||
@@ -83,26 +97,35 @@ endmacro()
|
|||||||
# - HAVE_SDL_LOADSO opt
|
# - HAVE_SDL_LOADSO opt
|
||||||
macro(CheckALSA)
|
macro(CheckALSA)
|
||||||
if(SDL_ALSA)
|
if(SDL_ALSA)
|
||||||
CHECK_INCLUDE_FILE(alsa/asoundlib.h HAVE_ASOUNDLIB_H)
|
sdlFindALSA()
|
||||||
if(HAVE_ASOUNDLIB_H)
|
if(ALSA_FOUND)
|
||||||
CHECK_LIBRARY_EXISTS(asound snd_pcm_recover "" HAVE_LIBASOUND)
|
file(GLOB ALSA_SOURCES "${SDL2_SOURCE_DIR}/src/audio/alsa/*.c")
|
||||||
endif()
|
|
||||||
if(HAVE_LIBASOUND)
|
|
||||||
set(HAVE_ALSA TRUE)
|
|
||||||
file(GLOB ALSA_SOURCES ${SDL2_SOURCE_DIR}/src/audio/alsa/*.c)
|
|
||||||
list(APPEND SOURCE_FILES ${ALSA_SOURCES})
|
list(APPEND SOURCE_FILES ${ALSA_SOURCES})
|
||||||
set(SDL_AUDIO_DRIVER_ALSA 1)
|
set(SDL_AUDIO_DRIVER_ALSA 1)
|
||||||
if(SDL_ALSA_SHARED AND NOT HAVE_SDL_LOADSO)
|
set(HAVE_ALSA TRUE)
|
||||||
message_warn("You must have SDL_LoadObject() support for dynamic ALSA loading")
|
set(HAVE_ALSA_SHARED FALSE)
|
||||||
|
if(SDL_ALSA_SHARED)
|
||||||
|
if(HAVE_SDL_LOADSO)
|
||||||
|
FindLibraryAndSONAME("asound")
|
||||||
|
if(ASOUND_LIB AND ASOUND_SHARED)
|
||||||
|
target_include_directories(sdl-build-options SYSTEM INTERFACE $<TARGET_PROPERTY:ALSA::ALSA,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||||
|
set(SDL_AUDIO_DRIVER_ALSA_DYNAMIC "\"${ASOUND_LIB_SONAME}\"")
|
||||||
|
set(HAVE_ALSA_SHARED TRUE)
|
||||||
|
else()
|
||||||
|
message(WARNING "Unable to find asound shared object")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(WARNING "You must have SDL_LoadObject() support for dynamic ALSA loading")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
FindLibraryAndSONAME("asound")
|
if(NOT HAVE_ALSA_SHARED)
|
||||||
if(SDL_ALSA_SHARED AND ASOUND_LIB AND HAVE_SDL_LOADSO)
|
list(APPEND CMAKE_DEPENDS ALSA::ALSA)
|
||||||
set(SDL_AUDIO_DRIVER_ALSA_DYNAMIC "\"${ASOUND_LIB_SONAME}\"")
|
list(APPEND PKGCONFIG_DEPENDS alsa)
|
||||||
set(HAVE_ALSA_SHARED TRUE)
|
|
||||||
else()
|
|
||||||
list(APPEND EXTRA_LIBS asound)
|
|
||||||
endif()
|
endif()
|
||||||
set(HAVE_SDL_AUDIO TRUE)
|
set(HAVE_SDL_AUDIO TRUE)
|
||||||
|
else()
|
||||||
|
set(HAVE_ALSA FALSE)
|
||||||
|
message(WARNING "Unable to found the alsa development library")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
@@ -143,7 +166,7 @@ endmacro()
|
|||||||
# - HAVE_SDL_LOADSO opt
|
# - HAVE_SDL_LOADSO opt
|
||||||
macro(CheckPulseAudio)
|
macro(CheckPulseAudio)
|
||||||
if(SDL_PULSEAUDIO)
|
if(SDL_PULSEAUDIO)
|
||||||
pkg_check_modules(PKG_PULSEAUDIO libpulse-simple)
|
pkg_check_modules(PKG_PULSEAUDIO libpulse>=0.9.15)
|
||||||
if(PKG_PULSEAUDIO_FOUND)
|
if(PKG_PULSEAUDIO_FOUND)
|
||||||
set(HAVE_PULSEAUDIO TRUE)
|
set(HAVE_PULSEAUDIO TRUE)
|
||||||
file(GLOB PULSEAUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/pulseaudio/*.c)
|
file(GLOB PULSEAUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/pulseaudio/*.c)
|
||||||
@@ -153,9 +176,9 @@ macro(CheckPulseAudio)
|
|||||||
if(SDL_PULSEAUDIO_SHARED AND NOT HAVE_SDL_LOADSO)
|
if(SDL_PULSEAUDIO_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||||
message_warn("You must have SDL_LoadObject() support for dynamic PulseAudio loading")
|
message_warn("You must have SDL_LoadObject() support for dynamic PulseAudio loading")
|
||||||
endif()
|
endif()
|
||||||
FindLibraryAndSONAME("pulse-simple" LIBDIRS ${PKG_PULSEAUDIO_LIBRARY_DIRS})
|
FindLibraryAndSONAME("pulse" LIBDIRS ${PKG_PULSEAUDIO_LIBRARY_DIRS})
|
||||||
if(SDL_PULSEAUDIO_SHARED AND PULSE_SIMPLE_LIB AND HAVE_SDL_LOADSO)
|
if(SDL_PULSEAUDIO_SHARED AND PULSE_LIB AND HAVE_SDL_LOADSO)
|
||||||
set(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "\"${PULSE_SIMPLE_LIB_SONAME}\"")
|
set(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "\"${PULSE_LIB_SONAME}\"")
|
||||||
set(HAVE_PULSEAUDIO_SHARED TRUE)
|
set(HAVE_PULSEAUDIO_SHARED TRUE)
|
||||||
else()
|
else()
|
||||||
list(APPEND EXTRA_LDFLAGS ${PKG_PULSEAUDIO_LDFLAGS})
|
list(APPEND EXTRA_LDFLAGS ${PKG_PULSEAUDIO_LDFLAGS})
|
||||||
@@ -357,7 +380,7 @@ macro(CheckLibSampleRate)
|
|||||||
set(HAVE_LIBSAMPLERATE TRUE)
|
set(HAVE_LIBSAMPLERATE TRUE)
|
||||||
set(HAVE_LIBSAMPLERATE_H TRUE)
|
set(HAVE_LIBSAMPLERATE_H TRUE)
|
||||||
if(SDL_LIBSAMPLERATE_SHARED)
|
if(SDL_LIBSAMPLERATE_SHARED)
|
||||||
target_include_directories(sdl-build-options INTERFACE $<TARGET_PROPERTY:SampleRate::samplerate,INTERFACE_INCLUDE_DIRECTORIES>)
|
target_include_directories(sdl-build-options SYSTEM INTERFACE $<TARGET_PROPERTY:SampleRate::samplerate,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||||
if(NOT HAVE_SDL_LOADSO)
|
if(NOT HAVE_SDL_LOADSO)
|
||||||
message_warn("You must have SDL_LoadObject() support for dynamic libsamplerate loading")
|
message_warn("You must have SDL_LoadObject() support for dynamic libsamplerate loading")
|
||||||
else()
|
else()
|
||||||
@@ -400,6 +423,7 @@ endmacro()
|
|||||||
# - SDL_X11_SHARED opt
|
# - SDL_X11_SHARED opt
|
||||||
# - HAVE_SDL_LOADSO opt
|
# - HAVE_SDL_LOADSO opt
|
||||||
macro(CheckX11)
|
macro(CheckX11)
|
||||||
|
cmake_push_check_state(RESET)
|
||||||
if(SDL_X11)
|
if(SDL_X11)
|
||||||
foreach(_LIB X11 Xext Xcursor Xi Xfixes Xrandr Xrender Xss)
|
foreach(_LIB X11 Xext Xcursor Xi Xfixes Xrandr Xrender Xss)
|
||||||
FindLibraryAndSONAME("${_LIB}")
|
FindLibraryAndSONAME("${_LIB}")
|
||||||
@@ -422,6 +446,7 @@ macro(CheckX11)
|
|||||||
|
|
||||||
if(X_INCLUDEDIR)
|
if(X_INCLUDEDIR)
|
||||||
list(APPEND EXTRA_CFLAGS "-I${X_INCLUDEDIR}")
|
list(APPEND EXTRA_CFLAGS "-I${X_INCLUDEDIR}")
|
||||||
|
list(APPEND CMAKE_REQUIRED_INCLUDES ${X_INCLUDEDIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_file(HAVE_XCURSOR_H NAMES "X11/Xcursor/Xcursor.h" HINTS "${X_INCLUDEDIR}")
|
find_file(HAVE_XCURSOR_H NAMES "X11/Xcursor/Xcursor.h" HINTS "${X_INCLUDEDIR}")
|
||||||
@@ -446,7 +471,9 @@ macro(CheckX11)
|
|||||||
list(APPEND SOURCE_FILES ${X11_SOURCES})
|
list(APPEND SOURCE_FILES ${X11_SOURCES})
|
||||||
set(SDL_VIDEO_DRIVER_X11 1)
|
set(SDL_VIDEO_DRIVER_X11 1)
|
||||||
|
|
||||||
# !!! FIXME: why is this disabled for Apple?
|
# Note: Disabled on Apple because the dynamic mode backend for X11 doesn't
|
||||||
|
# work properly on Apple during several issues like inconsistent paths
|
||||||
|
# among platforms. See #6778 (https://github.com/libsdl-org/SDL/issues/6778)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(SDL_X11_SHARED OFF)
|
set(SDL_X11_SHARED OFF)
|
||||||
endif()
|
endif()
|
||||||
@@ -597,6 +624,7 @@ macro(CheckX11)
|
|||||||
# Prevent Mesa from including X11 headers
|
# Prevent Mesa from including X11 headers
|
||||||
list(APPEND EXTRA_CFLAGS "-DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11")
|
list(APPEND EXTRA_CFLAGS "-DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11")
|
||||||
endif()
|
endif()
|
||||||
|
cmake_pop_check_state()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(WaylandProtocolGen _SCANNER _CODE_MODE _XML _PROTL)
|
macro(WaylandProtocolGen _SCANNER _CODE_MODE _XML _PROTL)
|
||||||
@@ -657,7 +685,7 @@ macro(CheckWayland)
|
|||||||
|
|
||||||
if(WAYLAND_FOUND)
|
if(WAYLAND_FOUND)
|
||||||
target_link_directories(sdl-build-options INTERFACE "${PKG_WAYLAND_LIBRARY_DIRS}")
|
target_link_directories(sdl-build-options INTERFACE "${PKG_WAYLAND_LIBRARY_DIRS}")
|
||||||
target_include_directories(sdl-build-options INTERFACE "${PKG_WAYLAND_INCLUDE_DIRS}")
|
target_include_directories(sdl-build-options SYSTEM INTERFACE "${PKG_WAYLAND_INCLUDE_DIRS}")
|
||||||
|
|
||||||
set(HAVE_WAYLAND TRUE)
|
set(HAVE_WAYLAND TRUE)
|
||||||
set(HAVE_SDL_VIDEO TRUE)
|
set(HAVE_SDL_VIDEO TRUE)
|
||||||
@@ -667,7 +695,7 @@ macro(CheckWayland)
|
|||||||
|
|
||||||
# We have to generate some protocol interface code for some unstable Wayland features.
|
# We have to generate some protocol interface code for some unstable Wayland features.
|
||||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
|
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
|
||||||
target_include_directories(sdl-build-options INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
|
target_include_directories(sdl-build-options SYSTEM INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
|
||||||
|
|
||||||
file(GLOB WAYLAND_PROTOCOLS_XML RELATIVE "${SDL2_SOURCE_DIR}/wayland-protocols/" "${SDL2_SOURCE_DIR}/wayland-protocols/*.xml")
|
file(GLOB WAYLAND_PROTOCOLS_XML RELATIVE "${SDL2_SOURCE_DIR}/wayland-protocols/" "${SDL2_SOURCE_DIR}/wayland-protocols/*.xml")
|
||||||
foreach(_XML ${WAYLAND_PROTOCOLS_XML})
|
foreach(_XML ${WAYLAND_PROTOCOLS_XML})
|
||||||
@@ -703,7 +731,7 @@ macro(CheckWayland)
|
|||||||
set(HAVE_WAYLAND_LIBDECOR TRUE)
|
set(HAVE_WAYLAND_LIBDECOR TRUE)
|
||||||
set(HAVE_LIBDECOR_H 1)
|
set(HAVE_LIBDECOR_H 1)
|
||||||
target_link_directories(sdl-build-options INTERFACE "${PKG_LIBDECOR_LIBRARY_DIRS}")
|
target_link_directories(sdl-build-options INTERFACE "${PKG_LIBDECOR_LIBRARY_DIRS}")
|
||||||
target_include_directories(sdl-build-options INTERFACE "${PKG_LIBDECOR_INCLUDE_DIRS}")
|
target_include_directories(sdl-build-options SYSTEM INTERFACE "${PKG_LIBDECOR_INCLUDE_DIRS}")
|
||||||
if(SDL_WAYLAND_LIBDECOR_SHARED AND NOT HAVE_SDL_LOADSO)
|
if(SDL_WAYLAND_LIBDECOR_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||||
message_warn("You must have SDL_LoadObject() support for dynamic libdecor loading")
|
message_warn("You must have SDL_LoadObject() support for dynamic libdecor loading")
|
||||||
endif()
|
endif()
|
||||||
@@ -714,6 +742,17 @@ macro(CheckWayland)
|
|||||||
else()
|
else()
|
||||||
list(APPEND EXTRA_LIBS ${PKG_LIBDECOR_LIBRARIES})
|
list(APPEND EXTRA_LIBS ${PKG_LIBDECOR_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
cmake_push_check_state()
|
||||||
|
list(APPEND CMAKE_REQUIRED_FLAGS ${PKG_LIBDECOR_CFLAGS})
|
||||||
|
list(APPEND CMAKE_REQUIRED_INCLUDES ${PKG_LIBDECOR_INCLUDE_DIRS})
|
||||||
|
list(APPEND CMAKE_REQUIRED_LIBRARIES ${PKG_LIBDECOR_LINK_LIBRARIES})
|
||||||
|
check_symbol_exists(libdecor_frame_get_max_content_size "libdecor.h" HAVE_LIBDECOR_FRAME_GET_MAX_CONTENT_SIZE)
|
||||||
|
check_symbol_exists(libdecor_frame_get_min_content_size "libdecor.h" HAVE_LIBDECOR_FRAME_GET_MIN_CONTENT_SIZE)
|
||||||
|
if(HAVE_LIBDECOR_FRAME_GET_MAX_CONTENT_SIZE AND HAVE_LIBDECOR_FRAME_GET_MIN_CONTENT_SIZE)
|
||||||
|
set(SDL_HAVE_LIBDECOR_GET_MIN_MAX 1)
|
||||||
|
endif()
|
||||||
|
cmake_pop_check_state()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -874,6 +913,22 @@ macro(CheckOpenGLES)
|
|||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
# Requires:
|
||||||
|
# - EGL
|
||||||
|
macro(CheckQNXScreen)
|
||||||
|
if(QNX AND HAVE_OPENGL_EGL)
|
||||||
|
check_c_source_compiles("
|
||||||
|
#include <screen/screen.h>
|
||||||
|
int main (int argc, char** argv) { return 0; }" HAVE_QNX_SCREEN)
|
||||||
|
if(HAVE_QNX_SCREEN)
|
||||||
|
set(SDL_VIDEO_DRIVER_QNX 1)
|
||||||
|
file(GLOB QNX_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/qnx/*.c)
|
||||||
|
list(APPEND SOURCE_FILES ${QNX_VIDEO_SOURCES})
|
||||||
|
list(APPEND EXTRA_LIBS screen EGL)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
# Requires:
|
# Requires:
|
||||||
# - nada
|
# - nada
|
||||||
# Optional:
|
# Optional:
|
||||||
@@ -924,6 +979,8 @@ macro(CheckPTHREAD)
|
|||||||
elseif(EMSCRIPTEN)
|
elseif(EMSCRIPTEN)
|
||||||
set(PTHREAD_CFLAGS "-D_REENTRANT -pthread")
|
set(PTHREAD_CFLAGS "-D_REENTRANT -pthread")
|
||||||
set(PTHREAD_LDFLAGS "-pthread")
|
set(PTHREAD_LDFLAGS "-pthread")
|
||||||
|
elseif(QNX)
|
||||||
|
# pthread support is baked in
|
||||||
else()
|
else()
|
||||||
set(PTHREAD_CFLAGS "-D_REENTRANT")
|
set(PTHREAD_CFLAGS "-D_REENTRANT")
|
||||||
set(PTHREAD_LDFLAGS "-lpthread")
|
set(PTHREAD_LDFLAGS "-lpthread")
|
||||||
@@ -946,7 +1003,6 @@ macro(CheckPTHREAD)
|
|||||||
list(APPEND SDL_CFLAGS ${PTHREAD_CFLAGS})
|
list(APPEND SDL_CFLAGS ${PTHREAD_CFLAGS})
|
||||||
|
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#define _GNU_SOURCE 1
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
pthread_mutexattr_t attr;
|
pthread_mutexattr_t attr;
|
||||||
@@ -957,7 +1013,6 @@ macro(CheckPTHREAD)
|
|||||||
set(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1)
|
set(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1)
|
||||||
else()
|
else()
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#define _GNU_SOURCE 1
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
pthread_mutexattr_t attr;
|
pthread_mutexattr_t attr;
|
||||||
@@ -988,10 +1043,13 @@ macro(CheckPTHREAD)
|
|||||||
check_include_files("pthread_np.h" HAVE_PTHREAD_NP_H)
|
check_include_files("pthread_np.h" HAVE_PTHREAD_NP_H)
|
||||||
if (HAVE_PTHREAD_H)
|
if (HAVE_PTHREAD_H)
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#define _GNU_SOURCE 1
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
pthread_setname_np(pthread_self(), \"\");
|
#ifdef __APPLE__
|
||||||
|
pthread_setname_np(\"\");
|
||||||
|
#else
|
||||||
|
pthread_setname_np(pthread_self(),\"\");
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}" HAVE_PTHREAD_SETNAME_NP)
|
}" HAVE_PTHREAD_SETNAME_NP)
|
||||||
if (HAVE_PTHREAD_NP_H)
|
if (HAVE_PTHREAD_NP_H)
|
||||||
@@ -1265,7 +1323,7 @@ macro(CheckKMSDRM)
|
|||||||
pkg_check_modules(PKG_KMSDRM libdrm gbm egl)
|
pkg_check_modules(PKG_KMSDRM libdrm gbm egl)
|
||||||
if(PKG_KMSDRM_FOUND AND HAVE_OPENGL_EGL)
|
if(PKG_KMSDRM_FOUND AND HAVE_OPENGL_EGL)
|
||||||
target_link_directories(sdl-build-options INTERFACE ${PKG_KMSDRM_LIBRARY_DIRS})
|
target_link_directories(sdl-build-options INTERFACE ${PKG_KMSDRM_LIBRARY_DIRS})
|
||||||
target_include_directories(sdl-build-options INTERFACE "${PKG_KMSDRM_INCLUDE_DIRS}")
|
target_include_directories(sdl-build-options SYSTEM INTERFACE "${PKG_KMSDRM_INCLUDE_DIRS}")
|
||||||
set(HAVE_KMSDRM TRUE)
|
set(HAVE_KMSDRM TRUE)
|
||||||
set(HAVE_SDL_VIDEO TRUE)
|
set(HAVE_SDL_VIDEO TRUE)
|
||||||
|
|
||||||
@@ -1291,3 +1349,63 @@ macro(CheckKMSDRM)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
macro(CheckLibUDev)
|
||||||
|
if(SDL_LIBUDEV)
|
||||||
|
check_include_file("libudev.h" have_libudev_header)
|
||||||
|
if(have_libudev_header)
|
||||||
|
set(HAVE_LIBUDEV_H TRUE)
|
||||||
|
FindLibraryAndSONAME(udev)
|
||||||
|
if(UDEV_LIB_SONAME)
|
||||||
|
set(SDL_UDEV_DYNAMIC "\"${UDEV_LIB_SONAME}\"")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
macro(CheckLibUnwind)
|
||||||
|
set(found_libunwind FALSE)
|
||||||
|
set(_libunwind_src "#include <libunwind.h>\nint main() {unw_context_t context; unw_getcontext(&context); return 0;}")
|
||||||
|
|
||||||
|
if(NOT found_libunwind)
|
||||||
|
cmake_push_check_state()
|
||||||
|
check_c_source_compiles("${_libunwind_src}" LIBC_HAS_WORKING_LIBUNWIND)
|
||||||
|
cmake_pop_check_state()
|
||||||
|
if(LIBC_HAS_WORKING_LIBUNWIND)
|
||||||
|
set(found_libunwind TRUE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT found_libunwind)
|
||||||
|
cmake_push_check_state()
|
||||||
|
list(APPEND CMAKE_REQUIRED_LIBRARIES "unwind")
|
||||||
|
check_c_source_compiles("${_libunwind_src}" LIBUNWIND_HAS_WORKINGLIBUNWIND)
|
||||||
|
cmake_pop_check_state()
|
||||||
|
if(LIBUNWIND_HAS_WORKINGLIBUNWIND)
|
||||||
|
set(found_libunwind TRUE)
|
||||||
|
list(APPEND EXTRA_TEST_LIBS unwind)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT found_libunwind)
|
||||||
|
set(LibUnwind_PKG_CONFIG_SPEC libunwind libunwind-generic)
|
||||||
|
pkg_check_modules(PC_LIBUNWIND IMPORTED_TARGET ${LibUnwind_PKG_CONFIG_SPEC})
|
||||||
|
if(PC_LIBUNWIND_FOUND)
|
||||||
|
cmake_push_check_state()
|
||||||
|
list(APPEND CMAKE_REQUIRED_LIBRARIES ${PC_LIBUNWIND_LIBRARIES})
|
||||||
|
list(APPEND CMAKE_REQUIRED_INCLUDES ${PC_LIBUNWIND_INCLUDE_DIRS})
|
||||||
|
check_c_source_compiles("${_libunwind_src}" PC_LIBUNWIND_HAS_WORKING_LIBUNWIND)
|
||||||
|
cmake_pop_check_state()
|
||||||
|
if(PC_LIBUNWIND_HAS_WORKING_LIBUNWIND)
|
||||||
|
set(found_libunwind TRUE)
|
||||||
|
list(APPEND EXTRA_TEST_LIBS ${PC_LIBUNWIND_LIBRARIES})
|
||||||
|
list(APPEND EXTRA_TEST_INCLUDES ${PC_LIBUNWIND_INCLUDE_DIRS})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(found_libunwind)
|
||||||
|
set(HAVE_LIBUNWIND_H TRUE)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
9
cmake/sdlfind.cmake
Normal file
9
cmake/sdlfind.cmake
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
macro(sdlFindALSA)
|
||||||
|
find_package(ALSA MODULE)
|
||||||
|
if(ALSA_FOUND AND (NOT TARGET ALSA::ALSA) )
|
||||||
|
add_Library(ALSA::ALSA UNKNOWN IMPORTED)
|
||||||
|
set_property(TARGET ALSA::ALSA PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ALSA_INCLUDE_DIRS})
|
||||||
|
set_property(TARGET ALSA::ALSA APPEND PROPERTY IMPORTED_LOCATION ${ALSA_LIBRARY})
|
||||||
|
endif()
|
||||||
|
endmacro()
|
59
cmake/sdlplatform.cmake
Normal file
59
cmake/sdlplatform.cmake
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
macro(SDL_DetectCMakePlatform)
|
||||||
|
set(SDL_CMAKE_PLATFORM )
|
||||||
|
# Get the platform
|
||||||
|
if(WIN32)
|
||||||
|
set(SDL_CMAKE_PLATFORM WINDOWS)
|
||||||
|
elseif(UNIX AND NOT APPLE)
|
||||||
|
if(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
|
||||||
|
set(SDL_CMAKE_PLATFORM LINUX)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES "kFreeBSD.*")
|
||||||
|
set(SDL_CMAKE_PLATFORM FREEBSD)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES "kNetBSD.*|NetBSD.*")
|
||||||
|
set(SDL_CMAKE_PLATFORM NETBSD)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES "kOpenBSD.*|OpenBSD.*")
|
||||||
|
set(SDL_CMAKE_PLATFORM OPENBSD)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES ".*GNU.*")
|
||||||
|
set(SDL_CMAKE_PLATFORM GNU)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
|
||||||
|
set(SDL_CMAKE_PLATFORM BSDI)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES "DragonFly.*|FreeBSD")
|
||||||
|
set(SDL_CMAKE_PLATFORM FREEBSD)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES "SYSV5.*")
|
||||||
|
set(SDL_CMAKE_PLATFORM SYSV5)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES "Solaris.*|SunOS.*")
|
||||||
|
set(SDL_CMAKE_PLATFORM SOLARIS)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES "HP-UX.*")
|
||||||
|
set(SDL_CMAKE_PLATFORM HPUX)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES "AIX.*")
|
||||||
|
set(SDL_CMAKE_PLATFORM AIX)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES "Minix.*")
|
||||||
|
set(SDL_CMAKE_PLATFORM MINIX)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES "QNX")
|
||||||
|
set(SDL_CMAKE_PLATFORM QNX)
|
||||||
|
endif()
|
||||||
|
elseif(APPLE)
|
||||||
|
if(CMAKE_SYSTEM_NAME MATCHES ".*Darwin.*")
|
||||||
|
set(SDL_CMAKE_PLATFORM DARWIN)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES ".*MacOS.*")
|
||||||
|
set(SDL_CMAKE_PLATFORM MACOSX)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES ".*tvOS.*")
|
||||||
|
set(SDL_CMAKE_PLATFORM TVOS)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES ".*iOS.*")
|
||||||
|
# !!! FIXME: remove the version check when we start requiring >= 3.14.0
|
||||||
|
if(CMAKE_VERSION VERSION_LESS 3.14)
|
||||||
|
set(SDL_CMAKE_PLATFORM IOS)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES "BeOS.*")
|
||||||
|
message_error("BeOS support has been removed as of SDL 2.0.2.")
|
||||||
|
elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku.*")
|
||||||
|
set(SDL_CMAKE_PLATFORM HAIKU)
|
||||||
|
elseif(NINTENDO_3DS)
|
||||||
|
set(SDL_CMAKE_PLATFORM N3DS)
|
||||||
|
elseif(OS2)
|
||||||
|
set(SDL_CMAKE_PLATFORM OS2)
|
||||||
|
endif()
|
||||||
|
if(SDL_CMAKE_PLATFORM)
|
||||||
|
set(${SDL_CMAKE_PLATFORM} TRUE)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
@@ -14,7 +14,7 @@ int main(int argc, char *argv[]) {
|
|||||||
640, 480,
|
640, 480,
|
||||||
SDL_WINDOW_SHOWN
|
SDL_WINDOW_SHOWN
|
||||||
);
|
);
|
||||||
if (window == NULL) {
|
if (!window) {
|
||||||
fprintf(stderr, "could not create window: %s\n", SDL_GetError());
|
fprintf(stderr, "could not create window: %s\n", SDL_GetError());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@@ -13,7 +13,7 @@ case "$machine" in
|
|||||||
*android* )
|
*android* )
|
||||||
EXEPREFIX="lib"
|
EXEPREFIX="lib"
|
||||||
EXESUFFIX=".so"
|
EXESUFFIX=".so"
|
||||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -shared"
|
LDFLAGS="$LDFLAGS -shared"
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
EXEPREFIX=""
|
EXEPREFIX=""
|
||||||
@@ -25,20 +25,20 @@ set -e
|
|||||||
|
|
||||||
# Get the canonical path of the folder containing this script
|
# Get the canonical path of the folder containing this script
|
||||||
testdir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
|
testdir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
|
||||||
CFLAGS="$( pkg-config sdl2 --cflags )"
|
SDL_CFLAGS="$( pkg-config sdl2 --cflags )"
|
||||||
LDFLAGS="$( pkg-config sdl2 --libs )"
|
SDL_LDFLAGS="$( pkg-config sdl2 --libs )"
|
||||||
STATIC_LDFLAGS="$( pkg-config sdl2 --libs --static )"
|
SDL_STATIC_LDFLAGS="$( pkg-config sdl2 --libs --static )"
|
||||||
|
|
||||||
compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_pkgconfig.c.o $CFLAGS $EXTRA_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} $LDFLAGS $EXTRA_LDFLAGS"
|
link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig${EXESUFFIX} $SDL_LDFLAGS $LDFLAGS"
|
||||||
static_link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig_static${EXESUFFIX} $STATIC_LDFLAGS $EXTRA_LDFLAGS"
|
static_link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig_static${EXESUFFIX} $SDL_STATIC_LDFLAGS $LDFLAGS"
|
||||||
|
|
||||||
echo "-- CC: $CC"
|
echo "-- CC: $CC"
|
||||||
echo "-- CFLAGS: $CFLAGS"
|
echo "-- CFLAGS: $CFLAGS"
|
||||||
echo "-- EXTRA_CFLAGS: $EXTRA_CFLAGS"
|
echo "-- LDFLASG: $LDFLAGS"
|
||||||
echo "-- LDFLASG: $LDFLAGS"
|
echo "-- SDL_CFLAGS: $SDL_CFLAGS"
|
||||||
echo "-- STATIC_LDFLAGS: $STATIC_LDFLAGS"
|
echo "-- SDL_LDFLAGS: $SDL_LDFLAGS"
|
||||||
echo "-- EXTRA_LDFLAGS: $EXTRA_LDFLAGS"
|
echo "-- SDL_STATIC_LDFLAGS: $SDL_STATIC_LDFLAGS"
|
||||||
|
|
||||||
echo "-- COMPILE: $compile_cmd"
|
echo "-- COMPILE: $compile_cmd"
|
||||||
echo "-- LINK: $link_cmd"
|
echo "-- LINK: $link_cmd"
|
||||||
|
@@ -13,7 +13,7 @@ case "$machine" in
|
|||||||
*android* )
|
*android* )
|
||||||
EXEPREFIX="lib"
|
EXEPREFIX="lib"
|
||||||
EXESUFFIX=".so"
|
EXESUFFIX=".so"
|
||||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -shared"
|
LDFLAGS="$LDFLAGS -shared"
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
EXEPREFIX=""
|
EXEPREFIX=""
|
||||||
@@ -25,20 +25,20 @@ set -e
|
|||||||
|
|
||||||
# Get the canonical path of the folder containing this script
|
# Get the canonical path of the folder containing this script
|
||||||
testdir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
|
testdir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
|
||||||
CFLAGS="$( sdl2-config --cflags )"
|
SDL_CFLAGS="$( sdl2-config --cflags )"
|
||||||
LDFLAGS="$( sdl2-config --libs )"
|
SDL_LDFLAGS="$( sdl2-config --libs )"
|
||||||
STATIC_LDFLAGS="$( sdl2-config --static-libs )"
|
SDL_STATIC_LDFLAGS="$( sdl2-config --static-libs )"
|
||||||
|
|
||||||
compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_sdlconfig.c.o $CFLAGS $EXTRA_CFLAGS"
|
compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_sdlconfig.c.o $CFLAGS $SDL_CFLAGS"
|
||||||
link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig${EXESUFFIX} $LDFLAGS $EXTRA_LDFLAGS"
|
link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig${EXESUFFIX} $SDL_LDFLAGS $LDFLAGS"
|
||||||
static_link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig_static${EXESUFFIX} $STATIC_LDFLAGS $EXTRA_LDFLAGS"
|
static_link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig_static${EXESUFFIX} $SDL_STATIC_LDFLAGS $LDFLAGS"
|
||||||
|
|
||||||
echo "-- CC: $CC"
|
echo "-- CC: $CC"
|
||||||
echo "-- CFLAGS: $CFLAGS"
|
echo "-- CFLAGS: $CFLAGS"
|
||||||
echo "-- EXTRA_CFLAGS: $EXTRA_CFLAGS"
|
echo "-- LDFLAGS: $LDFLAGS"
|
||||||
echo "-- LDFLAGS: $LDFLAGS"
|
echo "-- SDL_CFLAGS: $SDL_CFLAGS"
|
||||||
echo "-- STATIC_LDFLAGS: $STATIC_LDFLAGS"
|
echo "-- SDL_LDFLAGS: $SDL_LDFLAGS"
|
||||||
echo "-- EXTRA_LDFLAGS: $EXTRA_LDFLAGS"
|
echo "-- SDL_STATIC_LDFLAGS: $SDL_STATIC_LDFLAGS"
|
||||||
|
|
||||||
echo "-- COMPILE: $compile_cmd"
|
echo "-- COMPILE: $compile_cmd"
|
||||||
echo "-- LINK: $link_cmd"
|
echo "-- LINK: $link_cmd"
|
||||||
|
217
configure.ac
217
configure.ac
@@ -1,5 +1,5 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
AC_PREREQ([2.63])
|
AC_PREREQ([2.65])
|
||||||
AC_INIT
|
AC_INIT
|
||||||
AC_CONFIG_SRCDIR([src/SDL.c])
|
AC_CONFIG_SRCDIR([src/SDL.c])
|
||||||
AC_CONFIG_HEADERS([include/SDL_config.h])
|
AC_CONFIG_HEADERS([include/SDL_config.h])
|
||||||
@@ -12,8 +12,8 @@ orig_CFLAGS="$CFLAGS"
|
|||||||
dnl Set various version strings - taken gratefully from the GTk sources
|
dnl Set various version strings - taken gratefully from the GTk sources
|
||||||
# See docs/release_checklist.md
|
# See docs/release_checklist.md
|
||||||
SDL_MAJOR_VERSION=2
|
SDL_MAJOR_VERSION=2
|
||||||
SDL_MINOR_VERSION=26
|
SDL_MINOR_VERSION=30
|
||||||
SDL_MICRO_VERSION=0
|
SDL_MICRO_VERSION=4
|
||||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||||
|
|
||||||
SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
|
SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
|
||||||
@@ -62,6 +62,7 @@ AC_PROG_AWK
|
|||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AC_PROG_EGREP
|
AC_PROG_EGREP
|
||||||
|
AC_PROG_FGREP
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
PKG_PROG_PKG_CONFIG
|
PKG_PROG_PKG_CONFIG
|
||||||
@@ -180,8 +181,8 @@ base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`
|
|||||||
dnl Function to find a library in the compiler search path
|
dnl Function to find a library in the compiler search path
|
||||||
find_lib()
|
find_lib()
|
||||||
{
|
{
|
||||||
gcc_bin_path=[`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
|
gcc_bin_path=[`$CC -print-search-dirs 2>/dev/null | $FGREP programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
|
||||||
gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
|
gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | $FGREP libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
|
||||||
env_lib_path=[`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'`]
|
env_lib_path=[`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'`]
|
||||||
if test "$cross_compiling" = yes; then
|
if test "$cross_compiling" = yes; then
|
||||||
host_lib_path=""
|
host_lib_path=""
|
||||||
@@ -318,10 +319,20 @@ AC_ARG_ENABLE(libc,
|
|||||||
[AS_HELP_STRING([--enable-libc], [Use the system C library [default=yes]])],
|
[AS_HELP_STRING([--enable-libc], [Use the system C library [default=yes]])],
|
||||||
, enable_libc=yes)
|
, enable_libc=yes)
|
||||||
|
|
||||||
dnl See whether we are allowed to use libiconv
|
dnl See whether we are allowed to use system iconv
|
||||||
|
enable_system_iconv_default=yes
|
||||||
|
case "$host" in
|
||||||
|
*-*-cygwin*|*-*-mingw*|*-*-darwin*|*-ios-*)
|
||||||
|
enable_system_iconv_default=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
AC_ARG_ENABLE(system-iconv,
|
AC_ARG_ENABLE(system-iconv,
|
||||||
[AS_HELP_STRING([--enable-system-iconv], [Use iconv() from system-installed libraries [default=yes]])],
|
[AS_HELP_STRING([--enable-system-iconv], [Use iconv() from system-installed libraries [default=no for windows, yes for others]])],
|
||||||
, enable_system_iconv=yes)
|
, enable_system_iconv=$enable_system_iconv_default)
|
||||||
|
dnl See whether we prefer libiconv over libc
|
||||||
|
AC_ARG_ENABLE(libiconv,
|
||||||
|
[AS_HELP_STRING([--enable-libiconv], [Prefer iconv() from libiconv, if available, over libc version [default=no]])],
|
||||||
|
, enable_libiconv=no)
|
||||||
|
|
||||||
if test x$enable_libc = xyes; then
|
if test x$enable_libc = xyes; then
|
||||||
AC_DEFINE(HAVE_LIBC, 1, [ ])
|
AC_DEFINE(HAVE_LIBC, 1, [ ])
|
||||||
@@ -329,7 +340,7 @@ if test x$enable_libc = xyes; then
|
|||||||
dnl Check for C library headers
|
dnl Check for C library headers
|
||||||
dnl AC_CHECK_INCLUDES_DEFAULT is an autoconf-2.7x thing where AC_HEADER_STDC is deprecated.
|
dnl AC_CHECK_INCLUDES_DEFAULT is an autoconf-2.7x thing where AC_HEADER_STDC is deprecated.
|
||||||
m4_ifdef([AC_CHECK_INCLUDES_DEFAULT], [AC_CHECK_INCLUDES_DEFAULT], [AC_HEADER_STDC])
|
m4_ifdef([AC_CHECK_INCLUDES_DEFAULT], [AC_CHECK_INCLUDES_DEFAULT], [AC_HEADER_STDC])
|
||||||
AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h wchar.h inttypes.h stdint.h limits.h ctype.h math.h float.h iconv.h signal.h linux/input.h)
|
AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h wchar.h inttypes.h stdint.h limits.h ctype.h math.h float.h iconv.h signal.h)
|
||||||
|
|
||||||
dnl Check for typedefs, structures, etc.
|
dnl Check for typedefs, structures, etc.
|
||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
@@ -348,14 +359,52 @@ dnl Checks for library functions.
|
|||||||
AC_DEFINE(HAVE_MPROTECT, 1, [ ])
|
AC_DEFINE(HAVE_MPROTECT, 1, [ ])
|
||||||
],[]),
|
],[]),
|
||||||
)
|
)
|
||||||
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv bsearch qsort abs bcopy memset memcmp memcpy memmove wcslen wcslcpy wcslcat _wcsdup wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtod strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp strcasestr vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval elf_aux_info poll _Exit)
|
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv bsearch qsort abs bcopy memset memcmp memcpy memmove wcslen wcslcpy wcslcat _wcsdup wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtod strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp strcasestr vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval elf_aux_info poll memfd_create posix_fallocate _Exit)
|
||||||
|
|
||||||
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
|
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
|
||||||
AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf trunc truncf fmod fmodf log logf log10 log10f lround lroundf pow powf round roundf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
|
AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf trunc truncf fmod fmodf log logf log10 log10f lround lroundf pow powf round roundf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
|
||||||
|
|
||||||
if test x$enable_system_iconv = xyes; then
|
if test x$enable_system_iconv = xyes; then
|
||||||
AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
|
AC_MSG_CHECKING(for iconv in libc)
|
||||||
AC_CHECK_FUNCS(iconv)
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||||
|
#define LIBICONV_PLUG 1 /* in case libiconv header is in include path */
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <iconv.h>
|
||||||
|
]],[[
|
||||||
|
iconv_open(NULL,NULL);
|
||||||
|
]])], [have_libc_iconv=yes],[have_libc_iconv=no])
|
||||||
|
AC_MSG_RESULT($have_libc_iconv)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for iconv in libiconv)
|
||||||
|
save_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS -liconv"
|
||||||
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <iconv.h>
|
||||||
|
]],[[
|
||||||
|
iconv_open(NULL,NULL);
|
||||||
|
]])], [have_libiconv=yes],[have_libiconv=no])
|
||||||
|
LIBS="$save_LIBS"
|
||||||
|
AC_MSG_RESULT($have_libiconv)
|
||||||
|
|
||||||
|
if test x$have_libc_iconv = xyes || test x$have_libiconv = xyes; then
|
||||||
|
AC_DEFINE(HAVE_ICONV,1,[ ])
|
||||||
|
|
||||||
|
if test x$have_libiconv = xyes; then
|
||||||
|
if test x$have_libc_iconv != xyes; then
|
||||||
|
use_libiconv=yes
|
||||||
|
elif test x$enable_libiconv = xyes; then
|
||||||
|
use_libiconv=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test x$use_libiconv = xyes; then
|
||||||
|
AC_DEFINE(SDL_USE_LIBICONV,1,[ ])
|
||||||
|
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"
|
||||||
|
echo "-- Using iconv from libiconv"
|
||||||
|
else
|
||||||
|
echo "-- Using iconv from libc"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], 1, [ ])], ,[#include <signal.h>])
|
AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], 1, [ ])], ,[#include <signal.h>])
|
||||||
@@ -889,38 +938,6 @@ fi
|
|||||||
AC_DEFINE(HAVE_LSXINTRIN_H, 1, [ ])
|
AC_DEFINE(HAVE_LSXINTRIN_H, 1, [ ])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_ENABLE(lasx,
|
|
||||||
[AS_HELP_STRING([--enable-lasx], [use LASX assembly routines [default=yes]])],
|
|
||||||
, enable_LASX=yes)
|
|
||||||
if test x$enable_LASX = xyes; then
|
|
||||||
save_CFLAGS="$CFLAGS"
|
|
||||||
have_gcc_lasx=no
|
|
||||||
AC_MSG_CHECKING(for GCC -mlasx option)
|
|
||||||
lasx_CFLAGS="-mlasx"
|
|
||||||
CFLAGS="$save_CFLAGS $lasx_CFLAGS"
|
|
||||||
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
||||||
#ifndef __loongarch_asx
|
|
||||||
#error Assembler CPP flag not enabled
|
|
||||||
#endif
|
|
||||||
]], [])], [have_gcc_lasx=yes], [])
|
|
||||||
AC_MSG_RESULT($have_gcc_lasx)
|
|
||||||
CFLAGS="$save_CFLAGS"
|
|
||||||
|
|
||||||
if test x$have_gcc_lasx = xyes; then
|
|
||||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $lasx_CFLAGS"
|
|
||||||
SUMMARY_math="${SUMMARY_math} lasx"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(for lasxintrin.h)
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <lasxintrin.h>]])],
|
|
||||||
[have_lasxintrin_h_hdr=yes],[have_lasxintrin_h_hdr=no])
|
|
||||||
AC_MSG_RESULT($have_lasxintrin_h_hdr)
|
|
||||||
if test x$have_lasxintrin_h_hdr = xyes; then
|
|
||||||
AC_DEFINE(HAVE_LASXINTRIN_H, 1, [ ])
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl See if the OSS audio interface is supported
|
dnl See if the OSS audio interface is supported
|
||||||
CheckOSS()
|
CheckOSS()
|
||||||
{
|
{
|
||||||
@@ -1121,13 +1138,13 @@ CheckPulseAudio()
|
|||||||
[AS_HELP_STRING([--enable-pulseaudio], [use PulseAudio [default=yes]])],
|
[AS_HELP_STRING([--enable-pulseaudio], [use PulseAudio [default=yes]])],
|
||||||
, enable_pulseaudio=yes)
|
, enable_pulseaudio=yes)
|
||||||
if test x$enable_audio = xyes -a x$enable_pulseaudio = xyes; then
|
if test x$enable_audio = xyes -a x$enable_pulseaudio = xyes; then
|
||||||
PKG_CHECK_MODULES([PULSEAUDIO], [libpulse-simple >= 0.9], audio_pulseaudio=yes, audio_pulseaudio=no)
|
PKG_CHECK_MODULES([PULSEAUDIO], [libpulse >= 0.9.15], audio_pulseaudio=yes, audio_pulseaudio=no)
|
||||||
|
|
||||||
if test x$audio_pulseaudio = xyes; then
|
if test x$audio_pulseaudio = xyes; then
|
||||||
AC_ARG_ENABLE(pulseaudio-shared,
|
AC_ARG_ENABLE(pulseaudio-shared,
|
||||||
[AS_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [default=yes]])],
|
[AS_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [default=yes]])],
|
||||||
, enable_pulseaudio_shared=yes)
|
, enable_pulseaudio_shared=yes)
|
||||||
pulseaudio_lib=[`find_lib "libpulse-simple.so.*" "$PULSEAUDIO_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
|
pulseaudio_lib=[`find_lib "libpulse.so.*" "$PULSEAUDIO_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||||
|
|
||||||
AC_DEFINE(SDL_AUDIO_DRIVER_PULSEAUDIO, 1, [ ])
|
AC_DEFINE(SDL_AUDIO_DRIVER_PULSEAUDIO, 1, [ ])
|
||||||
SOURCES="$SOURCES $srcdir/src/audio/pulseaudio/*.c"
|
SOURCES="$SOURCES $srcdir/src/audio/pulseaudio/*.c"
|
||||||
@@ -1138,7 +1155,7 @@ CheckPulseAudio()
|
|||||||
fi
|
fi
|
||||||
if test x$have_loadso = xyes && \
|
if test x$have_loadso = xyes && \
|
||||||
test x$enable_pulseaudio_shared = xyes && test x$pulseaudio_lib != x; then
|
test x$enable_pulseaudio_shared = xyes && test x$pulseaudio_lib != x; then
|
||||||
echo "-- dynamic libpulse-simple -> $pulseaudio_lib"
|
echo "-- dynamic libpulse -> $pulseaudio_lib"
|
||||||
AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC, "$pulseaudio_lib", [ ])
|
AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC, "$pulseaudio_lib", [ ])
|
||||||
SUMMARY_audio="${SUMMARY_audio} pulse(dynamic)"
|
SUMMARY_audio="${SUMMARY_audio} pulse(dynamic)"
|
||||||
|
|
||||||
@@ -1557,26 +1574,6 @@ CheckNoStrictAliasing()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
dnl See if GCC's -mpreferred-stack-boundary is supported.
|
|
||||||
dnl Reference: http://bugzilla.libsdl.org/show_bug.cgi?id=1296
|
|
||||||
CheckStackBoundary()
|
|
||||||
{
|
|
||||||
AC_MSG_CHECKING(for GCC -mpreferred-stack-boundary option)
|
|
||||||
have_gcc_preferred_stack_boundary=no
|
|
||||||
|
|
||||||
save_CFLAGS="$CFLAGS"
|
|
||||||
CFLAGS="$save_CFLAGS -mpreferred-stack-boundary=2"
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
||||||
int x = 0;
|
|
||||||
]],[])], [have_gcc_preferred_stack_boundary=yes],[])
|
|
||||||
AC_MSG_RESULT($have_gcc_preferred_stack_boundary)
|
|
||||||
CFLAGS="$save_CFLAGS"
|
|
||||||
|
|
||||||
if test x$have_gcc_preferred_stack_boundary = xyes; then
|
|
||||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -mpreferred-stack-boundary=2"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
dnl See if GCC's -Werror is supported.
|
dnl See if GCC's -Werror is supported.
|
||||||
CheckWerror()
|
CheckWerror()
|
||||||
{
|
{
|
||||||
@@ -1673,6 +1670,27 @@ dnl Haiku headers use multicharacter constants all over the place. Ignore these
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dnl See if GCC's -Wunused-local-typedefs is supported and disable it
|
||||||
|
dnl because it triggers on gcc 4.8.4 for compile time asserts inside
|
||||||
|
dnl of functions.
|
||||||
|
CheckUnusedLocalTypedefs()
|
||||||
|
{
|
||||||
|
AC_MSG_CHECKING(for GCC -Wunused-local-typedefs option)
|
||||||
|
have_gcc_unused_local_typedefs=no
|
||||||
|
|
||||||
|
save_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$save_CFLAGS -Wunused-local-typedefs"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
|
int x = 0;
|
||||||
|
]],[])], [have_gcc_unused_local_typedefs=yes],[])
|
||||||
|
AC_MSG_RESULT($have_gcc_unused_local_typedefs)
|
||||||
|
CFLAGS="$save_CFLAGS"
|
||||||
|
|
||||||
|
if test x$have_gcc_unused_local_typedefs = xyes; then
|
||||||
|
EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-unused-local-typedefs"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
dnl Check for Wayland
|
dnl Check for Wayland
|
||||||
CheckWayland()
|
CheckWayland()
|
||||||
{
|
{
|
||||||
@@ -1786,6 +1804,14 @@ dnl See if libdecor is available
|
|||||||
else
|
else
|
||||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DECOR_LIBS"
|
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DECOR_LIBS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
saved_cflags=$CFLAGS
|
||||||
|
CFLAGS="$CFLAGS $DECOR_CFLAGS"
|
||||||
|
AC_CHECK_DECLS([libdecor_frame_get_min_content_size, libdecor_frame_get_max_content_size], [libdecor_get_min_max=yes], [ ], [[#include <libdecor.h>]])
|
||||||
|
if test x$libdecor_get_min_max = xyes; then
|
||||||
|
AC_DEFINE(SDL_HAVE_LIBDECOR_GET_MIN_MAX, 1, [ ])
|
||||||
|
fi
|
||||||
|
CFLAGS="$saved_cflags"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -2748,6 +2774,8 @@ dnl See if we can use the new unified event interface in Linux 2.4
|
|||||||
CheckInputEvents()
|
CheckInputEvents()
|
||||||
{
|
{
|
||||||
dnl Check for Linux 2.4 unified input event interface support
|
dnl Check for Linux 2.4 unified input event interface support
|
||||||
|
AC_CHECK_HEADERS(linux/input.h)
|
||||||
|
|
||||||
AC_MSG_CHECKING(for Linux 2.4 unified input interface)
|
AC_MSG_CHECKING(for Linux 2.4 unified input interface)
|
||||||
use_input_events=no
|
use_input_events=no
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
@@ -3276,9 +3304,6 @@ CheckWINDOWS()
|
|||||||
],[])
|
],[])
|
||||||
AC_MSG_RESULT($have_wince)
|
AC_MSG_RESULT($have_wince)
|
||||||
|
|
||||||
# This fixes Windows stack alignment with newer GCC
|
|
||||||
CheckStackBoundary
|
|
||||||
|
|
||||||
# headers needed elsewhere
|
# headers needed elsewhere
|
||||||
AC_CHECK_HEADER(tpcshrd.h,have_tpcshrd_h=yes)
|
AC_CHECK_HEADER(tpcshrd.h,have_tpcshrd_h=yes)
|
||||||
if test x$have_tpcshrd_h = xyes; then
|
if test x$have_tpcshrd_h = xyes; then
|
||||||
@@ -3318,17 +3343,14 @@ CheckDIRECTX()
|
|||||||
if test x$enable_directx = xyes; then
|
if test x$enable_directx = xyes; then
|
||||||
AC_CHECK_HEADER(d3d9.h, have_d3d=yes)
|
AC_CHECK_HEADER(d3d9.h, have_d3d=yes)
|
||||||
AC_CHECK_HEADER(d3d11_1.h, have_d3d11=yes)
|
AC_CHECK_HEADER(d3d11_1.h, have_d3d11=yes)
|
||||||
AC_MSG_CHECKING(for d3d12 Windows SDK version)
|
AC_MSG_CHECKING(for compatible d3d12 headers)
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
#include <winsdkver.h>
|
|
||||||
#include <sdkddkver.h>
|
|
||||||
#include <d3d12.h>
|
#include <d3d12.h>
|
||||||
|
#include <d3d12sdklayers.h>
|
||||||
ID3D12Device1 *device;
|
ID3D12Device1 *device;
|
||||||
#if WDK_NTDDI_VERSION <= 0x0A000008
|
|
||||||
asdf
|
|
||||||
#endif
|
|
||||||
]])], [have_d3d12=yes],[have_d3d12=no])
|
]])], [have_d3d12=yes],[have_d3d12=no])
|
||||||
AC_MSG_RESULT($have_d3d12)
|
AC_MSG_RESULT($have_d3d12)
|
||||||
|
|
||||||
AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
|
AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
|
||||||
AC_CHECK_HEADER(dsound.h, have_dsound=yes)
|
AC_CHECK_HEADER(dsound.h, have_dsound=yes)
|
||||||
AC_CHECK_HEADER(dinput.h, have_dinput=yes)
|
AC_CHECK_HEADER(dinput.h, have_dinput=yes)
|
||||||
@@ -3360,33 +3382,10 @@ asdf
|
|||||||
[AS_HELP_STRING([--enable-xinput], [use Xinput for Windows [default=yes]])],
|
[AS_HELP_STRING([--enable-xinput], [use Xinput for Windows [default=yes]])],
|
||||||
, enable_xinput=yes)
|
, enable_xinput=yes)
|
||||||
if test x$enable_xinput = xyes; then
|
if test x$enable_xinput = xyes; then
|
||||||
have_xinput_gamepadex=no
|
|
||||||
have_xinput_stateex=no
|
|
||||||
AC_CHECK_HEADER(xinput.h, have_xinput=yes)
|
AC_CHECK_HEADER(xinput.h, have_xinput=yes)
|
||||||
AC_MSG_CHECKING(for struct XINPUT_GAMEPAD_EX)
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
||||||
#include <windows.h>
|
|
||||||
#include <xinput.h>
|
|
||||||
XINPUT_GAMEPAD_EX x1;
|
|
||||||
]],[])], [have_xinput_gamepadex=yes],[])
|
|
||||||
AC_MSG_RESULT($have_xinput_gamepadex)
|
|
||||||
AC_MSG_CHECKING(for struct XINPUT_STATE_EX)
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
||||||
#include <windows.h>
|
|
||||||
#include <xinput.h>
|
|
||||||
XINPUT_STATE_EX s1;
|
|
||||||
]],[])], [have_xinput_stateex=yes],[])
|
|
||||||
AC_MSG_RESULT($have_xinput_stateex)
|
|
||||||
|
|
||||||
if test x$have_xinput = xyes; then
|
if test x$have_xinput = xyes; then
|
||||||
AC_DEFINE(HAVE_XINPUT_H, 1, [ ])
|
AC_DEFINE(HAVE_XINPUT_H, 1, [ ])
|
||||||
fi
|
fi
|
||||||
if test x$have_xinput_gamepadex = xyes; then
|
|
||||||
AC_DEFINE(HAVE_XINPUT_GAMEPAD_EX, 1, [ ])
|
|
||||||
fi
|
|
||||||
if test x$have_xinput_stateex = xyes; then
|
|
||||||
AC_DEFINE(HAVE_XINPUT_STATE_EX, 1, [ ])
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING(for windows.gaming.input.h)
|
AC_MSG_CHECKING(for windows.gaming.input.h)
|
||||||
@@ -3607,7 +3606,7 @@ CheckHIDAPI()
|
|||||||
enable_hidapi_libusb=yes
|
enable_hidapi_libusb=yes
|
||||||
require_hidapi_libusb=yes
|
require_hidapi_libusb=yes
|
||||||
;;
|
;;
|
||||||
*-*-os2* )
|
*-*-os2* )
|
||||||
enable_hidapi_libusb=yes
|
enable_hidapi_libusb=yes
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -3672,15 +3671,14 @@ CheckClockGettime()
|
|||||||
[AS_HELP_STRING([--enable-clock_gettime], [use clock_gettime() instead of gettimeofday() on UNIX [default=yes]])],
|
[AS_HELP_STRING([--enable-clock_gettime], [use clock_gettime() instead of gettimeofday() on UNIX [default=yes]])],
|
||||||
, enable_clock_gettime=yes)
|
, enable_clock_gettime=yes)
|
||||||
if test x$enable_clock_gettime = xyes; then
|
if test x$enable_clock_gettime = xyes; then
|
||||||
AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes)
|
AC_CHECK_LIB(c, clock_gettime, have_clock_gettime=yes)
|
||||||
if test x$have_clock_gettime = xyes; then
|
if test x$have_clock_gettime = xyes; then
|
||||||
AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [ ])
|
AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [ ])
|
||||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt"
|
|
||||||
else
|
else
|
||||||
AC_CHECK_LIB(c, clock_gettime, have_clock_gettime=yes)
|
AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes)
|
||||||
if test x$have_clock_gettime = xyes; then
|
if test x$have_clock_gettime = xyes; then
|
||||||
AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [ ])
|
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt"
|
||||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS"
|
AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [ ])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -3738,6 +3736,7 @@ CheckVirtualJoystick()
|
|||||||
|
|
||||||
dnl Do this on all platforms, before everything else (other things might want to override it).
|
dnl Do this on all platforms, before everything else (other things might want to override it).
|
||||||
CheckWarnAll
|
CheckWarnAll
|
||||||
|
CheckUnusedLocalTypedefs
|
||||||
CheckNoStrictAliasing
|
CheckNoStrictAliasing
|
||||||
|
|
||||||
dnl Do this for every platform, but for some it doesn't mean anything, but better to catch it here anyhow.
|
dnl Do this for every platform, but for some it doesn't mean anything, but better to catch it here anyhow.
|
||||||
@@ -4618,14 +4617,14 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
|
|||||||
AC_DEFINE(SDL_VIDEO_DRIVER_OS2, 1, [ ])
|
AC_DEFINE(SDL_VIDEO_DRIVER_OS2, 1, [ ])
|
||||||
SOURCES="$SOURCES $srcdir/src/video/os2/*.c"
|
SOURCES="$SOURCES $srcdir/src/video/os2/*.c"
|
||||||
have_video=yes
|
have_video=yes
|
||||||
SUMMARY_video="${SUMMARY_video} os/2"
|
SUMMARY_video="${SUMMARY_video} OS/2"
|
||||||
fi
|
fi
|
||||||
# Set up files for the audio library
|
# Set up files for the audio library
|
||||||
if test x$enable_audio = xyes; then
|
if test x$enable_audio = xyes; then
|
||||||
AC_DEFINE(SDL_AUDIO_DRIVER_OS2, 1, [ ])
|
AC_DEFINE(SDL_AUDIO_DRIVER_OS2, 1, [ ])
|
||||||
SOURCES="$SOURCES $srcdir/src/audio/os2/*.c"
|
SOURCES="$SOURCES $srcdir/src/audio/os2/*.c"
|
||||||
have_audio=yes
|
have_audio=yes
|
||||||
SUMMARY_audio="${SUMMARY_audio} os/2"
|
SUMMARY_audio="${SUMMARY_audio} OS/2"
|
||||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmmpm2"
|
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmmpm2"
|
||||||
fi
|
fi
|
||||||
# Set up files for the thread library
|
# Set up files for the thread library
|
||||||
@@ -4860,6 +4859,8 @@ AC_SUBST(SDL_CFLAGS)
|
|||||||
AC_SUBST(SDL_LIBS)
|
AC_SUBST(SDL_LIBS)
|
||||||
AC_SUBST(SDL_STATIC_LIBS)
|
AC_SUBST(SDL_STATIC_LIBS)
|
||||||
AC_SUBST(SDL_RLD_FLAGS)
|
AC_SUBST(SDL_RLD_FLAGS)
|
||||||
|
PKGCONFIG_DEPENDS=""
|
||||||
|
AC_SUBST(PKGCONFIG_DEPENDS)
|
||||||
if test x$enable_shared = xyes; then
|
if test x$enable_shared = xyes; then
|
||||||
PKGCONFIG_LIBS_PRIV="
|
PKGCONFIG_LIBS_PRIV="
|
||||||
Libs.private:"
|
Libs.private:"
|
||||||
|
@@ -13,22 +13,22 @@ supported, but you can use the "android-project-ant" directory as a template.
|
|||||||
Requirements
|
Requirements
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
Android SDK (version 31 or later)
|
Android SDK (version 34 or later)
|
||||||
https://developer.android.com/sdk/index.html
|
https://developer.android.com/sdk/index.html
|
||||||
|
|
||||||
Android NDK r15c or later
|
Android NDK r15c or later
|
||||||
https://developer.android.com/tools/sdk/ndk/index.html
|
https://developer.android.com/tools/sdk/ndk/index.html
|
||||||
|
|
||||||
Minimum API level supported by SDL: 16 (Android 4.1)
|
Minimum API level supported by SDL: 19 (Android 4.4)
|
||||||
|
|
||||||
|
|
||||||
How the port works
|
How the port works
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
- Android applications are Java-based, optionally with parts written in C
|
- Android applications are Java-based, optionally with parts written in C
|
||||||
- As SDL apps are C-based, we use a small Java shim that uses JNI to talk to
|
- As SDL apps are C-based, we use a small Java shim that uses JNI to talk to
|
||||||
the SDL library
|
the SDL library
|
||||||
- This means that your application C code must be placed inside an Android
|
- This means that your application C code must be placed inside an Android
|
||||||
Java project, along with some C support code that communicates with Java
|
Java project, along with some C support code that communicates with Java
|
||||||
- This eventually produces a standard Android .apk package
|
- This eventually produces a standard Android .apk package
|
||||||
|
|
||||||
@@ -68,14 +68,22 @@ Finally, a word of caution: re running androidbuild.sh wipes any changes you may
|
|||||||
done in the build directory for the app!
|
done in the build directory for the app!
|
||||||
|
|
||||||
|
|
||||||
For more complex projects, follow these instructions:
|
|
||||||
|
|
||||||
1. Copy the android-project directory wherever you want to keep your projects
|
|
||||||
and rename it to the name of your project.
|
|
||||||
2. Move or symlink this SDL directory into the "<project>/app/jni" directory
|
|
||||||
3. Edit "<project>/app/jni/src/Android.mk" to include your source files
|
|
||||||
|
|
||||||
4a. If you want to use Android Studio, simply open your <project> directory and start building.
|
For more complex projects, follow these instructions:
|
||||||
|
|
||||||
|
1. Get the source code for SDL and copy the 'android-project' directory located at SDL/android-project to a suitable location. Also make sure to rename it to your project name (In these examples: YOURPROJECT).
|
||||||
|
|
||||||
|
(The 'android-project' directory can basically be seen as a sort of starting point for the android-port of your project. It contains the glue code between the Android Java 'frontend' and the SDL code 'backend'. It also contains some standard behaviour, like how events should be handled, which you will be able to change.)
|
||||||
|
|
||||||
|
2. Move or [symlink](https://en.wikipedia.org/wiki/Symbolic_link) the SDL directory into the "YOURPROJECT/app/jni" directory
|
||||||
|
|
||||||
|
(This is needed as the source of SDL has to be compiled by the Android compiler)
|
||||||
|
|
||||||
|
3. Edit "YOURPROJECT/app/jni/src/Android.mk" to include your source files.
|
||||||
|
|
||||||
|
(They should be separated by spaces after the "LOCAL_SRC_FILES := " declaration)
|
||||||
|
|
||||||
|
4a. If you want to use Android Studio, simply open your 'YOURPROJECT' directory and start building.
|
||||||
|
|
||||||
4b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device
|
4b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device
|
||||||
|
|
||||||
@@ -83,9 +91,9 @@ For more complex projects, follow these instructions:
|
|||||||
If you already have a project that uses CMake, the instructions change somewhat:
|
If you already have a project that uses CMake, the instructions change somewhat:
|
||||||
|
|
||||||
1. Do points 1 and 2 from the instruction above.
|
1. Do points 1 and 2 from the instruction above.
|
||||||
2. Edit "<project>/app/build.gradle" to comment out or remove sections containing ndk-build
|
2. Edit "YOURPROJECT/app/build.gradle" to comment out or remove sections containing ndk-build
|
||||||
and uncomment the cmake sections. Add arguments to the CMake invocation as needed.
|
and uncomment the cmake sections. Add arguments to the CMake invocation as needed.
|
||||||
3. Edit "<project>/app/jni/CMakeLists.txt" to include your project (it defaults to
|
3. Edit "YOURPROJECT/app/jni/CMakeLists.txt" to include your project (it defaults to
|
||||||
adding the "src" subdirectory). Note that you'll have SDL2, SDL2main and SDL2-static
|
adding the "src" subdirectory). Note that you'll have SDL2, SDL2main and SDL2-static
|
||||||
as targets in your project, so you should have "target_link_libraries(yourgame SDL2 SDL2main)"
|
as targets in your project, so you should have "target_link_libraries(yourgame SDL2 SDL2main)"
|
||||||
in your CMakeLists.txt file. Also be aware that you should use add_library() instead of
|
in your CMakeLists.txt file. Also be aware that you should use add_library() instead of
|
||||||
@@ -132,15 +140,15 @@ Here's an example of a minimal class file:
|
|||||||
|
|
||||||
--- MyGame.java --------------------------
|
--- MyGame.java --------------------------
|
||||||
package com.gamemaker.game;
|
package com.gamemaker.game;
|
||||||
|
|
||||||
import org.libsdl.app.SDLActivity;
|
import org.libsdl.app.SDLActivity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A sample wrapper class that just calls SDLActivity
|
* A sample wrapper class that just calls SDLActivity
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class MyGame extends SDLActivity { }
|
public class MyGame extends SDLActivity { }
|
||||||
|
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|
||||||
Then replace "SDLActivity" in AndroidManifest.xml with the name of your
|
Then replace "SDLActivity" in AndroidManifest.xml with the name of your
|
||||||
@@ -179,7 +187,7 @@ may want to keep this fact in mind when building your APK, specially when large
|
|||||||
files are involved.
|
files are involved.
|
||||||
For more information on which extensions get compressed by default and how to
|
For more information on which extensions get compressed by default and how to
|
||||||
disable this behaviour, see for example:
|
disable this behaviour, see for example:
|
||||||
|
|
||||||
http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/
|
http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/
|
||||||
|
|
||||||
|
|
||||||
@@ -350,7 +358,7 @@ I get output from addr2line showing that it's in the quit function, in testsprit
|
|||||||
You can add logging to your code to help show what's happening:
|
You can add logging to your code to help show what's happening:
|
||||||
|
|
||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
|
|
||||||
__android_log_print(ANDROID_LOG_INFO, "foo", "Something happened! x = %d", x);
|
__android_log_print(ANDROID_LOG_INFO, "foo", "Something happened! x = %d", x);
|
||||||
|
|
||||||
If you need to build without optimization turned on, you can create a file called
|
If you need to build without optimization turned on, you can create a file called
|
||||||
@@ -423,13 +431,13 @@ The Tegra Graphics Debugger is available from NVidia here:
|
|||||||
https://developer.nvidia.com/tegra-graphics-debugger
|
https://developer.nvidia.com/tegra-graphics-debugger
|
||||||
|
|
||||||
|
|
||||||
Why is API level 16 the minimum required?
|
Why is API level 19 the minimum required?
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
The latest NDK toolchain doesn't support targeting earlier than API level 16.
|
The latest NDK toolchain doesn't support targeting earlier than API level 19.
|
||||||
As of this writing, according to https://developer.android.com/about/dashboards/index.html
|
As of this writing, according to https://www.composables.com/tools/distribution-chart
|
||||||
about 99% of the Android devices accessing Google Play support API level 16 or
|
about 99.7% of the Android devices accessing Google Play support API level 19 or
|
||||||
higher (January 2018).
|
higher (August 2023).
|
||||||
|
|
||||||
|
|
||||||
A note regarding the use of the "dirty rectangles" rendering technique
|
A note regarding the use of the "dirty rectangles" rendering technique
|
||||||
@@ -440,7 +448,7 @@ where you only update a portion of the screen on each frame, you may notice a
|
|||||||
variety of visual glitches on Android, that are not present on other platforms.
|
variety of visual glitches on Android, that are not present on other platforms.
|
||||||
This is caused by SDL's use of EGL as the support system to handle OpenGL ES/ES2
|
This is caused by SDL's use of EGL as the support system to handle OpenGL ES/ES2
|
||||||
contexts, in particular the use of the eglSwapBuffers function. As stated in the
|
contexts, in particular the use of the eglSwapBuffers function. As stated in the
|
||||||
documentation for the function "The contents of ancillary buffers are always
|
documentation for the function "The contents of ancillary buffers are always
|
||||||
undefined after calling eglSwapBuffers".
|
undefined after calling eglSwapBuffers".
|
||||||
Setting the EGL_SWAP_BEHAVIOR attribute of the surface to EGL_BUFFER_PRESERVED
|
Setting the EGL_SWAP_BEHAVIOR attribute of the surface to EGL_BUFFER_PRESERVED
|
||||||
is not possible for SDL as it requires EGL 1.4, available only on the API level
|
is not possible for SDL as it requires EGL 1.4, available only on the API level
|
||||||
@@ -459,7 +467,7 @@ Two legitimate ways:
|
|||||||
Activity by calling Activity.finish().
|
Activity by calling Activity.finish().
|
||||||
|
|
||||||
- Android OS can decide to terminate your application by calling onDestroy()
|
- Android OS can decide to terminate your application by calling onDestroy()
|
||||||
(see Activity life cycle). Your application will receive a SDL_QUIT event you
|
(see Activity life cycle). Your application will receive a SDL_QUIT event you
|
||||||
can handle to save things and quit.
|
can handle to save things and quit.
|
||||||
|
|
||||||
Don't call exit() as it stops the activity badly.
|
Don't call exit() as it stops the activity badly.
|
||||||
|
@@ -3,10 +3,10 @@
|
|||||||
(www.cmake.org)
|
(www.cmake.org)
|
||||||
|
|
||||||
SDL's build system was traditionally based on autotools. Over time, this
|
SDL's build system was traditionally based on autotools. Over time, this
|
||||||
approach has suffered from several issues across the different supported
|
approach has suffered from several issues across the different supported
|
||||||
platforms.
|
platforms.
|
||||||
To solve these problems, a new build system based on CMake was introduced.
|
To solve these problems, a new build system based on CMake was introduced.
|
||||||
It is developed in parallel to the legacy autotools build system, so users
|
It is developed in parallel to the legacy autotools build system, so users
|
||||||
can experiment with it without complication.
|
can experiment with it without complication.
|
||||||
|
|
||||||
The CMake build system is supported on the following platforms:
|
The CMake build system is supported on the following platforms:
|
||||||
@@ -48,7 +48,7 @@ SDL can be included in your project in 2 major ways:
|
|||||||
The following CMake script supports both, depending on the value of `MYGAME_VENDORED`.
|
The following CMake script supports both, depending on the value of `MYGAME_VENDORED`.
|
||||||
|
|
||||||
```cmake
|
```cmake
|
||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
project(mygame)
|
project(mygame)
|
||||||
|
|
||||||
# Create an option to switch between a system sdl library and a vendored sdl library
|
# Create an option to switch between a system sdl library and a vendored sdl library
|
||||||
@@ -59,15 +59,15 @@ if(MYGAME_VENDORED)
|
|||||||
else()
|
else()
|
||||||
# 1. Look for a SDL2 package, 2. look for the SDL2 component and 3. fail if none can be found
|
# 1. Look for a SDL2 package, 2. look for the SDL2 component and 3. fail if none can be found
|
||||||
find_package(SDL2 REQUIRED CONFIG REQUIRED COMPONENTS SDL2)
|
find_package(SDL2 REQUIRED CONFIG REQUIRED COMPONENTS SDL2)
|
||||||
|
|
||||||
# 1. Look for a SDL2 package, 2. Look for the SDL2maincomponent and 3. DO NOT fail when SDL2main is not available
|
# 1. Look for a SDL2 package, 2. Look for the SDL2maincomponent and 3. DO NOT fail when SDL2main is not available
|
||||||
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
|
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Create your game executable target as usual
|
# Create your game executable target as usual
|
||||||
add_executable(mygame WIN32 mygame.c)
|
add_executable(mygame WIN32 mygame.c)
|
||||||
|
|
||||||
# SDL2::SDL2main may or may not be available. It is e.g. required by Windows GUI applications
|
# SDL2::SDL2main may or may not be available. It is e.g. required by Windows GUI applications
|
||||||
if(TARGET SDL2::SDL2main)
|
if(TARGET SDL2::SDL2main)
|
||||||
# It has an implicit dependency on SDL2 functions, so it MUST be added before SDL2::SDL2 (or SDL2::SDL2-static)
|
# It has an implicit dependency on SDL2 functions, so it MUST be added before SDL2::SDL2 (or SDL2::SDL2-static)
|
||||||
target_link_libraries(mygame PRIVATE SDL2::SDL2main)
|
target_link_libraries(mygame PRIVATE SDL2::SDL2main)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user