mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-21 16:21:06 +01:00
Compare commits
536 Commits
release-2.
...
release-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
2
.github/cmake/CMakeLists.txt
vendored
2
.github/cmake/CMakeLists.txt
vendored
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
cmake_minimum_required(VERSION 3.0...3.5)
|
||||
project(ci_utils C CXX)
|
||||
|
||||
set(txt "CC=${CMAKE_C_COMPILER}
|
||||
|
||||
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" }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: nttld/setup-ndk@v1
|
||||
id: setup_ndk
|
||||
with:
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
name: Build (VM Actions)
|
||||
name: Build (C/P Actions)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
freebsd:
|
||||
runs-on: macos-12
|
||||
runs-on: ubuntu-latest
|
||||
name: FreeBSD
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
uses: vmactions/freebsd-vm@v0
|
||||
uses: cross-platform-actions/action@v0.23.0
|
||||
with:
|
||||
usesh: true
|
||||
prepare: |
|
||||
pkg install -y \
|
||||
operating_system: freebsd
|
||||
version: '13.2'
|
||||
shell: bash
|
||||
run: |
|
||||
sudo pkg update
|
||||
sudo pkg install -y \
|
||||
gmake \
|
||||
pkgconf \
|
||||
libXcursor \
|
||||
@@ -33,17 +37,15 @@ jobs:
|
||||
libinotify \
|
||||
alsa-lib \
|
||||
jackit \
|
||||
nas \
|
||||
pipewire \
|
||||
pulseaudio \
|
||||
sndio \
|
||||
dbus \
|
||||
zh-fcitx \
|
||||
ibus \
|
||||
libsamplerate \
|
||||
libudev-devd
|
||||
|
||||
run: |
|
||||
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
|
||||
6
.github/workflows/emscripten.yml
vendored
6
.github/workflows/emscripten.yml
vendored
@@ -6,10 +6,10 @@ jobs:
|
||||
emscripten:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: mymindstorm/setup-emsdk@v10
|
||||
- uses: actions/checkout@v4
|
||||
- uses: mymindstorm/setup-emsdk@v14
|
||||
with:
|
||||
version: 2.0.32
|
||||
version: 3.1.35
|
||||
- name: Install ninja
|
||||
run: |
|
||||
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 }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: xcodebuild -project Xcode/SDL/SDL.xcodeproj -target '${{ matrix.platform.target }}' -configuration Release -sdk ${{ matrix.platform.sdk }} clean build
|
||||
28
.github/workflows/main.yml
vendored
28
.github/workflows/main.yml
vendored
@@ -70,16 +70,20 @@ jobs:
|
||||
- name: Setup Intel oneAPI
|
||||
if: matrix.platform.intel
|
||||
run: |
|
||||
# Setup oneAPI repo
|
||||
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
||||
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
||||
sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
|
||||
# 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@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check that versioning is consistent
|
||||
# We only need to run this once: arbitrarily use the Linux/CMake build
|
||||
if: "runner.os == 'Linux' && ! matrix.platform.autotools"
|
||||
@@ -104,10 +108,10 @@ jobs:
|
||||
- name: Run build-time tests (CMake)
|
||||
if: "! matrix.platform.autotools"
|
||||
run: |
|
||||
set -eu
|
||||
${{ matrix.platform.source_cmd }}
|
||||
set -eu
|
||||
export SDL_TESTS_QUICK=1
|
||||
ctest -VV --test-dir build/
|
||||
ctest -VV --test-dir build/ -j2
|
||||
if test "${{ runner.os }}" = "Linux"; then
|
||||
# This should show us the SDL_REVISION
|
||||
strings build/libSDL2-2.0.so.0 | grep SDL-
|
||||
@@ -122,8 +126,8 @@ jobs:
|
||||
- name: Configure (Autotools)
|
||||
if: matrix.platform.autotools
|
||||
run: |
|
||||
set -eu
|
||||
${{ matrix.platform.source_cmd }}
|
||||
set -eu
|
||||
rm -fr build-autotools
|
||||
mkdir build-autotools
|
||||
./autogen.sh
|
||||
@@ -154,8 +158,8 @@ jobs:
|
||||
- name: Build (Autotools)
|
||||
if: matrix.platform.autotools
|
||||
run: |
|
||||
set -eu
|
||||
${{ matrix.platform.source_cmd }}
|
||||
set -eu
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
make -j"${parallel}" -C build-autotools V=1
|
||||
if test "${{ runner.os }}" != "macOS" ; then
|
||||
@@ -164,8 +168,8 @@ jobs:
|
||||
- name: Run build-time tests (Autotools)
|
||||
if: ${{ matrix.platform.autotools && (runner.os != 'macOS') }}
|
||||
run: |
|
||||
set -eu
|
||||
${{ matrix.platform.source_cmd }}
|
||||
set -eu
|
||||
curdir="$(pwd)"
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
export SDL_TESTS_QUICK=1
|
||||
@@ -177,8 +181,8 @@ jobs:
|
||||
- name: Install (Autotools)
|
||||
if: matrix.platform.autotools
|
||||
run: |
|
||||
set -eu
|
||||
${{ matrix.platform.source_cmd }}
|
||||
set -eu
|
||||
curdir="$(pwd)"
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
make -j"${parallel}" -C build-autotools install V=1
|
||||
@@ -219,8 +223,8 @@ jobs:
|
||||
- name: Run installed-tests (Autotools)
|
||||
if: "runner.os == 'Linux' && matrix.platform.autotools"
|
||||
run: |
|
||||
set -eu
|
||||
${{ matrix.platform.source_cmd }}
|
||||
set -eu
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
sudo make -j"${parallel}" -C build-autotools install
|
||||
sudo make -j"${parallel}" -C build-autotools/test 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' }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Create CMake project using SDL as a subproject
|
||||
shell: python
|
||||
run: |
|
||||
@@ -34,8 +34,14 @@ jobs:
|
||||
os.makedirs(builddir)
|
||||
with open(f"{ builddir }/CMakeLists.txt", "w") as 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)
|
||||
enable_testing()
|
||||
add_subdirectory("{ srcdir }" SDL)
|
||||
"""))
|
||||
- name: Configure (CMake)
|
||||
@@ -53,7 +59,7 @@ jobs:
|
||||
if: "! contains(matrix.platform.name, 'ARM')"
|
||||
run: |
|
||||
$env:SDL_TESTS_QUICK=1
|
||||
ctest -VV --test-dir build/ -C Release
|
||||
ctest -VV --test-dir build/ -C Release -j2
|
||||
- name: Install (CMake)
|
||||
run: |
|
||||
echo "SDL2_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV
|
||||
@@ -68,7 +74,7 @@ jobs:
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
if: ${{ matrix.platform.project != '' }}
|
||||
uses: microsoft/setup-msbuild@v1.1.3
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
- name: Build msbuild
|
||||
if: ${{ matrix.platform.project != '' }}
|
||||
run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}
|
||||
|
||||
2
.github/workflows/n3ds.yml
vendored
2
.github/workflows/n3ds.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
||||
container:
|
||||
image: devkitpro/devkitarm:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install build requirements
|
||||
run: |
|
||||
apt update
|
||||
|
||||
2
.github/workflows/ps2.yaml
vendored
2
.github/workflows/ps2.yaml
vendored
@@ -7,7 +7,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
container: ps2dev/ps2dev:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
apk update
|
||||
|
||||
2
.github/workflows/psp.yaml
vendored
2
.github/workflows/psp.yaml
vendored
@@ -7,7 +7,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
container: pspdev/pspdev:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
apk update
|
||||
|
||||
2
.github/workflows/riscos.yml
vendored
2
.github/workflows/riscos.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
steps:
|
||||
- name: Setup dependencies
|
||||
run: apt-get update && apt-get install -y cmake ninja-build
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Configure (autotools)
|
||||
if: ${{ contains(matrix.platform.name, 'autotools') }}
|
||||
run: |
|
||||
|
||||
2
.github/workflows/vita.yaml
vendored
2
.github/workflows/vita.yaml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
- { name: GLES (pib), os: windows-latest, pib: true }
|
||||
- { name: GLES (PVR_PSP2 + gl4es4vita), os: windows-latest, pvr: true }
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install build requirements
|
||||
run: |
|
||||
apk update
|
||||
|
||||
2
.github/workflows/watcom.yml
vendored
2
.github/workflows/watcom.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
- { name: OS/2, makefile: Makefile.os2 }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: open-watcom/setup-watcom@v0
|
||||
- name: Build SDL2
|
||||
run: |
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -103,6 +103,7 @@ VisualC/visualtest/testsprite2_sample.actions
|
||||
VisualC/visualtest/testsprite2_sample.config
|
||||
VisualC/visualtest/testsprite2_sample.parameters
|
||||
VisualC-GDK/**/Layout
|
||||
VisualC-GDK/shaders/*.h
|
||||
|
||||
# for Android
|
||||
android-project/local.properties
|
||||
|
||||
219
CMakeLists.txt
219
CMakeLists.txt
@@ -2,6 +2,9 @@ if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
|
||||
message(FATAL_ERROR "Prevented in-tree build. Please create a build directory outside of the SDL source code and run \"cmake -S ${CMAKE_SOURCE_DIR} -B .\" from there")
|
||||
endif()
|
||||
|
||||
# MSVC runtime library flags are selected by an abstraction.
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0091 NEW)
|
||||
|
||||
cmake_minimum_required(VERSION 3.0.0...3.5)
|
||||
project(SDL2 C CXX)
|
||||
|
||||
@@ -83,8 +86,8 @@ endif()
|
||||
|
||||
# See docs/release_checklist.md
|
||||
set(SDL_MAJOR_VERSION 2)
|
||||
set(SDL_MINOR_VERSION 28)
|
||||
set(SDL_MICRO_VERSION 0)
|
||||
set(SDL_MINOR_VERSION 30)
|
||||
set(SDL_MICRO_VERSION 2)
|
||||
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
|
||||
|
||||
# Set defaults preventing destination file conflicts
|
||||
@@ -224,11 +227,13 @@ elseif(MSVC_VERSION GREATER 1400) # VisualStudio 8.0+
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "^Intel$")
|
||||
set(OPT_DEF_ASM TRUE)
|
||||
set(USE_INTELCC TRUE)
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "QCC")
|
||||
set(USE_QCC TRUE)
|
||||
else()
|
||||
set(OPT_DEF_ASM FALSE)
|
||||
endif()
|
||||
|
||||
if(USE_GCC OR USE_CLANG OR USE_INTELCC)
|
||||
if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC)
|
||||
set(OPT_DEF_GCC_ATOMICS ON)
|
||||
endif()
|
||||
|
||||
@@ -236,6 +241,11 @@ endif()
|
||||
if(UNIX OR MINGW OR MSYS OR (USE_CLANG AND NOT WINDOWS) OR VITA OR PSP OR PS2 OR N3DS)
|
||||
set(OPT_DEF_LIBC ON)
|
||||
endif()
|
||||
if(WINDOWS OR IOS OR TVOS)
|
||||
set(SDL_SYSTEM_ICONV_DEFAULT OFF)
|
||||
else()
|
||||
set(SDL_SYSTEM_ICONV_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
if(NOT ("$ENV{CFLAGS}" STREQUAL ""))
|
||||
if(CMAKE_VERSION VERSION_LESS 3.11.0)
|
||||
@@ -253,6 +263,9 @@ endif()
|
||||
if(MSVC)
|
||||
option(SDL_FORCE_STATIC_VCRT "Force /MT for static VC runtimes" OFF)
|
||||
if(SDL_FORCE_STATIC_VCRT)
|
||||
if(NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
foreach(flag_var
|
||||
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||
@@ -412,7 +425,8 @@ set_option(SDL_DIRECTFB "Use DirectFB video driver" OFF)
|
||||
dep_option(SDL_DIRECTFB_SHARED "Dynamically load directfb support" ON "SDL_DIRECTFB" OFF)
|
||||
set_option(SDL_DUMMYVIDEO "Use dummy video driver" ON)
|
||||
dep_option(SDL_IBUS "Enable IBus support" ON ${UNIX_SYS} OFF)
|
||||
set_option(SDL_SYSTEM_ICONV "Use iconv() from system-installed libraries" ON)
|
||||
set_option(SDL_SYSTEM_ICONV "Use iconv() from system-installed libraries" ${SDL_SYSTEM_ICONV_DEFAULT})
|
||||
set_option(SDL_LIBICONV "Prefer iconv() from libiconv, if available, over libc version" OFF)
|
||||
set_option(SDL_OPENGL "Include OpenGL support" ON)
|
||||
set_option(SDL_OPENGLES "Include OpenGL ES support" ON)
|
||||
set_option(SDL_PTHREADS "Use POSIX threads for multi-threading" ${SDL_PTHREADS_ENABLED_BY_DEFAULT})
|
||||
@@ -563,7 +577,7 @@ if(NOT SDL_FOREGROUNDING_SIGNAL STREQUAL "OFF")
|
||||
endif()
|
||||
|
||||
# Compiler option evaluation
|
||||
if(USE_GCC OR USE_CLANG OR USE_INTELCC)
|
||||
if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC)
|
||||
# Check for -Wall first, so later things can override pieces of it.
|
||||
# Note: clang-cl treats -Wall as -Weverything (which is very loud),
|
||||
# /W3 as -Wall, and /W4 as -Wall -Wextra. So: /W3 is enough.
|
||||
@@ -577,11 +591,50 @@ if(USE_GCC OR USE_CLANG OR USE_INTELCC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-Wundef HAVE_GCC_WUNDEF)
|
||||
if(HAVE_GCC_WUNDEF)
|
||||
list(APPEND EXTRA_CFLAGS "-Wundef")
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-fno-strict-aliasing HAVE_GCC_NO_STRICT_ALIASING)
|
||||
if(HAVE_GCC_NO_STRICT_ALIASING)
|
||||
list(APPEND EXTRA_CFLAGS "-fno-strict-aliasing")
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-Wdocumentation HAVE_GCC_WDOCUMENTATION)
|
||||
if(HAVE_GCC_WDOCUMENTATION)
|
||||
if(SDL_WERROR)
|
||||
check_c_compiler_flag(-Werror=documentation HAVE_GCC_WERROR_DOCUMENTATION)
|
||||
if(HAVE_GCC_WERROR_DOCUMENTATION)
|
||||
list(APPEND EXTRA_CFLAGS "-Werror=documentation")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND EXTRA_CFLAGS "-Wdocumentation")
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-Wdocumentation-unknown-command HAVE_GCC_WDOCUMENTATION_UNKNOWN_COMMAND)
|
||||
if(HAVE_GCC_WDOCUMENTATION_UNKNOWN_COMMAND)
|
||||
if(SDL_WERROR)
|
||||
check_c_compiler_flag(-Werror=documentation-unknown-command HAVE_GCC_WERROR_DOCUMENTATION_UNKNOWN_COMMAND)
|
||||
if(HAVE_GCC_WERROR_DOCUMENTATION_UNKNOWN_COMMAND)
|
||||
list(APPEND EXTRA_CFLAGS "-Werror=documentation-unknown-command")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND EXTRA_CFLAGS "-Wdocumentation-unknown-command")
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-fcomment-block-commands=threadsafety HAVE_GCC_COMMENT_BLOCK_COMMANDS)
|
||||
if(HAVE_GCC_COMMENT_BLOCK_COMMANDS)
|
||||
list(APPEND EXTRA_CFLAGS "-fcomment-block-commands=threadsafety")
|
||||
list(APPEND EXTRA_CFLAGS "-fcomment-block-commands=deprecated")
|
||||
else()
|
||||
check_c_compiler_flag(/clang:-fcomment-block-commands=threadsafety HAVE_CLANG_COMMENT_BLOCK_COMMANDS)
|
||||
if(HAVE_CLANG_COMMENT_BLOCK_COMMANDS)
|
||||
list(APPEND EXTRA_CFLAGS "/clang:-fcomment-block-commands=threadsafety")
|
||||
list(APPEND EXTRA_CFLAGS "/clang:-fcomment-block-commands=deprecated")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-Wdeclaration-after-statement HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
|
||||
if(HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
|
||||
if(SDL_WERROR)
|
||||
@@ -620,11 +673,6 @@ if(USE_GCC OR USE_CLANG OR USE_INTELCC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS "-mpreferred-stack-boundary=2")
|
||||
check_c_source_compiles("int x = 0; int main(int argc, char **argv) { return 0; }"
|
||||
HAVE_GCC_PREFERRED_STACK_BOUNDARY)
|
||||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS "-fvisibility=hidden -Werror")
|
||||
check_c_source_compiles("
|
||||
#if !defined(__GNUC__) || __GNUC__ < 4
|
||||
@@ -863,7 +911,7 @@ if(SDL_ASSEMBLY)
|
||||
|
||||
if(SDL_LSX)
|
||||
cmake_push_check_state()
|
||||
list(APPEND CMAKE_REQUIRED_FLAGS "-mlsx")
|
||||
set(CMAKE_REQUIRED_FLAGS "-mlsx")
|
||||
check_c_source_compiles("
|
||||
#ifndef __loongarch_sx
|
||||
#error Assembler CPP flag not enabled
|
||||
@@ -880,7 +928,7 @@ if(SDL_ASSEMBLY)
|
||||
|
||||
if(SDL_LASX)
|
||||
cmake_push_check_state()
|
||||
list(APPEND CMAKE_REQUIRED_FLAGS "-mlasx")
|
||||
set(CMAKE_REQUIRED_FLAGS "-mlasx")
|
||||
check_c_source_compiles("
|
||||
#ifndef __loongarch_asx
|
||||
#error Assembler CPP flag not enabled
|
||||
@@ -1023,15 +1071,11 @@ if(SDL_LIBC)
|
||||
sys/types.h
|
||||
wchar.h
|
||||
)
|
||||
if(NOT EMSCRIPTEN)
|
||||
list(APPEND headers_to_check libunwind.h)
|
||||
endif()
|
||||
foreach(_HEADER ${headers_to_check})
|
||||
string(TOUPPER "HAVE_${_HEADER}" _UPPER)
|
||||
string(REGEX REPLACE "[./]" "_" _HAVE_H ${_UPPER})
|
||||
check_include_file("${_HEADER}" ${_HAVE_H})
|
||||
endforeach()
|
||||
check_include_file(linux/input.h HAVE_LINUX_INPUT_H)
|
||||
|
||||
set(STDC_HEADER_NAMES "stddef.h;stdarg.h;stdlib.h;string.h;stdio.h;wchar.h;float.h")
|
||||
check_include_files("${STDC_HEADER_NAMES}" STDC_HEADERS)
|
||||
@@ -1063,6 +1107,8 @@ if(SDL_LIBC)
|
||||
check_symbol_exists(getauxval "sys/auxv.h" HAVE_GETAUXVAL)
|
||||
check_symbol_exists(elf_aux_info "sys/auxv.h" HAVE_ELF_AUX_INFO)
|
||||
check_symbol_exists(poll "poll.h" HAVE_POLL)
|
||||
check_symbol_exists(memfd_create "sys/mman.h" HAVE_MEMFD_CREATE)
|
||||
check_symbol_exists(posix_fallocate "fcntl.h" HAVE_POSIX_FALLOCATE)
|
||||
|
||||
check_library_exists(m pow "" HAVE_LIBM)
|
||||
if(HAVE_LIBM)
|
||||
@@ -1085,16 +1131,31 @@ if(SDL_LIBC)
|
||||
endif()
|
||||
|
||||
if(SDL_SYSTEM_ICONV)
|
||||
check_library_exists(iconv iconv_open "" HAVE_LIBICONV)
|
||||
if(HAVE_LIBICONV)
|
||||
list(APPEND EXTRA_LIBS iconv)
|
||||
check_c_source_compiles("
|
||||
#define LIBICONV_PLUG 1 /* in case libiconv header is in include path */
|
||||
#include <stddef.h>
|
||||
#include <iconv.h>
|
||||
int main(int argc, char **argv) {
|
||||
return !iconv_open(NULL,NULL);
|
||||
}" ICONV_IN_LIBC)
|
||||
|
||||
cmake_push_check_state()
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES iconv)
|
||||
check_c_source_compiles("
|
||||
#include <stddef.h>
|
||||
#include <iconv.h>
|
||||
int main(int argc, char **argv) {
|
||||
return !iconv_open(NULL,NULL);
|
||||
}" ICONV_IN_LIBICONV)
|
||||
cmake_pop_check_state()
|
||||
|
||||
if(ICONV_IN_LIBC OR ICONV_IN_LIBICONV)
|
||||
set(HAVE_ICONV 1)
|
||||
set(HAVE_SYSTEM_ICONV TRUE)
|
||||
else()
|
||||
check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)
|
||||
if(HAVE_BUILTIN_ICONV)
|
||||
set(HAVE_ICONV 1)
|
||||
set(HAVE_SYSTEM_ICONV TRUE)
|
||||
if(ICONV_IN_LIBICONV AND (SDL_LIBICONV OR (NOT ICONV_IN_LIBC)))
|
||||
set(SDL_USE_LIBICONV 1)
|
||||
set(HAVE_LIBICONV TRUE)
|
||||
list(APPEND EXTRA_LIBS iconv)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -1405,10 +1466,7 @@ elseif(EMSCRIPTEN)
|
||||
endif()
|
||||
|
||||
CheckPTHREAD()
|
||||
|
||||
if(HAVE_LIBUNWIND_H)
|
||||
list(APPEND EXTRA_TEST_LIBS unwind)
|
||||
endif()
|
||||
CheckLibUnwind()
|
||||
|
||||
elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
if(SDL_AUDIO)
|
||||
@@ -1427,6 +1485,12 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
file(GLOB AIX_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/paudio/*.c)
|
||||
list(APPEND SOURCE_FILES ${AIX_AUDIO_SOURCES})
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
elseif(QNX)
|
||||
set(SDL_AUDIO_DRIVER_QSA 1)
|
||||
file(GLOB QSA_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/qsa/*.c)
|
||||
list(APPEND SOURCE_FILES ${QSA_AUDIO_SOURCES})
|
||||
list(APPEND EXTRA_LIBS asound)
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
endif()
|
||||
CheckOSS()
|
||||
CheckALSA()
|
||||
@@ -1458,6 +1522,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
set(SDL_VIDEO_VULKAN 1)
|
||||
set(HAVE_VULKAN TRUE)
|
||||
endif()
|
||||
CheckQNXScreen()
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
@@ -1469,7 +1534,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
#ifndef EVIOCGNAME
|
||||
#error EVIOCGNAME() ioctl not available
|
||||
#endif
|
||||
int main(int argc, char** argv) { return 0; }" HAVE_INPUT_EVENTS)
|
||||
int main(int argc, char** argv) { return 0; }" HAVE_LINUX_INPUT_H)
|
||||
|
||||
if(LINUX)
|
||||
check_c_source_compiles("
|
||||
@@ -1505,11 +1570,11 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
}" HAVE_INPUT_WSCONS)
|
||||
endif()
|
||||
|
||||
if(HAVE_INPUT_EVENTS)
|
||||
if(HAVE_LINUX_INPUT_H)
|
||||
set(SDL_INPUT_LINUXEV 1)
|
||||
endif()
|
||||
|
||||
if(SDL_HAPTIC AND HAVE_INPUT_EVENTS)
|
||||
if(SDL_HAPTIC AND HAVE_LINUX_INPUT_H)
|
||||
set(SDL_HAPTIC_LINUX 1)
|
||||
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/linux/*.c)
|
||||
list(APPEND SOURCE_FILES ${HAPTIC_SOURCES})
|
||||
@@ -1572,15 +1637,8 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(HAVE_LIBUNWIND_H)
|
||||
# We've already found the header, so link the lib if present.
|
||||
# NB: This .pc file is not present on FreeBSD where the implicitly
|
||||
# linked base system libgcc_s includes all libunwind ABI.
|
||||
pkg_search_module(UNWIND libunwind)
|
||||
pkg_search_module(UNWIND_GENERIC libunwind-generic)
|
||||
list(APPEND EXTRA_TEST_LIBS ${UNWIND_LIBRARIES} ${UNWIND_GENERIC_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
CheckLibUnwind()
|
||||
|
||||
if(HAVE_DBUS_DBUS_H)
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_dbus.c")
|
||||
@@ -1602,7 +1660,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_udev.c")
|
||||
endif()
|
||||
|
||||
if(HAVE_INPUT_EVENTS)
|
||||
if(HAVE_LINUX_INPUT_H)
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_evdev.c")
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_evdev_kbd.c")
|
||||
endif()
|
||||
@@ -1611,6 +1669,11 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/freebsd/SDL_evdev_kbd_freebsd.c")
|
||||
endif()
|
||||
|
||||
if(HAVE_INPUT_WSCONS)
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/openbsd/SDL_wscons_kbd.c")
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/openbsd/SDL_wscons_mouse.c")
|
||||
endif()
|
||||
|
||||
# Always compiled for Linux, unconditionally:
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_evdev_capabilities.c")
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_threadprio.c")
|
||||
@@ -1708,6 +1771,13 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
set(HAVE_RPATH TRUE)
|
||||
endif()
|
||||
|
||||
if(QNX)
|
||||
# QNX's *printf() family generates a SIGSEGV if NULL is passed for a string
|
||||
# specifier (on purpose), but SDL expects "(null)". Use the built-in
|
||||
# implementation.
|
||||
set(HAVE_VSNPRINTF 0)
|
||||
set(USE_POSIX_SPAWN 1)
|
||||
endif()
|
||||
elseif(WINDOWS)
|
||||
find_program(WINDRES windres)
|
||||
|
||||
@@ -1766,7 +1836,7 @@ elseif(WINDOWS)
|
||||
check_include_file(ddraw.h HAVE_DDRAW_H)
|
||||
check_include_file(dsound.h HAVE_DSOUND_H)
|
||||
check_include_file(dinput.h HAVE_DINPUT_H)
|
||||
if(WINDOWS_STORE OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM")
|
||||
if(WINDOWS_STORE OR SDL_CPU_ARM32)
|
||||
set(HAVE_DINPUT_H 0)
|
||||
endif()
|
||||
check_include_file(dxgi.h HAVE_DXGI_H)
|
||||
@@ -1787,16 +1857,6 @@ elseif(WINDOWS)
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
int main(int argc, char **argv) { return 0; }" HAVE_XINPUT_H)
|
||||
check_c_source_compiles("
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
XINPUT_GAMEPAD_EX x1;
|
||||
int main(int argc, char **argv) { return 0; }" HAVE_XINPUT_GAMEPAD_EX)
|
||||
check_c_source_compiles("
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
XINPUT_STATE_EX s1;
|
||||
int main(int argc, char **argv) { return 0; }" HAVE_XINPUT_STATE_EX)
|
||||
check_c_source_compiles("
|
||||
#define COBJMACROS
|
||||
#include <windows.gaming.input.h>
|
||||
@@ -1926,7 +1986,7 @@ elseif(WINDOWS)
|
||||
|
||||
# Libraries for Win32 native and MinGW
|
||||
if(NOT WINDOWS_STORE)
|
||||
list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32)
|
||||
list(APPEND EXTRA_LIBS kernel32 user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32)
|
||||
endif()
|
||||
|
||||
if(WINDOWS_STORE)
|
||||
@@ -2472,7 +2532,7 @@ elseif(VITA)
|
||||
${SDL2_SOURCE_DIR}/src/thread/vita/SDL_sysmutex.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/vita/SDL_syssem.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/vita/SDL_systhread.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/vita/SDL_syscond.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syscond.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c)
|
||||
set(HAVE_SDL_THREADS TRUE)
|
||||
endif()
|
||||
@@ -2624,7 +2684,10 @@ elseif(PSP)
|
||||
endif()
|
||||
if(SDL_THREADS)
|
||||
set(SDL_THREAD_PSP 1)
|
||||
file(GLOB PSP_THREAD_SOURCES ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c ${SDL2_SOURCE_DIR}/src/thread/psp/*.c)
|
||||
file(GLOB PSP_THREAD_SOURCES
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syscond.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/psp/*.c)
|
||||
list(APPEND SOURCE_FILES ${PSP_THREAD_SOURCES})
|
||||
set(HAVE_SDL_THREADS TRUE)
|
||||
endif()
|
||||
@@ -2685,7 +2748,11 @@ elseif(PS2)
|
||||
endif()
|
||||
if(SDL_THREADS)
|
||||
set(SDL_THREAD_PS2 1)
|
||||
file(GLOB PS2_THREAD_SOURCES ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_sysmutex.c ${SDL2_SOURCE_DIR}/src/thread/ps2/*.c)
|
||||
file(GLOB PS2_THREAD_SOURCES
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_sysmutex.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syscond.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/ps2/*.c)
|
||||
list(APPEND SOURCE_FILES ${PS2_THREAD_SOURCES})
|
||||
set(HAVE_SDL_THREADS TRUE)
|
||||
endif()
|
||||
@@ -2816,7 +2883,9 @@ elseif(N3DS)
|
||||
if(SDL_THREADS)
|
||||
set(SDL_THREAD_N3DS 1)
|
||||
file(GLOB N3DS_THREAD_SOURCES ${SDL2_SOURCE_DIR}/src/thread/n3ds/*.c)
|
||||
list(APPEND SOURCE_FILES ${N3DS_THREAD_SOURCES} ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c)
|
||||
list(APPEND SOURCE_FILES ${N3DS_THREAD_SOURCES}
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syscond.c)
|
||||
set(HAVE_SDL_THREADS TRUE)
|
||||
endif()
|
||||
|
||||
@@ -3004,6 +3073,10 @@ endif()
|
||||
listtostr(EXTRA_CFLAGS _EXTRA_CFLAGS)
|
||||
set(EXTRA_CFLAGS ${_EXTRA_CFLAGS})
|
||||
|
||||
if(USE_GCC OR USE_CLANG)
|
||||
string(REGEX REPLACE "(^| )-I" "\\1 -isystem" EXTRA_CFLAGS "${EXTRA_CFLAGS}")
|
||||
endif()
|
||||
|
||||
# Compat helpers for the configuration files
|
||||
|
||||
if(EXISTS "${PROJECT_SOURCE_DIR}/VERSION.txt")
|
||||
@@ -3066,9 +3139,17 @@ else()
|
||||
set(sdl_static_libname "SDL2")
|
||||
endif()
|
||||
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
# CMAKE_PREFIX_PATH and CMAKE_INSTALL_FULL_BINDIR can be a non-absolute path
|
||||
# when a master-project does e.g. `set(CMAKE_INSTALL_PREFIX "libs/SDL2" CACHE PATH "prefix" FORCE)`.
|
||||
if(NOT IS_ABSOLUTE "${CMAKE_INSTALL_PREFIX}")
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}")
|
||||
endif()
|
||||
if(NOT IS_ABSOLUTE "${CMAKE_INSTALL_FULL_BINDIR}")
|
||||
set(CMAKE_INSTALL_FULL_BINDIR "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_FULL_BINDIR}")
|
||||
endif()
|
||||
file(RELATIVE_PATH bin_prefix_relpath "${CMAKE_INSTALL_FULL_BINDIR}" "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix "\${prefix}")
|
||||
set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
|
||||
set(bindir "\${exec_prefix}/${CMAKE_INSTALL_BINDIR}")
|
||||
@@ -3187,7 +3268,7 @@ if (SDL_ASAN)
|
||||
endif()
|
||||
|
||||
if(SDL_CCACHE AND NOT CMAKE_VERSION VERSION_LESS 3.4)
|
||||
cmake_minimum_required(VERSION 3.4)
|
||||
cmake_minimum_required(VERSION 3.4...3.5)
|
||||
find_program(CCACHE_BINARY ccache)
|
||||
if(CCACHE_BINARY)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_BINARY})
|
||||
@@ -3312,6 +3393,12 @@ if(ANDROID)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
cmake_push_check_state(RESET)
|
||||
check_c_compiler_flag(-fobjc-arc COMPILER_SUPPORTS_FOBJC_ARC)
|
||||
cmake_pop_check_state()
|
||||
if(NOT COMPILER_SUPPORTS_FOBJC_ARC)
|
||||
message(FATAL_ERROR "Compiler does not support -fobjc-arc: this is required on Apple platforms")
|
||||
endif()
|
||||
target_compile_options(sdl-build-options INTERFACE "-fobjc-arc")
|
||||
endif()
|
||||
|
||||
@@ -3334,6 +3421,7 @@ if(SDL_SHARED)
|
||||
# alias target for in-tree builds
|
||||
add_library(SDL2::SDL2 ALIAS SDL2)
|
||||
set_target_properties(SDL2 PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
set_target_properties(SDL2 PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS FALSE)
|
||||
if(NOT SDL_LIBC)
|
||||
if(SDL_CPU_X86)
|
||||
# FIXME: should be added for all architectures (missing symbols for ARM)
|
||||
@@ -3368,7 +3456,7 @@ if(SDL_SHARED)
|
||||
OUTPUT_NAME "SDL2")
|
||||
endif()
|
||||
# Note: The clang toolset for Visual Studio does not support /NODEFAULTLIB.
|
||||
if(MSVC AND NOT SDL_LIBC AND NOT MSVC_CLANG AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM")
|
||||
if(MSVC AND NOT SDL_LIBC AND NOT MSVC_CLANG AND NOT SDL_CPU_ARM32)
|
||||
# Don't try to link with the default set of libraries.
|
||||
if(NOT WINDOWS_STORE)
|
||||
set_property(TARGET SDL2 APPEND_STRING PROPERTY LINK_FLAGS " /NODEFAULTLIB")
|
||||
@@ -3452,6 +3540,7 @@ if(SDL_TEST)
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL2>")
|
||||
target_link_libraries(SDL2_test PRIVATE ${EXTRA_TEST_LIBS})
|
||||
target_include_directories(SDL2_test PRIVATE ${EXTRA_TEST_INCLUDES})
|
||||
set_property(TARGET SDL2_test APPEND PROPERTY COMPATIBLE_INTERFACE_STRING "SDL_VERSION")
|
||||
set_property(TARGET SDL2_test PROPERTY INTERFACE_SDL_VERSION "SDL2")
|
||||
endif()
|
||||
@@ -3463,6 +3552,9 @@ if(NOT SDL2_DISABLE_INSTALL)
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
if(MSVC)
|
||||
SDL_install_pdb(SDL2 "${CMAKE_INSTALL_BINDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT WINDOWS_STORE AND NOT SDL2_DISABLE_SDL2MAIN)
|
||||
@@ -3470,6 +3562,9 @@ if(NOT SDL2_DISABLE_INSTALL)
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
if(MSVC)
|
||||
SDL_install_pdb(SDL2main "${CMAKE_INSTALL_LIBDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_STATIC)
|
||||
@@ -3477,6 +3572,9 @@ if(NOT SDL2_DISABLE_INSTALL)
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
if(MSVC)
|
||||
SDL_install_pdb(SDL2-static "${CMAKE_INSTALL_LIBDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_TEST)
|
||||
@@ -3484,6 +3582,9 @@ if(NOT SDL2_DISABLE_INSTALL)
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
if(MSVC)
|
||||
SDL_install_pdb(SDL2_test "${CMAKE_INSTALL_LIBDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
##### Export files #####
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
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
|
||||
#
|
||||
# If you have GNU libiconv installed (iconv2.dll), you
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
LIBNAME = SDL2
|
||||
MAJOR_VERSION = 2
|
||||
MINOR_VERSION = 28
|
||||
MICRO_VERSION = 0
|
||||
MINOR_VERSION = 30
|
||||
MICRO_VERSION = 2
|
||||
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
||||
DESCRIPTION = Simple DirectMedia Layer 2
|
||||
|
||||
@@ -56,7 +56,7 @@ CFLAGS_DLL+= -bd
|
||||
# iconv:
|
||||
LIBICONV_LIB=iconv2.lib
|
||||
!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)
|
||||
!else
|
||||
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_sensor.c SDL_touch.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_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 &
|
||||
@@ -94,7 +94,7 @@ SRCS+= SDL_systimer.c
|
||||
SRCS+= SDL_sysloadso.c
|
||||
SRCS+= SDL_sysfilesystem.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_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
|
||||
SRCS+= SDL_dummysensor.c
|
||||
@@ -152,6 +152,8 @@ SDL_blendpoint.obj: SDL_blendpoint.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
|
||||
SDL_RLEaccel.obj: SDL_RLEaccel.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
|
||||
yuv_rgb_sse.obj: yuv_rgb_sse.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=202 -fo=$^@ $<
|
||||
!ifeq HIDAPI 1
|
||||
# c99 mode needed because of structs with flexible array members in libusb.h
|
||||
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
|
||||
#
|
||||
# To error out upon warnings: wmake -f Makefile.w32 ENABLE_WERROR=1
|
||||
|
||||
LIBNAME = SDL2
|
||||
MAJOR_VERSION = 2
|
||||
MINOR_VERSION = 28
|
||||
MICRO_VERSION = 0
|
||||
MINOR_VERSION = 30
|
||||
MICRO_VERSION = 2
|
||||
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
||||
|
||||
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_sensor.c SDL_touch.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_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 &
|
||||
@@ -73,7 +73,7 @@ SRCS+= SDL_systimer.c
|
||||
SRCS+= SDL_sysloadso.c
|
||||
SRCS+= SDL_sysfilesystem.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_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.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_windowssensor.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
|
||||
|
||||
@@ -147,6 +147,9 @@ SDL_RLEaccel.obj: SDL_RLEaccel.c
|
||||
SDL_malloc.obj: SDL_malloc.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
|
||||
|
||||
yuv_rgb_sse.obj: yuv_rgb_sse.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=202 -fo=$^@ $<
|
||||
|
||||
# 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 &
|
||||
k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
|
||||
|
||||
@@ -173,6 +173,12 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir)</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox Series)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">
|
||||
<Midl>
|
||||
@@ -201,6 +207,12 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir) one</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox One)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">
|
||||
<Midl>
|
||||
@@ -259,6 +271,12 @@
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir)</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox Series)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">
|
||||
<Midl>
|
||||
@@ -288,6 +306,12 @@
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir) one</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox One)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\begin_code.h" />
|
||||
@@ -412,6 +436,7 @@
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.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\usb_ids.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_sdk_platform.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_beta.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\wmmsg.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>
|
||||
@@ -563,7 +593,7 @@
|
||||
<ClCompile Include="..\..\src\events\SDL_touch.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_windowevents.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\SDL_haptic.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_stadia.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_wii.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\SDL_gamecontroller.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\windows\SDL_dinputjoystick.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_windowsvulkan.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>
|
||||
<ResourceCompile Include="..\..\src\main\windows\version.rc" />
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<Filter Include="filesystem">
|
||||
<UniqueIdentifier>{377061e4-3856-4f05-b916-0d3b360df0f6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="filesystem\windows">
|
||||
<Filter Include="filesystem\gdk">
|
||||
<UniqueIdentifier>{226a6643-1c65-4c7f-92aa-861313d974bb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="haptic">
|
||||
@@ -501,6 +501,9 @@
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h">
|
||||
<Filter>joystick</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h">
|
||||
<Filter>joystick</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h">
|
||||
<Filter>joystick</Filter>
|
||||
</ClInclude>
|
||||
@@ -777,9 +780,6 @@
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
@@ -925,8 +925,8 @@
|
||||
<ClCompile Include="..\..\src\file\SDL_rwops.c">
|
||||
<Filter>file</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c">
|
||||
<Filter>filesystem\windows</Filter>
|
||||
<ClCompile Include="..\..\src\filesystem\gdk\SDL_sysfilesystem.cpp">
|
||||
<Filter>filesystem\gdk</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\haptic\SDL_haptic.c">
|
||||
<Filter>haptic</Filter>
|
||||
@@ -943,6 +943,9 @@
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c">
|
||||
<Filter>joystick</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c">
|
||||
<Filter>joystick</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\libm\e_atan2.c">
|
||||
<Filter>libm</Filter>
|
||||
</ClCompile>
|
||||
@@ -1081,6 +1084,9 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</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.Xbox.Scarlett.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
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -383,7 +383,7 @@ main(int argc, char *argv[])
|
||||
|
||||
/* Initialize test framework */
|
||||
state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO | SDL_INIT_AUDIO);
|
||||
if (state == NULL) {
|
||||
if (!state) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ main(int argc, char *argv[])
|
||||
/* Create the windows, initialize the renderers, and load the textures */
|
||||
sprites =
|
||||
(SDL_Texture **) SDL_malloc(state->num_windows * sizeof(*sprites));
|
||||
if (sprites == NULL) {
|
||||
if (!sprites) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n");
|
||||
quit(2);
|
||||
}
|
||||
@@ -461,7 +461,7 @@ main(int argc, char *argv[])
|
||||
|
||||
soundname = GetResourceFilename(argc > 1 ? argv[1] : NULL, "sample.wav");
|
||||
|
||||
if (soundname == NULL) {
|
||||
if (!soundname) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "%s\n", SDL_GetError());
|
||||
quit(1);
|
||||
}
|
||||
|
||||
@@ -125,6 +125,7 @@
|
||||
<ClInclude Include="..\src\joystick\controller_type.h" />
|
||||
<ClInclude Include="..\src\joystick\SDL_gamecontrollerdb.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\virtual\SDL_virtualjoystick_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_winrtvideo_cpp.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>
|
||||
<ClCompile Include="..\src\atomic\SDL_atomic.c" />
|
||||
@@ -237,6 +246,7 @@
|
||||
<ClCompile Include="..\src\joystick\controller_type.c" />
|
||||
<ClCompile Include="..\src\joystick\SDL_gamecontroller.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\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\src\joystick\windows\SDL_windowsjoystick.c" />
|
||||
@@ -344,7 +354,9 @@
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtvideo.cpp">
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
</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>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{89e9b32e-a86a-47c3-a948-d2b1622925ce}</ProjectGuid>
|
||||
|
||||
@@ -255,6 +255,9 @@
|
||||
<ClInclude Include="..\src\joystick\SDL_joystick_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\joystick\SDL_steam_virtual_gamepad.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\joystick\SDL_sysjoystick.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
@@ -558,6 +561,9 @@
|
||||
<ClCompile Include="..\src\joystick\SDL_joystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\joystick\SDL_steam_virtual_gamepad.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\joystick\virtual\SDL_virtualjoystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -846,4 +852,4 @@
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -336,6 +336,7 @@
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.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\usb_ids.h" />
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
@@ -393,7 +394,6 @@
|
||||
<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\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_beta.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
|
||||
@@ -438,7 +438,13 @@
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\wmmsg.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>
|
||||
@@ -493,6 +499,7 @@
|
||||
<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_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_wii.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||
@@ -500,6 +507,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.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\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
|
||||
@@ -621,7 +629,9 @@
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.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>
|
||||
<ResourceCompile Include="..\..\src\main\windows\version.rc" />
|
||||
|
||||
@@ -501,6 +501,9 @@
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h">
|
||||
<Filter>joystick</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h">
|
||||
<Filter>joystick</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h">
|
||||
<Filter>joystick</Filter>
|
||||
</ClInclude>
|
||||
@@ -777,9 +780,6 @@
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
@@ -934,6 +934,9 @@
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c">
|
||||
<Filter>joystick</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c">
|
||||
<Filter>joystick</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\libm\e_atan2.c">
|
||||
<Filter>libm</Filter>
|
||||
</ClCompile>
|
||||
@@ -1072,6 +1075,9 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# SDL2 CMake configuration file:
|
||||
# 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)
|
||||
set_package_properties(SDL2 PROPERTIES
|
||||
|
||||
@@ -210,6 +210,7 @@
|
||||
<ClCompile Include="..\..\..\test\testautomation_hints.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_joystick.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_keyboard.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_log.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_main.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_math.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_mouse.c" />
|
||||
@@ -224,6 +225,7 @@
|
||||
<ClCompile Include="..\..\..\test\testautomation_syswm.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_timer.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_video.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_subsystems.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\test\testautomation_suites.h" />
|
||||
@@ -231,4 +233,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
26
WhatsNew.txt
26
WhatsNew.txt
@@ -1,6 +1,32 @@
|
||||
|
||||
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:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -118,7 +118,7 @@ initializeTextures(SDL_Renderer *renderer)
|
||||
|
||||
/* load the ship */
|
||||
bmp_surface = SDL_LoadBMP("ship.bmp");
|
||||
if (bmp_surface == NULL) {
|
||||
if (!bmp_surface) {
|
||||
fatalError("could not ship.bmp");
|
||||
}
|
||||
/* set blue to transparent on the ship */
|
||||
@@ -127,7 +127,7 @@ initializeTextures(SDL_Renderer *renderer)
|
||||
|
||||
/* create ship texture from surface */
|
||||
ship = SDL_CreateTextureFromSurface(renderer, bmp_surface);
|
||||
if (ship == NULL) {
|
||||
if (!ship) {
|
||||
fatalError("could not create ship texture");
|
||||
}
|
||||
SDL_SetTextureBlendMode(ship, SDL_BLENDMODE_BLEND);
|
||||
@@ -140,12 +140,12 @@ initializeTextures(SDL_Renderer *renderer)
|
||||
|
||||
/* load the space background */
|
||||
bmp_surface = SDL_LoadBMP("space.bmp");
|
||||
if (bmp_surface == NULL) {
|
||||
if (!bmp_surface) {
|
||||
fatalError("could not load space.bmp");
|
||||
}
|
||||
/* create space texture from surface */
|
||||
space = SDL_CreateTextureFromSurface(renderer, bmp_surface);
|
||||
if (space == NULL) {
|
||||
if (!space) {
|
||||
fatalError("could not create space texture");
|
||||
}
|
||||
SDL_FreeSurface(bmp_surface);
|
||||
@@ -179,7 +179,7 @@ main(int argc, char *argv[])
|
||||
printf("There are %d joysticks available\n", SDL_NumJoysticks());
|
||||
printf("Default joystick (index 0) is %s\n", SDL_JoystickName(0));
|
||||
accelerometer = SDL_JoystickOpen(0);
|
||||
if (accelerometer == NULL) {
|
||||
if (!accelerometer) {
|
||||
fatalError("Could not open joystick (accelerometer)");
|
||||
}
|
||||
printf("joystick number of axis = %d\n",
|
||||
|
||||
@@ -334,7 +334,7 @@ initializeTexture()
|
||||
to format passed into OpenGL */
|
||||
|
||||
bmp_surface = SDL_LoadBMP("stroke.bmp");
|
||||
if (bmp_surface == NULL) {
|
||||
if (!bmp_surface) {
|
||||
fatalError("could not load stroke.bmp");
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ initializeTexture(SDL_Renderer *renderer)
|
||||
SDL_Surface *bmp_surface;
|
||||
/* load the bmp */
|
||||
bmp_surface = SDL_LoadBMP("icon.bmp");
|
||||
if (bmp_surface == NULL) {
|
||||
if (!bmp_surface) {
|
||||
fatalError("could not load bmp");
|
||||
}
|
||||
/* set white to transparent on the happyface */
|
||||
@@ -117,7 +117,7 @@ initializeTexture(SDL_Renderer *renderer)
|
||||
|
||||
/* convert RGBA surface to texture */
|
||||
texture = SDL_CreateTextureFromSurface(renderer, bmp_surface);
|
||||
if (texture == NULL) {
|
||||
if (!texture) {
|
||||
fatalError("could not create texture");
|
||||
}
|
||||
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
|
||||
|
||||
@@ -165,7 +165,7 @@ loadFont(void)
|
||||
{
|
||||
SDL_Surface *surface = SDL_LoadBMP("kromasky_16x16.bmp");
|
||||
|
||||
if (surface == NULL) {
|
||||
if (!surface) {
|
||||
printf("Error loading bitmap: %s\n", SDL_GetError());
|
||||
return 0;
|
||||
} else {
|
||||
@@ -183,7 +183,7 @@ loadFont(void)
|
||||
SDL_BlitSurface(surface, NULL, converted, NULL);
|
||||
/* create our texture */
|
||||
texture = SDL_CreateTextureFromSurface(renderer, converted);
|
||||
if (texture == NULL) {
|
||||
if (!texture) {
|
||||
printf("texture creation failed: %s\n", SDL_GetError());
|
||||
} else {
|
||||
/* set blend mode for our texture */
|
||||
|
||||
@@ -58,11 +58,11 @@ main(int argc, char *argv[])
|
||||
|
||||
/* create window and renderer */
|
||||
window = SDL_CreateWindow(NULL, 0, 0, 320, 480, SDL_WINDOW_ALLOW_HIGHDPI);
|
||||
if (window == NULL) {
|
||||
if (!window) {
|
||||
fatalError("Could not initialize Window");
|
||||
}
|
||||
renderer = SDL_CreateRenderer(window, -1, 0);
|
||||
if (renderer == NULL) {
|
||||
if (!renderer) {
|
||||
fatalError("Could not create renderer");
|
||||
}
|
||||
|
||||
|
||||
@@ -57,13 +57,13 @@ initializeTexture(SDL_Renderer *renderer)
|
||||
{
|
||||
SDL_Surface *bmp_surface;
|
||||
bmp_surface = SDL_LoadBMP("stroke.bmp");
|
||||
if (bmp_surface == NULL) {
|
||||
if (!bmp_surface) {
|
||||
fatalError("could not load stroke.bmp");
|
||||
}
|
||||
brush =
|
||||
SDL_CreateTextureFromSurface(renderer, bmp_surface);
|
||||
SDL_FreeSurface(bmp_surface);
|
||||
if (brush == NULL) {
|
||||
if (!brush) {
|
||||
fatalError("could not create brush texture");
|
||||
}
|
||||
/* additive blending -- laying strokes on top of eachother makes them brighter */
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.28.0</string>
|
||||
<string>2.30.2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.28.0</string>
|
||||
<string>2.30.2</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
Title SDL 2.28.0
|
||||
Title SDL 2.30.2
|
||||
Version 1
|
||||
Description SDL Library for Mac OS X (http://www.libsdl.org)
|
||||
DefaultLocation /Library/Frameworks
|
||||
|
||||
@@ -31,8 +31,15 @@ endmacro()
|
||||
|
||||
set(SDL2_FOUND TRUE)
|
||||
|
||||
string(REGEX REPLACE "SDL2\\.framework.*" "SDL2.framework" SDL2_FRAMEWORK_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
string(REGEX REPLACE "SDL2\\.framework.*" "" SDL2_FRAMEWORK_PARENT_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
# Compute the installation prefix relative to this file.
|
||||
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.
|
||||
|
||||
@@ -49,12 +56,12 @@ set(SDL2_LIBRARIES "SDL2::SDL2")
|
||||
# This is done for compatibility with CMake generated SDL2-target.cmake files.
|
||||
|
||||
if(NOT TARGET SDL2::SDL2)
|
||||
add_library(SDL2::SDL2 INTERFACE IMPORTED)
|
||||
add_library(SDL2::SDL2 SHARED IMPORTED)
|
||||
set_target_properties(SDL2::SDL2
|
||||
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_LINK_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\";SHELL:-framework SDL2"
|
||||
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
|
||||
INTERFACE_SDL2_SHARED "ON"
|
||||
COMPATIBLE_INTERFACE_STRING "SDL_VERSION"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
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
|
||||
can_build_shared=yes
|
||||
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC,
|
||||
# which needs '.lib').
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC and
|
||||
# ICC, which need '.lib').
|
||||
libext=a
|
||||
|
||||
with_gnu_ld=$lt_cv_prog_gnu_ld
|
||||
@@ -1365,7 +1365,7 @@ mips64*-*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
|
||||
# options accordingly. Note that the listed cases only cover the
|
||||
# situations where additional linker options are needed (such as when
|
||||
@@ -1380,7 +1380,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
x86_64-*kfreebsd*-gnu)
|
||||
LD="${LD-ld} -m elf_i386_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
x86_64-*linux*|x86_64-gnu*)
|
||||
case `/usr/bin/file conftest.o` in
|
||||
*x86-64*)
|
||||
LD="${LD-ld} -m elf32_x86_64"
|
||||
@@ -1409,7 +1409,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
x86_64-*kfreebsd*-gnu)
|
||||
LD="${LD-ld} -m elf_x86_64_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
x86_64-*linux*|x86_64-gnu*)
|
||||
LD="${LD-ld} -m elf_x86_64"
|
||||
;;
|
||||
powerpcle-*linux*|powerpc64le-*linux*)
|
||||
@@ -1540,15 +1540,8 @@ old_postinstall_cmds='chmod 644 $oldlib'
|
||||
old_postuninstall_cmds=
|
||||
|
||||
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_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
|
||||
fi
|
||||
|
||||
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;
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | cegcc*)
|
||||
cygwin* | mingw* | windows* | cegcc*)
|
||||
# On Win9x/ME, this test blows up -- it succeeds, but takes
|
||||
# about 5 minutes as the teststring grows exponentially.
|
||||
# Worse, since 9x/ME are not pre-emptively multitasking,
|
||||
@@ -1930,7 +1923,7 @@ else
|
||||
lt_cv_dlopen_self=yes
|
||||
;;
|
||||
|
||||
mingw* | pw32* | cegcc*)
|
||||
mingw* | windows* | pw32* | cegcc*)
|
||||
lt_cv_dlopen=LoadLibrary
|
||||
lt_cv_dlopen_libs=
|
||||
;;
|
||||
@@ -2298,7 +2291,7 @@ if test yes = "$GCC"; then
|
||||
*) lt_awk_arg='/^libraries:/' ;;
|
||||
esac
|
||||
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' ;;
|
||||
esac
|
||||
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
|
||||
# for these hosts.
|
||||
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'` ;;
|
||||
esac
|
||||
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
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
version_type=windows
|
||||
shrext_cmds=.dll
|
||||
need_version=no
|
||||
@@ -2558,7 +2551,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
m4_if([$1], [],[
|
||||
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
|
||||
;;
|
||||
mingw* | cegcc*)
|
||||
mingw* | windows* | cegcc*)
|
||||
# MinGW DLLs use traditional 'lib' prefix
|
||||
#soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
soname_spec='`echo $libname | $SED -e 's/^lib//'`$shared_ext' # SDL customization
|
||||
@@ -2571,14 +2564,14 @@ m4_if([$1], [],[
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
|
||||
*,cl*)
|
||||
# Native MSVC
|
||||
*,cl* | *,icl*)
|
||||
# Native MSVC or ICC
|
||||
libname_spec='$name'
|
||||
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
library_names_spec='$libname.dll.lib'
|
||||
|
||||
case $build_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
sys_lib_search_path_spec=
|
||||
lt_save_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'
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
@@ -3267,7 +3260,7 @@ if test yes = "$GCC"; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by $CC])
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
*-*-mingw* | *-*-windows*)
|
||||
# gcc leaves a trailing carriage return, which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
@@ -3376,7 +3369,7 @@ case $reload_flag in
|
||||
esac
|
||||
reload_cmds='$LD$reload_flag -o $output$reload_objs'
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
if test yes != "$GCC"; then
|
||||
reload_cmds=false
|
||||
fi
|
||||
@@ -3476,7 +3469,7 @@ cygwin*)
|
||||
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
|
||||
# func_win32_libid shell function, so use a weaker test based on 'objdump',
|
||||
# unless we find 'file', for example because we are cross-compiling.
|
||||
@@ -3641,7 +3634,7 @@ file_magic_glob=
|
||||
want_nocaseglob=no
|
||||
if test "$build" = "$host"; then
|
||||
case $host_os in
|
||||
mingw* | pw32*)
|
||||
mingw* | windows* | pw32*)
|
||||
if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
|
||||
want_nocaseglob=yes
|
||||
else
|
||||
@@ -3693,7 +3686,7 @@ else
|
||||
# Tru64's nm complains that /dev/null is an invalid object file
|
||||
# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
|
||||
case $build_os in
|
||||
mingw*) lt_bad_file=conftest.nm/nofile ;;
|
||||
mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
|
||||
*) lt_bad_file=/dev/null ;;
|
||||
esac
|
||||
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'
|
||||
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# two different shell functions defined in ltmain.sh;
|
||||
# decide which one to use based on capabilities of $DLLTOOL
|
||||
case `$DLLTOOL --help 2>&1` in
|
||||
@@ -3929,7 +3922,7 @@ case $host_os in
|
||||
aix*)
|
||||
symcode='[[BCDT]]'
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
symcode='[[ABCDGISTW]]'
|
||||
;;
|
||||
hpux*)
|
||||
@@ -4008,7 +4001,7 @@ $lt_c_name_lib_hook\
|
||||
# Handle CRLF in mingw tool chain
|
||||
opt_cr=
|
||||
case $build_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
|
||||
;;
|
||||
esac
|
||||
@@ -4023,7 +4016,7 @@ for ac_symprfx in "" "_"; do
|
||||
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
|
||||
# Fake it for dumpbin and say T for any non-static function,
|
||||
# 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 ?.
|
||||
lt_cv_sys_global_symbol_pipe="$AWK ['"\
|
||||
" {last_section=section; section=\$ 3};"\
|
||||
@@ -4235,7 +4228,7 @@ m4_if([$1], [CXX], [
|
||||
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
|
||||
# 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
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
# Although the cygwin gcc ignores -fPIC, still need this for old-style
|
||||
@@ -4311,7 +4304,7 @@ m4_if([$1], [CXX], [
|
||||
;;
|
||||
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
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
m4_if([$1], [GCJ], [],
|
||||
@@ -4559,7 +4552,7 @@ m4_if([$1], [CXX], [
|
||||
# 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
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
# Although the cygwin gcc ignores -fPIC, still need this for old-style
|
||||
@@ -4663,7 +4656,7 @@ m4_if([$1], [CXX], [
|
||||
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
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
m4_if([$1], [GCJ], [],
|
||||
@@ -4938,9 +4931,9 @@ m4_if([$1], [CXX], [
|
||||
pw32*)
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
|
||||
;;
|
||||
cygwin* | mingw* | cegcc*)
|
||||
cygwin* | mingw* | windows* | cegcc*)
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
cl* | icl*)
|
||||
_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=
|
||||
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# 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
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
if test yes != "$GCC"; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
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
|
||||
;;
|
||||
openbsd* | bitrig*)
|
||||
@@ -5111,7 +5104,7 @@ _LT_EOF
|
||||
fi
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
|
||||
# as there is no search path for DLLs.
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
|
||||
@@ -5568,14 +5561,14 @@ _LT_EOF
|
||||
_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
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
# Native MSVC
|
||||
cl* | icl*)
|
||||
# Native MSVC or ICC
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||
_LT_TAGVAR(always_export_symbols, $1)=yes
|
||||
@@ -5585,14 +5578,14 @@ _LT_EOF
|
||||
# Tell ltmain to make .dll files, not .so files.
|
||||
shrext_cmds=.dll
|
||||
# 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
|
||||
cp "$export_symbols" "$output_objdir/$soname.def";
|
||||
echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
|
||||
else
|
||||
$SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
|
||||
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='
|
||||
# The linker will not automatically build a static lib if we build a DLL.
|
||||
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
|
||||
@@ -5616,7 +5609,7 @@ _LT_EOF
|
||||
fi'
|
||||
;;
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||
# 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
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# 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
|
||||
GXX=no
|
||||
@@ -6644,10 +6637,10 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
esac
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
case $GXX,$cc_basename in
|
||||
,cl* | no,cl*)
|
||||
# Native MSVC
|
||||
,cl* | no,cl* | ,icl* | no,icl*)
|
||||
# Native MSVC or ICC
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
_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
|
||||
# from the output so that they don't get included in the library
|
||||
# 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
|
||||
@@ -6876,7 +6869,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# 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
|
||||
@@ -7215,7 +7208,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# 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
|
||||
# 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
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# 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
|
||||
# g++ 2.7 appears to require '-G' NOT '-shared' on this
|
||||
# platform.
|
||||
@@ -7310,7 +7303,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# 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
|
||||
|
||||
_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
|
||||
*-*-mingw* )
|
||||
case $build in
|
||||
*-*-mingw* ) # actually msys
|
||||
*-*-mingw* | *-*-windows* ) # actually msys
|
||||
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
|
||||
;;
|
||||
*-*-cygwin* )
|
||||
@@ -8344,7 +8337,7 @@ AC_CACHE_VAL(lt_cv_to_host_file_cmd,
|
||||
;;
|
||||
*-*-cygwin* )
|
||||
case $build in
|
||||
*-*-mingw* ) # actually msys
|
||||
*-*-mingw* | *-*-windows* ) # actually msys
|
||||
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
|
||||
;;
|
||||
*-*-cygwin* )
|
||||
@@ -8370,9 +8363,9 @@ AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
|
||||
[#assume ordinary cross tools, or native build.
|
||||
lt_cv_to_tool_file_cmd=func_convert_file_noop
|
||||
case $host in
|
||||
*-*-mingw* )
|
||||
*-*-mingw* | *-*-windows* )
|
||||
case $build in
|
||||
*-*-mingw* ) # actually msys
|
||||
*-*-mingw* | *-*-windows* ) # actually msys
|
||||
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
|
||||
;;
|
||||
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
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
|
||||
@@ -8,22 +8,22 @@ else {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
if (buildAsApplication) {
|
||||
namespace "org.libsdl.app"
|
||||
}
|
||||
compileSdkVersion 34
|
||||
defaultConfig {
|
||||
if (buildAsApplication) {
|
||||
applicationId "org.libsdl.app"
|
||||
}
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 31
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 34
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
arguments "APP_PLATFORM=android-16"
|
||||
arguments "APP_PLATFORM=android-19"
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
}
|
||||
// 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 'arm64-v8a'
|
||||
// }
|
||||
@@ -53,10 +53,10 @@ android {
|
||||
}
|
||||
|
||||
}
|
||||
lintOptions {
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
|
||||
if (buildAsLibrary) {
|
||||
libraryVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
com.gamemaker.game
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.libsdl.app"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0"
|
||||
android:installLocation="auto">
|
||||
|
||||
@@ -273,6 +273,7 @@ public class HIDDeviceManager {
|
||||
final int XB1_IFACE_SUBCLASS = 71;
|
||||
final int XB1_IFACE_PROTOCOL = 208;
|
||||
final int[] SUPPORTED_VENDORS = {
|
||||
0x03f0, // HP
|
||||
0x044f, // Thrustmaster
|
||||
0x045e, // Microsoft
|
||||
0x0738, // Mad Catz
|
||||
@@ -284,6 +285,7 @@ public class HIDDeviceManager {
|
||||
0x24c6, // PowerA
|
||||
0x2dc8, // 8BitDo
|
||||
0x2e24, // Hyperkin
|
||||
0x3537, // GameSir
|
||||
};
|
||||
|
||||
if (usbInterface.getId() == 0 &&
|
||||
@@ -357,6 +359,12 @@ public class HIDDeviceManager {
|
||||
private void initializeBluetooth() {
|
||||
Log.d(TAG, "Initializing Bluetooth");
|
||||
|
||||
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) {
|
||||
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH");
|
||||
|
||||
@@ -60,8 +60,8 @@ import java.util.Locale;
|
||||
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
|
||||
private static final String TAG = "SDL";
|
||||
private static final int SDL_MAJOR_VERSION = 2;
|
||||
private static final int SDL_MINOR_VERSION = 28;
|
||||
private static final int SDL_MICRO_VERSION = 0;
|
||||
private static final int SDL_MINOR_VERSION = 30;
|
||||
private static final int SDL_MICRO_VERSION = 2;
|
||||
/*
|
||||
// Display InputType.SOURCE/CLASS of events and devices
|
||||
//
|
||||
@@ -1345,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) {
|
||||
// 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
|
||||
@@ -1376,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -546,13 +546,15 @@ class SDLHapticHandler {
|
||||
if (haptic == null) {
|
||||
InputDevice device = InputDevice.getDevice(deviceIds[i]);
|
||||
Vibrator vib = device.getVibrator();
|
||||
if (vib.hasVibrator()) {
|
||||
haptic = new SDLHaptic();
|
||||
haptic.device_id = deviceIds[i];
|
||||
haptic.name = device.getName();
|
||||
haptic.vib = vib;
|
||||
mHaptics.add(haptic);
|
||||
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
|
||||
if (vib != null) {
|
||||
if (vib.hasVibrator()) {
|
||||
haptic = new SDLHaptic();
|
||||
haptic.device_id = deviceIds[i];
|
||||
haptic.name = device.getName();
|
||||
haptic.vib = vib;
|
||||
mHaptics.add(haptic);
|
||||
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ buildscript {
|
||||
google()
|
||||
}
|
||||
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
|
||||
// in the individual module build.gradle files
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#Thu Nov 11 18:20:34 PST 2021
|
||||
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
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
70
build-scripts/config.guess
vendored
70
build-scripts/config.guess
vendored
@@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# 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
|
||||
|
||||
timestamp='2022-05-25'
|
||||
timestamp='2024-01-01'
|
||||
|
||||
# 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
|
||||
@@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
usage="\
|
||||
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:
|
||||
-h, --help print this help, then exit
|
||||
@@ -60,13 +60,13 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
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
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
||||
help="
|
||||
Try \`$me --help' for more information."
|
||||
Try '$me --help' for more information."
|
||||
|
||||
# Parse command line
|
||||
while test $# -gt 0 ; do
|
||||
@@ -102,8 +102,8 @@ GUESS=
|
||||
# temporary files to be created and, as you can see below, it is a
|
||||
# headache to deal with in a portable fashion.
|
||||
|
||||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
||||
# use `HOST_CC' if defined, but it is deprecated.
|
||||
# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
|
||||
# use 'HOST_CC' if defined, but it is deprecated.
|
||||
|
||||
# Portable tmp directory creation inspired by the Autoconf team.
|
||||
|
||||
@@ -155,6 +155,9 @@ Linux|GNU|GNU/*)
|
||||
|
||||
set_cc_for_build
|
||||
cat <<-EOF > "$dummy.c"
|
||||
#if defined(__ANDROID__)
|
||||
LIBC=android
|
||||
#else
|
||||
#include <features.h>
|
||||
#if defined(__UCLIBC__)
|
||||
LIBC=uclibc
|
||||
@@ -162,6 +165,8 @@ Linux|GNU|GNU/*)
|
||||
LIBC=dietlibc
|
||||
#elif defined(__GLIBC__)
|
||||
LIBC=gnu
|
||||
#elif defined(__LLVM_LIBC__)
|
||||
LIBC=llvm
|
||||
#else
|
||||
#include <stdarg.h>
|
||||
/* First heuristic to detect musl libc. */
|
||||
@@ -169,6 +174,7 @@ Linux|GNU|GNU/*)
|
||||
LIBC=musl
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
||||
eval "$cc_set_libc"
|
||||
@@ -459,7 +465,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
|
||||
UNAME_RELEASE=`uname -v`
|
||||
;;
|
||||
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/-/_/'`
|
||||
GUESS=sparc-sun-sunos$SUN_REL
|
||||
;;
|
||||
@@ -904,7 +910,7 @@ EOF
|
||||
fi
|
||||
;;
|
||||
*:FreeBSD:*:*)
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
case $UNAME_PROCESSOR in
|
||||
amd64)
|
||||
UNAME_PROCESSOR=x86_64 ;;
|
||||
@@ -966,11 +972,37 @@ EOF
|
||||
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
||||
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:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-minix
|
||||
;;
|
||||
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:*:*)
|
||||
UNAME_MACHINE=aarch64_be
|
||||
@@ -1036,7 +1068,16 @@ EOF
|
||||
k1om:Linux:*:*)
|
||||
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
|
||||
;;
|
||||
m32r*:Linux:*:*)
|
||||
@@ -1191,7 +1232,7 @@ EOF
|
||||
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
|
||||
;;
|
||||
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.
|
||||
GUESS=$UNAME_MACHINE-pc-os2-emx
|
||||
;;
|
||||
@@ -1332,7 +1373,7 @@ EOF
|
||||
GUESS=ns32k-sni-sysv
|
||||
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>
|
||||
GUESS=i586-unisys-sysv4
|
||||
;;
|
||||
@@ -1554,6 +1595,9 @@ EOF
|
||||
*:Unleashed:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
|
||||
;;
|
||||
*:Ironclad:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-ironclad
|
||||
;;
|
||||
esac
|
||||
|
||||
# Do we have a guess based on uname results?
|
||||
|
||||
237
build-scripts/config.sub
vendored
237
build-scripts/config.sub
vendored
@@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# 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
|
||||
|
||||
timestamp='2022-01-03'
|
||||
timestamp='2024-01-01'
|
||||
|
||||
# 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
|
||||
@@ -76,13 +76,13 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||
version="\
|
||||
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
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
||||
help="
|
||||
Try \`$me --help' for more information."
|
||||
Try '$me --help' for more information."
|
||||
|
||||
# Parse command line
|
||||
while test $# -gt 0 ; do
|
||||
@@ -130,7 +130,7 @@ IFS=$saved_IFS
|
||||
# Separate into logical components for further validation
|
||||
case $1 in
|
||||
*-*-*-*-*)
|
||||
echo Invalid configuration \`"$1"\': more than four components >&2
|
||||
echo "Invalid configuration '$1': more than four components" >&2
|
||||
exit 1
|
||||
;;
|
||||
*-*-*-*)
|
||||
@@ -145,7 +145,8 @@ case $1 in
|
||||
nto-qnx* | linux-* | uclinux-uclibc* \
|
||||
| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
|
||||
| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
|
||||
| storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
| storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \
|
||||
| windows-* )
|
||||
basic_machine=$field1
|
||||
basic_os=$maybe_os
|
||||
;;
|
||||
@@ -943,7 +944,7 @@ $basic_machine
|
||||
EOF
|
||||
IFS=$saved_IFS
|
||||
;;
|
||||
# We use `pc' rather than `unknown'
|
||||
# We use 'pc' rather than 'unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
i*86 | x86_64)
|
||||
@@ -1180,7 +1181,7 @@ case $cpu-$vendor in
|
||||
case $cpu in
|
||||
1750a | 580 \
|
||||
| a29k \
|
||||
| aarch64 | aarch64_be \
|
||||
| aarch64 | aarch64_be | aarch64c | arm64ec \
|
||||
| abacus \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
|
||||
@@ -1199,50 +1200,29 @@ case $cpu-$vendor in
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| e2k | elxsi | epiphany \
|
||||
| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
|
||||
| javascript \
|
||||
| h8300 | h8500 \
|
||||
| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| hexagon \
|
||||
| i370 | i*86 | i860 | i960 | ia16 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| k1om \
|
||||
| kvx \
|
||||
| le32 | le64 \
|
||||
| lm32 \
|
||||
| loongarch32 | loongarch64 | loongarchx32 \
|
||||
| loongarch32 | loongarch64 \
|
||||
| m32c | m32r | m32rle \
|
||||
| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
|
||||
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
|
||||
| m88110 | m88k | maxq | mb | mcore | mep | metag \
|
||||
| microblaze | microblazeel \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| 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 \
|
||||
| mips* \
|
||||
| mmix \
|
||||
| mn10200 | mn10300 \
|
||||
| moxie \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nanomips* \
|
||||
| nds32 | nds32le | nds32be \
|
||||
| nfp \
|
||||
| nios | nios2 | nios2eb | nios2el \
|
||||
@@ -1274,6 +1254,7 @@ case $cpu-$vendor in
|
||||
| ubicom32 \
|
||||
| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
|
||||
| vax \
|
||||
| vc4 \
|
||||
| visium \
|
||||
| w65 \
|
||||
| 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
|
||||
;;
|
||||
esac
|
||||
@@ -1306,11 +1287,12 @@ esac
|
||||
|
||||
# Decode manufacturer-specific aliases for certain operating systems.
|
||||
|
||||
if test x$basic_os != x
|
||||
if test x"$basic_os" != x
|
||||
then
|
||||
|
||||
# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
|
||||
# set os.
|
||||
obj=
|
||||
case $basic_os in
|
||||
gnu/linux*)
|
||||
kernel=linux
|
||||
@@ -1341,6 +1323,10 @@ EOF
|
||||
kernel=linux
|
||||
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
|
||||
;;
|
||||
managarm*)
|
||||
kernel=managarm
|
||||
os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
|
||||
;;
|
||||
*)
|
||||
kernel=
|
||||
os=$basic_os
|
||||
@@ -1506,10 +1492,16 @@ case $os in
|
||||
os=eabi
|
||||
;;
|
||||
*)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
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.
|
||||
;;
|
||||
@@ -1528,12 +1520,15 @@ else
|
||||
# system, and we'll never get to this point.
|
||||
|
||||
kernel=
|
||||
obj=
|
||||
case $cpu-$vendor in
|
||||
score-*)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
spu-*)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
*-acorn)
|
||||
os=riscix1.2
|
||||
@@ -1543,28 +1538,35 @@ case $cpu-$vendor in
|
||||
os=gnu
|
||||
;;
|
||||
arm*-semi)
|
||||
os=aout
|
||||
os=
|
||||
obj=aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=coff
|
||||
os=
|
||||
obj=coff
|
||||
;;
|
||||
c8051-*)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
clipper-intergraph)
|
||||
os=clix
|
||||
;;
|
||||
hexagon-*)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
tic54x-*)
|
||||
os=coff
|
||||
os=
|
||||
obj=coff
|
||||
;;
|
||||
tic55x-*)
|
||||
os=coff
|
||||
os=
|
||||
obj=coff
|
||||
;;
|
||||
tic6x-*)
|
||||
os=coff
|
||||
os=
|
||||
obj=coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
@@ -1586,19 +1588,24 @@ case $cpu-$vendor in
|
||||
os=sunos3
|
||||
;;
|
||||
m68*-cisco)
|
||||
os=aout
|
||||
os=
|
||||
obj=aout
|
||||
;;
|
||||
mep-*)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
mips*-cisco)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
mips*-*)
|
||||
os=elf
|
||||
mips*-*|nanomips*-*)
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
or32-*)
|
||||
os=coff
|
||||
os=
|
||||
obj=coff
|
||||
;;
|
||||
*-tti) # must be before sparc entry or we get the wrong os.
|
||||
os=sysv3
|
||||
@@ -1607,7 +1614,8 @@ case $cpu-$vendor in
|
||||
os=sunos4.1.1
|
||||
;;
|
||||
pru-*)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
*-be)
|
||||
os=beos
|
||||
@@ -1688,10 +1696,12 @@ case $cpu-$vendor in
|
||||
os=uxpv
|
||||
;;
|
||||
*-rom68k)
|
||||
os=coff
|
||||
os=
|
||||
obj=coff
|
||||
;;
|
||||
*-*bug)
|
||||
os=coff
|
||||
os=
|
||||
obj=coff
|
||||
;;
|
||||
*-apple)
|
||||
os=macos
|
||||
@@ -1709,10 +1719,11 @@ esac
|
||||
|
||||
fi
|
||||
|
||||
# Now, validate our (potentially fixed-up) OS.
|
||||
# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
|
||||
|
||||
case $os in
|
||||
# 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"
|
||||
eabi* | gnueabi*)
|
||||
@@ -1720,6 +1731,9 @@ case $os in
|
||||
# VxWorks passes extra cpu info in the 4th filed.
|
||||
simlinux | simwindows | spe)
|
||||
;;
|
||||
# See `case $cpu-$os` validation below
|
||||
ghcjs)
|
||||
;;
|
||||
# Now accept the basic system types.
|
||||
# The portable systems comes first.
|
||||
# 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* \
|
||||
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
|
||||
| hiux* | abug | nacl* | netware* | windows* \
|
||||
| os9* | macos* | osx* | ios* \
|
||||
| os9* | macos* | osx* | ios* | tvos* | watchos* \
|
||||
| mpw* | magic* | mmixware* | mon960* | lnews* \
|
||||
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
|
||||
| aos* | aros* | cloudabi* | sortix* | twizzler* \
|
||||
@@ -1737,11 +1751,11 @@ case $os in
|
||||
| mirbsd* | netbsd* | dicos* | openedition* | ose* \
|
||||
| bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
|
||||
| ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
|
||||
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
|
||||
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
|
||||
| bosx* | nextstep* | cxux* | oabi* \
|
||||
| ptx* | ecoff* | winnt* | domain* | vsta* \
|
||||
| udi* | lites* | ieee* | go32* | aux* | hcos* \
|
||||
| chorusrdb* | cegcc* | glidix* | serenity* \
|
||||
| cygwin* | msys* | pe* | moss* | proelf* | rtems* \
|
||||
| cygwin* | msys* | moss* | proelf* | rtems* \
|
||||
| midipix* | mingw32* | mingw64* | mint* \
|
||||
| uxpv* | beos* | mpeix* | udk* | moxiebox* \
|
||||
| interix* | uwin* | mks* | rhapsody* | darwin* \
|
||||
@@ -1754,49 +1768,116 @@ case $os in
|
||||
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
||||
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
||||
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
|
||||
| fiwix* )
|
||||
| fiwix* | mlibc* | cos* | mbr* | ironclad* )
|
||||
;;
|
||||
# This one is extra strict with allowed versions
|
||||
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
|
||||
# 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)
|
||||
;;
|
||||
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
|
||||
;;
|
||||
esac
|
||||
|
||||
# As a final step for OS-related things, validate the OS-kernel combination
|
||||
# (given a valid OS), if there is a kernel.
|
||||
case $kernel-$os in
|
||||
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
|
||||
| linux-musl* | linux-relibc* | linux-uclibc* )
|
||||
case $kernel-$os-$obj in
|
||||
linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \
|
||||
| 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
|
||||
# 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
|
||||
;;
|
||||
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.
|
||||
;;
|
||||
*-*)
|
||||
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
|
||||
;;
|
||||
esac
|
||||
@@ -1879,7 +1960,7 @@ case $vendor in
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "$cpu-$vendor-${kernel:+$kernel-}$os"
|
||||
echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
|
||||
exit
|
||||
|
||||
# Local variables:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -395,7 +395,7 @@ int main(void)
|
||||
printf(
|
||||
"/*\n"
|
||||
" Simple DirectMedia Layer\n"
|
||||
" Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
" Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
"\n"
|
||||
" This software is provided 'as-is', without any express or implied\n"
|
||||
" warranty. In no event will the authors be held liable for any damages\n"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -113,7 +113,7 @@ int main(void)
|
||||
printf(
|
||||
"/*\n"
|
||||
" Simple DirectMedia Layer\n"
|
||||
" Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
" Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
"\n"
|
||||
" This software is provided 'as-is', without any express or implied\n"
|
||||
" warranty. In no event will the authors be held liable for any damages\n"
|
||||
|
||||
@@ -2418,7 +2418,7 @@ libtool_validate_options ()
|
||||
case $host in
|
||||
# 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
|
||||
*cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
|
||||
*cygwin* | *mingw* | *windows* | *pw32* | *cegcc* | *solaris2* | *os2*)
|
||||
# don't eliminate duplications in $postdeps and $predeps
|
||||
opt_duplicate_compiler_generated_deps=:
|
||||
;;
|
||||
@@ -2750,7 +2750,7 @@ EOF
|
||||
|
||||
# func_convert_core_file_wine_to_w32 ARG
|
||||
# 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
|
||||
# in $build's $PATH.
|
||||
#
|
||||
@@ -2782,9 +2782,10 @@ func_convert_core_file_wine_to_w32 ()
|
||||
|
||||
# func_convert_core_path_wine_to_w32 ARG
|
||||
# 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
|
||||
# configured wine environment available, with the winepath program in $build's
|
||||
# $PATH. Assumes ARG has no leading or trailing path separator characters.
|
||||
# $host is mingw, windows, cygwin, or some other w32 environment. Relies on a
|
||||
# correctly configured wine environment available, with the winepath program
|
||||
# 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.
|
||||
# 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
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | os2* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | os2* | cegcc*)
|
||||
pic_mode=default
|
||||
;;
|
||||
esac
|
||||
@@ -4316,7 +4317,7 @@ func_mode_install ()
|
||||
'exit $?'
|
||||
tstripme=$stripme
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
case $realname in
|
||||
*.dll.a)
|
||||
tstripme=
|
||||
@@ -4429,7 +4430,7 @@ func_mode_install ()
|
||||
|
||||
# Do a test to see if this is really a libtool program.
|
||||
case $host in
|
||||
*cygwin* | *mingw*)
|
||||
*cygwin* | *mingw* | *windows*)
|
||||
if func_ltwrapper_executable_p "$file"; then
|
||||
func_ltwrapper_scriptname "$file"
|
||||
wrapper=$func_ltwrapper_scriptname_result
|
||||
@@ -4657,7 +4658,7 @@ extern \"C\" {
|
||||
$RM $export_symbols
|
||||
eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||
eval "echo EXPORTS "'> "$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 '$MV "$nlist"T "$nlist"'
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
|
||||
eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
|
||||
;;
|
||||
@@ -4683,7 +4684,7 @@ extern \"C\" {
|
||||
func_basename "$dlprefile"
|
||||
name=$func_basename_result
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||
# if an import library, we need to obtain dlname
|
||||
if func_win32_import_lib_p "$dlprefile"; then
|
||||
func_tr_sh "$dlprefile"
|
||||
@@ -4858,7 +4859,7 @@ static const void *lt_preloaded_setup() {
|
||||
# Transform the symbol file into the correct name.
|
||||
symfileobj=$output_objdir/${my_outputname}S.$objext
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||
if test -f "$output_objdir/$my_outputname.def"; then
|
||||
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%"`
|
||||
@@ -5201,7 +5202,7 @@ func_extract_archives ()
|
||||
#
|
||||
# Emit a libtool wrapper script on stdout.
|
||||
# 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
|
||||
# func_mode_link because it depends on a number of variables
|
||||
# set therein.
|
||||
@@ -5209,7 +5210,7 @@ func_extract_archives ()
|
||||
# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
|
||||
# variable will take. If 'yes', then the emitted script
|
||||
# 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.
|
||||
func_emit_wrapper ()
|
||||
{
|
||||
@@ -5333,7 +5334,7 @@ func_exec_program_core ()
|
||||
"
|
||||
case $host in
|
||||
# Backslashes separate directories on plain windows
|
||||
*-*-mingw | *-*-os2* | *-cegcc*)
|
||||
*-*-mingw* | *-*-windows* | *-*-os2* | *-cegcc*)
|
||||
$ECHO "\
|
||||
if test -n \"\$lt_option_debug\"; then
|
||||
\$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'\`
|
||||
done
|
||||
|
||||
# Usually 'no', except on cygwin/mingw when embedded into
|
||||
# Usually 'no', except on cygwin/mingw/windows when embedded into
|
||||
# the cwrapper.
|
||||
WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
|
||||
if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
|
||||
@@ -5558,7 +5559,7 @@ EOF
|
||||
/* declarations of non-ANSI functions */
|
||||
#if defined __MINGW32__
|
||||
# ifdef __STRICT_ANSI__
|
||||
int _putenv (const char *);
|
||||
_CRTIMP int __cdecl _putenv (const char *);
|
||||
# endif
|
||||
#elif defined __CYGWIN__
|
||||
# ifdef __STRICT_ANSI__
|
||||
@@ -5756,7 +5757,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
EOF
|
||||
case $host in
|
||||
*mingw* | *cygwin* )
|
||||
*mingw* | *windows* | *cygwin* )
|
||||
# make stdout use "unix" line endings
|
||||
echo " setmode(1,_O_BINARY);"
|
||||
;;
|
||||
@@ -5859,7 +5860,7 @@ EOF
|
||||
EOF
|
||||
|
||||
case $host_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
cat <<"EOF"
|
||||
{
|
||||
char* p;
|
||||
@@ -5901,7 +5902,7 @@ EOF
|
||||
EOF
|
||||
|
||||
case $host_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
cat <<"EOF"
|
||||
/* execv doesn't actually work on mingw as expected on unix */
|
||||
newargz = prepare_spawn (newargz);
|
||||
@@ -6320,7 +6321,7 @@ lt_update_lib_path (const char *name, const char *value)
|
||||
|
||||
EOF
|
||||
case $host_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
cat <<"EOF"
|
||||
|
||||
/* Prepares an argument vector before calling spawn().
|
||||
@@ -6495,7 +6496,7 @@ func_mode_link ()
|
||||
$debug_cmd
|
||||
|
||||
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
|
||||
# we shouldn't force the makefile maintainer to figure out
|
||||
# what system we are compiling for in order to pass an extra
|
||||
@@ -7003,7 +7004,7 @@ func_mode_link ()
|
||||
;;
|
||||
esac
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
|
||||
case :$dllsearchpath: in
|
||||
*":$dir:"*) ;;
|
||||
@@ -7023,7 +7024,7 @@ func_mode_link ()
|
||||
-l*)
|
||||
if test X-lc = "X$arg" || test X-lm = "X$arg"; then
|
||||
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)
|
||||
continue
|
||||
;;
|
||||
@@ -7118,7 +7119,7 @@ func_mode_link ()
|
||||
|
||||
-no-install)
|
||||
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
|
||||
# and Darwin in order for the loader to find any dlls it needs.
|
||||
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
|
||||
# -specs=* GCC specs files
|
||||
# -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
|
||||
# -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
|
||||
# -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
|
||||
# -Werror, -Werror=* Report (specified) warnings as errors
|
||||
-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=*| \
|
||||
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
|
||||
-specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*)
|
||||
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*| \
|
||||
-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"
|
||||
arg=$func_quote_for_eval_result
|
||||
func_append compile_command " $arg"
|
||||
@@ -8022,7 +8036,7 @@ func_mode_link ()
|
||||
fi
|
||||
case $host in
|
||||
# special handling for platforms with PE-DLLs.
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||
# Linker will automatically link against shared library if both
|
||||
# static and shared are present. Therefore, ensure we extract
|
||||
# symbols from the import library if a shared library is present
|
||||
@@ -8166,7 +8180,7 @@ func_mode_link ()
|
||||
if test -n "$library_names" &&
|
||||
{ test no = "$use_static_libs" || test -z "$old_library"; }; then
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* | *os2*)
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* | *os2*)
|
||||
# No point in relinking DLLs because paths are not encoded
|
||||
func_append notinst_deplibs " $lib"
|
||||
need_relink=no
|
||||
@@ -8236,7 +8250,7 @@ func_mode_link ()
|
||||
elif test -n "$soname_spec"; then
|
||||
# bleh windows
|
||||
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
|
||||
major=$func_arith_result
|
||||
versuffix=-$major
|
||||
@@ -8845,7 +8859,7 @@ func_mode_link ()
|
||||
age=$number_minor
|
||||
revision=$number_revision
|
||||
;;
|
||||
freebsd-aout|qnx|sunos)
|
||||
freebsd-aout|qnx|sco|sunos)
|
||||
current=$number_major
|
||||
revision=$number_minor
|
||||
age=0
|
||||
@@ -9146,7 +9160,7 @@ func_mode_link ()
|
||||
if test yes = "$build_libtool_libs"; then
|
||||
if test -n "$rpath"; then
|
||||
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)!
|
||||
;;
|
||||
*-*-rhapsody* | *-*-darwin1.[012])
|
||||
@@ -9660,7 +9674,7 @@ EOF
|
||||
|
||||
orig_export_symbols=
|
||||
case $host_os in
|
||||
cygwin* | mingw* | cegcc*)
|
||||
cygwin* | mingw* | windows* | cegcc*)
|
||||
if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
|
||||
# exporting using user supplied symfile
|
||||
func_dll_def_p "$export_symbols" || {
|
||||
@@ -10330,7 +10344,7 @@ EOF
|
||||
esac
|
||||
fi
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
|
||||
case :$dllsearchpath: in
|
||||
*":$libdir:"*) ;;
|
||||
@@ -10408,7 +10422,7 @@ EOF
|
||||
# Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
|
||||
wrappers_required=false
|
||||
;;
|
||||
*cygwin* | *mingw* )
|
||||
*cygwin* | *mingw* | *windows* )
|
||||
test yes = "$build_libtool_libs" || wrappers_required=false
|
||||
;;
|
||||
*)
|
||||
@@ -10561,7 +10575,7 @@ EOF
|
||||
*) exeext= ;;
|
||||
esac
|
||||
case $host in
|
||||
*cygwin* | *mingw* )
|
||||
*cygwin* | *mingw* | windows* )
|
||||
func_dirname_and_basename "$output" "" "."
|
||||
output_name=$func_basename_result
|
||||
output_path=$func_dirname_result
|
||||
@@ -10893,7 +10907,7 @@ EOF
|
||||
# tests/bindir.at for full details.
|
||||
tdlname=$dlname
|
||||
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 test -n "$bindir"; then
|
||||
func_relative_path "$install_libdir" "$bindir"
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
#!/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 \
|
||||
| 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
|
||||
|
||||
@@ -124,3 +124,25 @@ if(CMAKE_VERSION VERSION_LESS 3.13.0)
|
||||
link_directories(${ARGN})
|
||||
endmacro()
|
||||
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()
|
||||
|
||||
@@ -18,6 +18,7 @@ macro(FindLibraryAndSONAME _LIB)
|
||||
# reduce the library name for shared linking
|
||||
|
||||
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)
|
||||
|
||||
if(APPLE)
|
||||
@@ -26,6 +27,11 @@ macro(FindLibraryAndSONAME _LIB)
|
||||
string(REGEX REPLACE "(\\.[0-9]*)\\.[0-9\\.]*$" "\\1" _LIB_REGEXD "${_LIB_JUSTNAME}")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${_LIB_DIRECTORY}/${_LIB_REGEXD}")
|
||||
set(_LIB_REGEXD "${_LIB_JUSTNAME}")
|
||||
endif()
|
||||
set(${_LNAME}_LIBDIR "${_LIB_LIBDIR}")
|
||||
|
||||
SET(_DEBUG_FindSONAME FALSE)
|
||||
if(_DEBUG_FindSONAME)
|
||||
message_warn("DYNLIB OUTPUTVAR: ${_LIB} ... ${_LNAME}_LIB")
|
||||
@@ -102,7 +108,7 @@ macro(CheckALSA)
|
||||
if(HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("asound")
|
||||
if(ASOUND_LIB AND ASOUND_SHARED)
|
||||
target_include_directories(sdl-build-options INTERFACE $<TARGET_PROPERTY:ALSA::ALSA,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
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()
|
||||
@@ -160,7 +166,7 @@ endmacro()
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckPulseAudio)
|
||||
if(SDL_PULSEAUDIO)
|
||||
pkg_check_modules(PKG_PULSEAUDIO libpulse-simple)
|
||||
pkg_check_modules(PKG_PULSEAUDIO libpulse>=0.9.15)
|
||||
if(PKG_PULSEAUDIO_FOUND)
|
||||
set(HAVE_PULSEAUDIO TRUE)
|
||||
file(GLOB PULSEAUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/pulseaudio/*.c)
|
||||
@@ -170,9 +176,9 @@ macro(CheckPulseAudio)
|
||||
if(SDL_PULSEAUDIO_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic PulseAudio loading")
|
||||
endif()
|
||||
FindLibraryAndSONAME("pulse-simple" LIBDIRS ${PKG_PULSEAUDIO_LIBRARY_DIRS})
|
||||
if(SDL_PULSEAUDIO_SHARED AND PULSE_SIMPLE_LIB AND HAVE_SDL_LOADSO)
|
||||
set(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "\"${PULSE_SIMPLE_LIB_SONAME}\"")
|
||||
FindLibraryAndSONAME("pulse" LIBDIRS ${PKG_PULSEAUDIO_LIBRARY_DIRS})
|
||||
if(SDL_PULSEAUDIO_SHARED AND PULSE_LIB AND HAVE_SDL_LOADSO)
|
||||
set(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "\"${PULSE_LIB_SONAME}\"")
|
||||
set(HAVE_PULSEAUDIO_SHARED TRUE)
|
||||
else()
|
||||
list(APPEND EXTRA_LDFLAGS ${PKG_PULSEAUDIO_LDFLAGS})
|
||||
@@ -374,7 +380,7 @@ macro(CheckLibSampleRate)
|
||||
set(HAVE_LIBSAMPLERATE TRUE)
|
||||
set(HAVE_LIBSAMPLERATE_H TRUE)
|
||||
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)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic libsamplerate loading")
|
||||
else()
|
||||
@@ -465,7 +471,9 @@ macro(CheckX11)
|
||||
list(APPEND SOURCE_FILES ${X11_SOURCES})
|
||||
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)
|
||||
set(SDL_X11_SHARED OFF)
|
||||
endif()
|
||||
@@ -677,7 +685,7 @@ macro(CheckWayland)
|
||||
|
||||
if(WAYLAND_FOUND)
|
||||
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_SDL_VIDEO TRUE)
|
||||
@@ -687,7 +695,7 @@ macro(CheckWayland)
|
||||
|
||||
# We have to generate some protocol interface code for some unstable Wayland features.
|
||||
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")
|
||||
foreach(_XML ${WAYLAND_PROTOCOLS_XML})
|
||||
@@ -723,7 +731,7 @@ macro(CheckWayland)
|
||||
set(HAVE_WAYLAND_LIBDECOR TRUE)
|
||||
set(HAVE_LIBDECOR_H 1)
|
||||
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)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic libdecor loading")
|
||||
endif()
|
||||
@@ -905,6 +913,22 @@ macro(CheckOpenGLES)
|
||||
endif()
|
||||
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:
|
||||
# - nada
|
||||
# Optional:
|
||||
@@ -955,6 +979,8 @@ macro(CheckPTHREAD)
|
||||
elseif(EMSCRIPTEN)
|
||||
set(PTHREAD_CFLAGS "-D_REENTRANT -pthread")
|
||||
set(PTHREAD_LDFLAGS "-pthread")
|
||||
elseif(QNX)
|
||||
# pthread support is baked in
|
||||
else()
|
||||
set(PTHREAD_CFLAGS "-D_REENTRANT")
|
||||
set(PTHREAD_LDFLAGS "-lpthread")
|
||||
@@ -1297,7 +1323,7 @@ macro(CheckKMSDRM)
|
||||
pkg_check_modules(PKG_KMSDRM libdrm gbm egl)
|
||||
if(PKG_KMSDRM_FOUND AND HAVE_OPENGL_EGL)
|
||||
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_SDL_VIDEO TRUE)
|
||||
|
||||
@@ -1336,3 +1362,50 @@ macro(CheckLibUDev)
|
||||
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()
|
||||
|
||||
@@ -28,6 +28,8 @@ macro(SDL_DetectCMakePlatform)
|
||||
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.*")
|
||||
@@ -48,6 +50,8 @@ macro(SDL_DetectCMakePlatform)
|
||||
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)
|
||||
|
||||
@@ -14,7 +14,7 @@ int main(int argc, char *argv[]) {
|
||||
640, 480,
|
||||
SDL_WINDOW_SHOWN
|
||||
);
|
||||
if (window == NULL) {
|
||||
if (!window) {
|
||||
fprintf(stderr, "could not create window: %s\n", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
|
||||
406
configure
vendored
406
configure
vendored
@@ -845,6 +845,7 @@ enable_assertions
|
||||
enable_dependency_tracking
|
||||
enable_libc
|
||||
enable_system_iconv
|
||||
enable_libiconv
|
||||
enable_gcc_atomics
|
||||
enable_atomic
|
||||
enable_audio
|
||||
@@ -1641,7 +1642,9 @@ Optional Features:
|
||||
Use gcc -MMD -MT dependency tracking [default=yes]
|
||||
--enable-libc Use the system C library [default=yes]
|
||||
--enable-system-iconv Use iconv() from system-installed libraries
|
||||
[default=yes]
|
||||
[default=no for windows, yes for others]
|
||||
--enable-libiconv Prefer iconv() from libiconv, if available, over
|
||||
libc version [default=no]
|
||||
--enable-gcc-atomics Use gcc builtin atomics [default=yes]
|
||||
--enable-atomic Enable the atomic operations subsystem [default=yes]
|
||||
--enable-audio Enable the audio subsystem [default=yes]
|
||||
@@ -3506,8 +3509,8 @@ orig_CFLAGS="$CFLAGS"
|
||||
|
||||
# See docs/release_checklist.md
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=28
|
||||
SDL_MICRO_VERSION=0
|
||||
SDL_MINOR_VERSION=30
|
||||
SDL_MICRO_VERSION=2
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
|
||||
@@ -5032,7 +5035,7 @@ if test yes = "$GCC"; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
|
||||
printf %s "checking for ld used by $CC... " >&6; }
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
*-*-mingw* | *-*-windows*)
|
||||
# gcc leaves a trailing carriage return, which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
@@ -5159,7 +5162,7 @@ else
|
||||
# Tru64's nm complains that /dev/null is an invalid object file
|
||||
# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
|
||||
case $build_os in
|
||||
mingw*) lt_bad_file=conftest.nm/nofile ;;
|
||||
mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
|
||||
*) lt_bad_file=/dev/null ;;
|
||||
esac
|
||||
case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
|
||||
@@ -5388,7 +5391,7 @@ else $as_nop
|
||||
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
|
||||
# about 5 minutes as the teststring grows exponentially.
|
||||
# Worse, since 9x/ME are not pre-emptively multitasking,
|
||||
@@ -5552,7 +5555,7 @@ else $as_nop
|
||||
case $host in
|
||||
*-*-mingw* )
|
||||
case $build in
|
||||
*-*-mingw* ) # actually msys
|
||||
*-*-mingw* | *-*-windows* ) # actually msys
|
||||
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
|
||||
;;
|
||||
*-*-cygwin* )
|
||||
@@ -5565,7 +5568,7 @@ else $as_nop
|
||||
;;
|
||||
*-*-cygwin* )
|
||||
case $build in
|
||||
*-*-mingw* ) # actually msys
|
||||
*-*-mingw* | *-*-windows* ) # actually msys
|
||||
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
|
||||
;;
|
||||
*-*-cygwin* )
|
||||
@@ -5600,9 +5603,9 @@ else $as_nop
|
||||
#assume ordinary cross tools, or native build.
|
||||
lt_cv_to_tool_file_cmd=func_convert_file_noop
|
||||
case $host in
|
||||
*-*-mingw* )
|
||||
*-*-mingw* | *-*-windows* )
|
||||
case $build in
|
||||
*-*-mingw* ) # actually msys
|
||||
*-*-mingw* | *-*-windows* ) # actually msys
|
||||
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
|
||||
;;
|
||||
esac
|
||||
@@ -5636,7 +5639,7 @@ case $reload_flag in
|
||||
esac
|
||||
reload_cmds='$LD$reload_flag -o $output$reload_objs'
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
if test yes != "$GCC"; then
|
||||
reload_cmds=false
|
||||
fi
|
||||
@@ -5809,7 +5812,7 @@ cygwin*)
|
||||
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
|
||||
# func_win32_libid shell function, so use a weaker test based on 'objdump',
|
||||
# unless we find 'file', for example because we are cross-compiling.
|
||||
@@ -5977,7 +5980,7 @@ file_magic_glob=
|
||||
want_nocaseglob=no
|
||||
if test "$build" = "$host"; then
|
||||
case $host_os in
|
||||
mingw* | pw32*)
|
||||
mingw* | windows* | pw32*)
|
||||
if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
|
||||
want_nocaseglob=yes
|
||||
else
|
||||
@@ -6131,7 +6134,7 @@ else $as_nop
|
||||
lt_cv_sharedlib_from_linklib_cmd='unknown'
|
||||
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# two different shell functions defined in ltmain.sh;
|
||||
# decide which one to use based on capabilities of $DLLTOOL
|
||||
case `$DLLTOOL --help 2>&1` in
|
||||
@@ -6569,15 +6572,8 @@ old_postinstall_cmds='chmod 644 $oldlib'
|
||||
old_postuninstall_cmds=
|
||||
|
||||
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_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
|
||||
fi
|
||||
|
||||
case $host_os in
|
||||
@@ -6704,7 +6700,7 @@ case $host_os in
|
||||
aix*)
|
||||
symcode='[BCDT]'
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
symcode='[ABCDGISTW]'
|
||||
;;
|
||||
hpux*)
|
||||
@@ -6783,7 +6779,7 @@ $lt_c_name_lib_hook\
|
||||
# Handle CRLF in mingw tool chain
|
||||
opt_cr=
|
||||
case $build_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
|
||||
;;
|
||||
esac
|
||||
@@ -6798,7 +6794,7 @@ for ac_symprfx in "" "_"; do
|
||||
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
|
||||
# Fake it for dumpbin and say T for any non-static function,
|
||||
# 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 ?.
|
||||
lt_cv_sys_global_symbol_pipe="$AWK '"\
|
||||
" {last_section=section; section=\$ 3};"\
|
||||
@@ -7232,7 +7228,7 @@ mips64*-*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
|
||||
# options accordingly. Note that the listed cases only cover the
|
||||
# situations where additional linker options are needed (such as when
|
||||
@@ -7251,7 +7247,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
x86_64-*kfreebsd*-gnu)
|
||||
LD="${LD-ld} -m elf_i386_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
x86_64-*linux*|x86_64-gnu*)
|
||||
case `/usr/bin/file conftest.o` in
|
||||
*x86-64*)
|
||||
LD="${LD-ld} -m elf32_x86_64"
|
||||
@@ -7280,7 +7276,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
x86_64-*kfreebsd*-gnu)
|
||||
LD="${LD-ld} -m elf_x86_64_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
x86_64-*linux*|x86_64-gnu*)
|
||||
LD="${LD-ld} -m elf_x86_64"
|
||||
;;
|
||||
powerpcle-*linux*|powerpc64le-*linux*)
|
||||
@@ -8276,7 +8272,7 @@ fi
|
||||
enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-cegcc*)
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}as; ac_word=$2
|
||||
@@ -8892,8 +8888,8 @@ esac
|
||||
ofile=libtool
|
||||
can_build_shared=yes
|
||||
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC,
|
||||
# which needs '.lib').
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC and
|
||||
# ICC, which need '.lib').
|
||||
libext=a
|
||||
|
||||
with_gnu_ld=$lt_cv_prog_gnu_ld
|
||||
@@ -9217,7 +9213,7 @@ lt_prog_compiler_static=
|
||||
# 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
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
# Although the cygwin gcc ignores -fPIC, still need this for old-style
|
||||
@@ -9320,7 +9316,7 @@ lt_prog_compiler_static=
|
||||
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
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
lt_prog_compiler_pic='-DDLL_EXPORT'
|
||||
@@ -9827,16 +9823,16 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
|
||||
extract_expsyms_cmds=
|
||||
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# 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
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
if test yes != "$GCC"; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
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
|
||||
;;
|
||||
openbsd* | bitrig*)
|
||||
@@ -9942,7 +9938,7 @@ _LT_EOF
|
||||
fi
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
|
||||
# as there is no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
@@ -10487,14 +10483,14 @@ fi
|
||||
export_dynamic_flag_spec=-rdynamic
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# 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
|
||||
# no search path for DLLs.
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
# Native MSVC
|
||||
cl* | icl*)
|
||||
# Native MSVC or ICC
|
||||
hardcode_libdir_flag_spec=' '
|
||||
allow_undefined_flag=unsupported
|
||||
always_export_symbols=yes
|
||||
@@ -10504,14 +10500,14 @@ fi
|
||||
# Tell ltmain to make .dll files, not .so files.
|
||||
shrext_cmds=.dll
|
||||
# FIXME: Setting linknames here is a bad hack.
|
||||
archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
|
||||
archive_cmds='$CC -Fe $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
|
||||
archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
|
||||
cp "$export_symbols" "$output_objdir/$soname.def";
|
||||
echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
|
||||
else
|
||||
$SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
|
||||
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='
|
||||
# The linker will not automatically build a static lib if we build a DLL.
|
||||
# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
|
||||
@@ -10535,7 +10531,7 @@ fi
|
||||
fi'
|
||||
;;
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
hardcode_libdir_flag_spec=' '
|
||||
allow_undefined_flag=unsupported
|
||||
# Tell ltmain to make .lib files, not .a files.
|
||||
@@ -11301,7 +11297,7 @@ if test yes = "$GCC"; then
|
||||
*) lt_awk_arg='/^libraries:/' ;;
|
||||
esac
|
||||
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' ;;
|
||||
esac
|
||||
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
|
||||
@@ -11359,7 +11355,7 @@ BEGIN {RS = " "; FS = "/|\n";} {
|
||||
# AWK program above erroneously prepends '/' to C:/dos/paths
|
||||
# for these hosts.
|
||||
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'` ;;
|
||||
esac
|
||||
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
|
||||
@@ -11527,7 +11523,7 @@ bsdi[45]*)
|
||||
# libtool to hard-code these into programs
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
version_type=windows
|
||||
shrext_cmds=.dll
|
||||
need_version=no
|
||||
@@ -11560,7 +11556,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
|
||||
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
|
||||
;;
|
||||
mingw* | cegcc*)
|
||||
mingw* | windows* | cegcc*)
|
||||
# MinGW DLLs use traditional 'lib' prefix
|
||||
#soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
soname_spec='`echo $libname | $SED -e 's/^lib//'`$shared_ext' # SDL customization
|
||||
@@ -11573,14 +11569,14 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
|
||||
*,cl*)
|
||||
# Native MSVC
|
||||
*,cl* | *,icl*)
|
||||
# Native MSVC or ICC
|
||||
libname_spec='$name'
|
||||
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
|
||||
library_names_spec='$libname.dll.lib'
|
||||
|
||||
case $build_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
sys_lib_search_path_spec=
|
||||
lt_save_ifs=$IFS
|
||||
IFS=';'
|
||||
@@ -11630,7 +11626,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
;;
|
||||
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
@@ -12300,7 +12296,7 @@ else
|
||||
lt_cv_dlopen_self=yes
|
||||
;;
|
||||
|
||||
mingw* | pw32* | cegcc*)
|
||||
mingw* | windows* | pw32* | cegcc*)
|
||||
lt_cv_dlopen=LoadLibrary
|
||||
lt_cv_dlopen_libs=
|
||||
;;
|
||||
@@ -14576,7 +14572,7 @@ if test yes = "$GCC"; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
|
||||
printf %s "checking for ld used by $CC... " >&6; }
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
*-*-mingw* | *-*-windows*)
|
||||
# gcc leaves a trailing carriage return, which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
@@ -14710,7 +14706,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# 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
|
||||
GXX=no
|
||||
@@ -15008,10 +15004,10 @@ fi
|
||||
esac
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
case $GXX,$cc_basename in
|
||||
,cl* | no,cl*)
|
||||
# Native MSVC
|
||||
,cl* | no,cl* | ,icl* | no,icl*)
|
||||
# Native MSVC or ICC
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec_CXX=' '
|
||||
@@ -15207,7 +15203,7 @@ fi
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# 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
|
||||
@@ -15272,7 +15268,7 @@ fi
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# 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
|
||||
@@ -15611,7 +15607,7 @@ fi
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# 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
|
||||
# FIXME: insert proper C++ library support
|
||||
@@ -15695,7 +15691,7 @@ fi
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# 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
|
||||
# g++ 2.7 appears to require '-G' NOT '-shared' on this
|
||||
# platform.
|
||||
@@ -15706,7 +15702,7 @@ fi
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# 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
|
||||
|
||||
hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
|
||||
@@ -16020,7 +16016,7 @@ lt_prog_compiler_static_CXX=
|
||||
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
|
||||
# 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
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
# Although the cygwin gcc ignores -fPIC, still need this for old-style
|
||||
@@ -16095,7 +16091,7 @@ lt_prog_compiler_static_CXX=
|
||||
;;
|
||||
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
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
|
||||
@@ -16589,9 +16585,9 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
|
||||
pw32*)
|
||||
export_symbols_cmds_CXX=$ltdll_cmds
|
||||
;;
|
||||
cygwin* | mingw* | cegcc*)
|
||||
cygwin* | mingw* | windows* | cegcc*)
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
cl* | icl*)
|
||||
exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
||||
;;
|
||||
*)
|
||||
@@ -16911,7 +16907,7 @@ bsdi[45]*)
|
||||
# libtool to hard-code these into programs
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
version_type=windows
|
||||
shrext_cmds=.dll
|
||||
need_version=no
|
||||
@@ -16943,7 +16939,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
soname_spec='`echo $libname | sed -e 's/^lib//'`$shared_ext' # SDL customization
|
||||
|
||||
;;
|
||||
mingw* | cegcc*)
|
||||
mingw* | windows* | cegcc*)
|
||||
# MinGW DLLs use traditional 'lib' prefix
|
||||
#soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
soname_spec='`echo $libname | $SED -e 's/^lib//'`$shared_ext' # SDL customization
|
||||
@@ -16956,14 +16952,14 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
|
||||
*,cl*)
|
||||
# Native MSVC
|
||||
*,cl* | *,icl*)
|
||||
# Native MSVC or ICC
|
||||
libname_spec='$name'
|
||||
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
|
||||
library_names_spec='$libname.dll.lib'
|
||||
|
||||
case $build_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
sys_lib_search_path_spec=
|
||||
lt_save_ifs=$IFS
|
||||
IFS=';'
|
||||
@@ -17013,7 +17009,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
;;
|
||||
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
@@ -18820,12 +18816,26 @@ else $as_nop
|
||||
fi
|
||||
|
||||
|
||||
enable_system_iconv_default=yes
|
||||
case "$host" in
|
||||
*-*-cygwin*|*-*-mingw*)
|
||||
enable_system_iconv_default=no
|
||||
;;
|
||||
esac
|
||||
# Check whether --enable-system-iconv was given.
|
||||
if test ${enable_system_iconv+y}
|
||||
then :
|
||||
enableval=$enable_system_iconv;
|
||||
else $as_nop
|
||||
enable_system_iconv=yes
|
||||
enable_system_iconv=$enable_system_iconv_default
|
||||
fi
|
||||
|
||||
# Check whether --enable-libiconv was given.
|
||||
if test ${enable_libiconv+y}
|
||||
then :
|
||||
enableval=$enable_libiconv;
|
||||
else $as_nop
|
||||
enable_libiconv=no
|
||||
fi
|
||||
|
||||
|
||||
@@ -18942,12 +18952,6 @@ if test "x$ac_cv_header_signal_h" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_header_compile "$LINENO" "linux/input.h" "ac_cv_header_linux_input_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_linux_input_h" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_LINUX_INPUT_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
@@ -19745,6 +19749,18 @@ if test "x$ac_cv_func_poll" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "memfd_create" "ac_cv_func_memfd_create"
|
||||
if test "x$ac_cv_func_memfd_create" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "posix_fallocate" "ac_cv_func_posix_fallocate"
|
||||
if test "x$ac_cv_func_posix_fallocate" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_POSIX_FALLOCATE 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "_Exit" "ac_cv_func__Exit"
|
||||
if test "x$ac_cv_func__Exit" = xyes
|
||||
@@ -20049,53 +20065,90 @@ fi
|
||||
|
||||
|
||||
if test x$enable_system_iconv = xyes; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -liconv" >&5
|
||||
printf %s "checking for iconv_open in -liconv... " >&6; }
|
||||
if test ${ac_cv_lib_iconv_iconv_open+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else $as_nop
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-liconv $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv in libc" >&5
|
||||
printf %s "checking for iconv in libc... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char iconv_open ();
|
||||
#define LIBICONV_PLUG 1 /* in case libiconv header is in include path */
|
||||
#include <stddef.h>
|
||||
#include <iconv.h>
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
return iconv_open ();
|
||||
|
||||
iconv_open(NULL,NULL);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"
|
||||
then :
|
||||
ac_cv_lib_iconv_iconv_open=yes
|
||||
have_libc_iconv=yes
|
||||
else $as_nop
|
||||
ac_cv_lib_iconv_iconv_open=no
|
||||
have_libc_iconv=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv_open" >&5
|
||||
printf "%s\n" "$ac_cv_lib_iconv_iconv_open" >&6; }
|
||||
if test "x$ac_cv_lib_iconv_iconv_open" = xyes
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_libc_iconv" >&5
|
||||
printf "%s\n" "$have_libc_iconv" >&6; }
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv in libiconv" >&5
|
||||
printf %s "checking for iconv in libiconv... " >&6; }
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -liconv"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <stddef.h>
|
||||
#include <iconv.h>
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
|
||||
iconv_open(NULL,NULL);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"
|
||||
then :
|
||||
LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"
|
||||
have_libiconv=yes
|
||||
else $as_nop
|
||||
have_libiconv=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS="$save_LIBS"
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_libiconv" >&5
|
||||
printf "%s\n" "$have_libiconv" >&6; }
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "iconv" "ac_cv_func_iconv"
|
||||
if test "x$ac_cv_func_iconv" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
|
||||
if test x$have_libc_iconv = xyes || test x$have_libiconv = xyes; then
|
||||
|
||||
fi
|
||||
printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
|
||||
|
||||
|
||||
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
|
||||
|
||||
printf "%s\n" "#define SDL_USE_LIBICONV 1" >>confdefs.h
|
||||
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"
|
||||
echo "-- Using iconv from libiconv"
|
||||
else
|
||||
echo "-- Using iconv from libc"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
|
||||
@@ -22083,19 +22136,19 @@ fi
|
||||
if test x$enable_audio = xyes -a x$enable_pulseaudio = xyes; then
|
||||
|
||||
pkg_failed=no
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpulse-simple >= 0.9" >&5
|
||||
printf %s "checking for libpulse-simple >= 0.9... " >&6; }
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpulse >= 0.9.15" >&5
|
||||
printf %s "checking for libpulse >= 0.9.15... " >&6; }
|
||||
|
||||
if test -n "$PULSEAUDIO_CFLAGS"; then
|
||||
pkg_cv_PULSEAUDIO_CFLAGS="$PULSEAUDIO_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-simple >= 0.9\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libpulse-simple >= 0.9") 2>&5
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse >= 0.9.15\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libpulse >= 0.9.15") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags "libpulse-simple >= 0.9" 2>/dev/null`
|
||||
pkg_cv_PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags "libpulse >= 0.9.15" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@@ -22107,12 +22160,12 @@ if test -n "$PULSEAUDIO_LIBS"; then
|
||||
pkg_cv_PULSEAUDIO_LIBS="$PULSEAUDIO_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-simple >= 0.9\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libpulse-simple >= 0.9") 2>&5
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse >= 0.9.15\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libpulse >= 0.9.15") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_PULSEAUDIO_LIBS=`$PKG_CONFIG --libs "libpulse-simple >= 0.9" 2>/dev/null`
|
||||
pkg_cv_PULSEAUDIO_LIBS=`$PKG_CONFIG --libs "libpulse >= 0.9.15" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@@ -22133,9 +22186,9 @@ else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpulse-simple >= 0.9" 2>&1`
|
||||
PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpulse >= 0.9.15" 2>&1`
|
||||
else
|
||||
PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpulse-simple >= 0.9" 2>&1`
|
||||
PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpulse >= 0.9.15" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$PULSEAUDIO_PKG_ERRORS" >&5
|
||||
@@ -22162,7 +22215,7 @@ else $as_nop
|
||||
enable_pulseaudio_shared=yes
|
||||
fi
|
||||
|
||||
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'`
|
||||
|
||||
|
||||
printf "%s\n" "#define SDL_AUDIO_DRIVER_PULSEAUDIO 1" >>confdefs.h
|
||||
@@ -22176,7 +22229,7 @@ printf "%s\n" "$as_me: WARNING: You must have SDL_LoadObject() support for dynam
|
||||
fi
|
||||
if test x$have_loadso = xyes && \
|
||||
test x$enable_pulseaudio_shared = xyes && test x$pulseaudio_lib != x; then
|
||||
echo "-- dynamic libpulse-simple -> $pulseaudio_lib"
|
||||
echo "-- dynamic libpulse -> $pulseaudio_lib"
|
||||
|
||||
printf "%s\n" "#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC \"$pulseaudio_lib\"" >>confdefs.h
|
||||
|
||||
@@ -23026,41 +23079,6 @@ printf "%s\n" "$have_gcc_no_strict_aliasing" >&6; }
|
||||
fi
|
||||
}
|
||||
|
||||
CheckStackBoundary()
|
||||
{
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC -mpreferred-stack-boundary option" >&5
|
||||
printf %s "checking for GCC -mpreferred-stack-boundary option... " >&6; }
|
||||
have_gcc_preferred_stack_boundary=no
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$save_CFLAGS -mpreferred-stack-boundary=2"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int x = 0;
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"
|
||||
then :
|
||||
have_gcc_preferred_stack_boundary=yes
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_preferred_stack_boundary" >&5
|
||||
printf "%s\n" "$have_gcc_preferred_stack_boundary" >&6; }
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test x$have_gcc_preferred_stack_boundary = xyes; then
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -mpreferred-stack-boundary=2"
|
||||
fi
|
||||
}
|
||||
|
||||
CheckWerror()
|
||||
{
|
||||
# Check whether --enable-werror was given.
|
||||
@@ -26440,6 +26458,14 @@ printf "%s\n" "#define SDL_VIDEO_VULKAN 1" >>confdefs.h
|
||||
|
||||
CheckInputEvents()
|
||||
{
|
||||
ac_fn_c_check_header_compile "$LINENO" "linux/input.h" "ac_cv_header_linux_input_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_linux_input_h" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_LINUX_INPUT_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Linux 2.4 unified input interface" >&5
|
||||
printf %s "checking for Linux 2.4 unified input interface... " >&6; }
|
||||
use_input_events=no
|
||||
@@ -27474,9 +27500,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_wince" >&5
|
||||
printf "%s\n" "$have_wince" >&6; }
|
||||
|
||||
# This fixes Windows stack alignment with newer GCC
|
||||
CheckStackBoundary
|
||||
|
||||
# headers needed elsewhere
|
||||
ac_fn_c_check_header_compile "$LINENO" "tpcshrd.h" "ac_cv_header_tpcshrd_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_tpcshrd_h" = xyes
|
||||
@@ -27660,77 +27683,16 @@ else $as_nop
|
||||
fi
|
||||
|
||||
if test x$enable_xinput = xyes; then
|
||||
have_xinput_gamepadex=no
|
||||
have_xinput_stateex=no
|
||||
ac_fn_c_check_header_compile "$LINENO" "xinput.h" "ac_cv_header_xinput_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_xinput_h" = xyes
|
||||
then :
|
||||
have_xinput=yes
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct XINPUT_GAMEPAD_EX" >&5
|
||||
printf %s "checking for struct XINPUT_GAMEPAD_EX... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
XINPUT_GAMEPAD_EX x1;
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"
|
||||
then :
|
||||
have_xinput_gamepadex=yes
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_xinput_gamepadex" >&5
|
||||
printf "%s\n" "$have_xinput_gamepadex" >&6; }
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct XINPUT_STATE_EX" >&5
|
||||
printf %s "checking for struct XINPUT_STATE_EX... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
XINPUT_STATE_EX s1;
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"
|
||||
then :
|
||||
have_xinput_stateex=yes
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_xinput_stateex" >&5
|
||||
printf "%s\n" "$have_xinput_stateex" >&6; }
|
||||
|
||||
if test x$have_xinput = xyes; then
|
||||
|
||||
printf "%s\n" "#define HAVE_XINPUT_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
if test x$have_xinput_gamepadex = xyes; then
|
||||
|
||||
printf "%s\n" "#define HAVE_XINPUT_GAMEPAD_EX 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
if test x$have_xinput_stateex = xyes; then
|
||||
|
||||
printf "%s\n" "#define HAVE_XINPUT_STATE_EX 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -28285,7 +28247,7 @@ fi
|
||||
enable_hidapi_libusb=yes
|
||||
require_hidapi_libusb=yes
|
||||
;;
|
||||
*-*-os2* )
|
||||
*-*-os2* )
|
||||
enable_hidapi_libusb=yes
|
||||
;;
|
||||
esac
|
||||
@@ -29678,7 +29640,7 @@ printf "%s\n" "#define SDL_VIDEO_DRIVER_OS2 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/video/os2/*.c"
|
||||
have_video=yes
|
||||
SUMMARY_video="${SUMMARY_video} os/2"
|
||||
SUMMARY_video="${SUMMARY_video} OS/2"
|
||||
fi
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
@@ -29687,7 +29649,7 @@ printf "%s\n" "#define SDL_AUDIO_DRIVER_OS2 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/audio/os2/*.c"
|
||||
have_audio=yes
|
||||
SUMMARY_audio="${SUMMARY_audio} os/2"
|
||||
SUMMARY_audio="${SUMMARY_audio} OS/2"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmmpm2"
|
||||
fi
|
||||
# Set up files for the thread library
|
||||
|
||||
128
configure.ac
128
configure.ac
@@ -1,5 +1,5 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ([2.63])
|
||||
AC_PREREQ([2.65])
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([src/SDL.c])
|
||||
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
|
||||
# See docs/release_checklist.md
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=28
|
||||
SDL_MICRO_VERSION=0
|
||||
SDL_MINOR_VERSION=30
|
||||
SDL_MICRO_VERSION=2
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
|
||||
@@ -319,10 +319,20 @@ AC_ARG_ENABLE(libc,
|
||||
[AS_HELP_STRING([--enable-libc], [Use the system C library [default=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*)
|
||||
enable_system_iconv_default=no
|
||||
;;
|
||||
esac
|
||||
AC_ARG_ENABLE(system-iconv,
|
||||
[AS_HELP_STRING([--enable-system-iconv], [Use iconv() from system-installed libraries [default=yes]])],
|
||||
, enable_system_iconv=yes)
|
||||
[AS_HELP_STRING([--enable-system-iconv], [Use iconv() from system-installed libraries [default=no for windows, yes for others]])],
|
||||
, 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
|
||||
AC_DEFINE(HAVE_LIBC, 1, [ ])
|
||||
@@ -330,7 +340,7 @@ if test x$enable_libc = xyes; then
|
||||
dnl Check for C library headers
|
||||
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])
|
||||
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.
|
||||
AC_TYPE_SIZE_T
|
||||
@@ -349,14 +359,52 @@ dnl Checks for library functions.
|
||||
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_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
|
||||
AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
|
||||
AC_CHECK_FUNCS(iconv)
|
||||
AC_MSG_CHECKING(for iconv in libc)
|
||||
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
|
||||
|
||||
AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], 1, [ ])], ,[#include <signal.h>])
|
||||
@@ -1122,13 +1170,13 @@ CheckPulseAudio()
|
||||
[AS_HELP_STRING([--enable-pulseaudio], [use PulseAudio [default=yes]])],
|
||||
, enable_pulseaudio=yes)
|
||||
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
|
||||
AC_ARG_ENABLE(pulseaudio-shared,
|
||||
[AS_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [default=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, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/audio/pulseaudio/*.c"
|
||||
@@ -1139,7 +1187,7 @@ CheckPulseAudio()
|
||||
fi
|
||||
if test x$have_loadso = xyes && \
|
||||
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", [ ])
|
||||
SUMMARY_audio="${SUMMARY_audio} pulse(dynamic)"
|
||||
|
||||
@@ -1558,26 +1606,6 @@ CheckNoStrictAliasing()
|
||||
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.
|
||||
CheckWerror()
|
||||
{
|
||||
@@ -2778,6 +2806,8 @@ dnl See if we can use the new unified event interface in Linux 2.4
|
||||
CheckInputEvents()
|
||||
{
|
||||
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)
|
||||
use_input_events=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@@ -3306,9 +3336,6 @@ CheckWINDOWS()
|
||||
],[])
|
||||
AC_MSG_RESULT($have_wince)
|
||||
|
||||
# This fixes Windows stack alignment with newer GCC
|
||||
CheckStackBoundary
|
||||
|
||||
# headers needed elsewhere
|
||||
AC_CHECK_HEADER(tpcshrd.h,have_tpcshrd_h=yes)
|
||||
if test x$have_tpcshrd_h = xyes; then
|
||||
@@ -3390,33 +3417,10 @@ asdf
|
||||
[AS_HELP_STRING([--enable-xinput], [use Xinput for Windows [default=yes]])],
|
||||
, enable_xinput=yes)
|
||||
if test x$enable_xinput = xyes; then
|
||||
have_xinput_gamepadex=no
|
||||
have_xinput_stateex=no
|
||||
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
|
||||
AC_DEFINE(HAVE_XINPUT_H, 1, [ ])
|
||||
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
|
||||
|
||||
AC_MSG_CHECKING(for windows.gaming.input.h)
|
||||
@@ -3637,7 +3641,7 @@ CheckHIDAPI()
|
||||
enable_hidapi_libusb=yes
|
||||
require_hidapi_libusb=yes
|
||||
;;
|
||||
*-*-os2* )
|
||||
*-*-os2* )
|
||||
enable_hidapi_libusb=yes
|
||||
;;
|
||||
esac
|
||||
@@ -4648,14 +4652,14 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_OS2, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/video/os2/*.c"
|
||||
have_video=yes
|
||||
SUMMARY_video="${SUMMARY_video} os/2"
|
||||
SUMMARY_video="${SUMMARY_video} OS/2"
|
||||
fi
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_OS2, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/audio/os2/*.c"
|
||||
have_audio=yes
|
||||
SUMMARY_audio="${SUMMARY_audio} os/2"
|
||||
SUMMARY_audio="${SUMMARY_audio} OS/2"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmmpm2"
|
||||
fi
|
||||
# Set up files for the thread library
|
||||
|
||||
@@ -13,13 +13,13 @@ supported, but you can use the "android-project-ant" directory as a template.
|
||||
Requirements
|
||||
================================================================================
|
||||
|
||||
Android SDK (version 31 or later)
|
||||
Android SDK (version 34 or later)
|
||||
https://developer.android.com/sdk/index.html
|
||||
|
||||
Android NDK r15c or later
|
||||
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
|
||||
@@ -72,7 +72,7 @@ done in the build directory for the app!
|
||||
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
|
||||
@@ -431,13 +431,13 @@ The Tegra Graphics Debugger is available from NVidia here:
|
||||
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.
|
||||
As of this writing, according to https://developer.android.com/about/dashboards/index.html
|
||||
about 99% of the Android devices accessing Google Play support API level 16 or
|
||||
higher (January 2018).
|
||||
The latest NDK toolchain doesn't support targeting earlier than API level 19.
|
||||
As of this writing, according to https://www.composables.com/tools/distribution-chart
|
||||
about 99.7% of the Android devices accessing Google Play support API level 19 or
|
||||
higher (August 2023).
|
||||
|
||||
|
||||
A note regarding the use of the "dirty rectangles" rendering technique
|
||||
|
||||
@@ -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`.
|
||||
|
||||
```cmake
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(mygame)
|
||||
|
||||
# Create an option to switch between a system sdl library and a vendored sdl library
|
||||
|
||||
@@ -35,7 +35,7 @@ SDL now has, internally, a table of function pointers. So, this is what SDL_Init
|
||||
now looks like:
|
||||
|
||||
```c
|
||||
UInt32 SDL_Init(Uint32 flags)
|
||||
Uint32 SDL_Init(Uint32 flags)
|
||||
{
|
||||
return jump_table.SDL_Init(flags);
|
||||
}
|
||||
@@ -100,7 +100,7 @@ a shared library of its own). If so, it loads that library and looks for and
|
||||
calls a single function:
|
||||
|
||||
```c
|
||||
SInt32 SDL_DYNAPI_entry(Uint32 version, void *table, Uint32 tablesize);
|
||||
Sint32 SDL_DYNAPI_entry(Uint32 version, void *table, Uint32 tablesize);
|
||||
```
|
||||
|
||||
That function takes a version number (more on that in a moment), the address of
|
||||
|
||||
@@ -1,27 +1,187 @@
|
||||
# Emscripten
|
||||
|
||||
(This documentation is not very robust; we will update and expand this later.)
|
||||
## The state of things
|
||||
|
||||
## A quick note about audio
|
||||
(As of September 2023, but things move quickly and we don't update this
|
||||
document often.)
|
||||
|
||||
In modern times, all the browsers you probably care about (Chrome, Firefox,
|
||||
Edge, and Safari, on Windows, macOS, Linux, iOS and Android), support some
|
||||
reasonable base configurations:
|
||||
|
||||
- WebAssembly (don't bother with asm.js any more)
|
||||
- WebGL (which will look like OpenGL ES 2 or 3 to your app).
|
||||
- Threads (see caveats, though!)
|
||||
- Game controllers
|
||||
- Autoupdating (so you can assume they have a recent version of the browser)
|
||||
|
||||
All this to say we're at the point where you don't have to make a lot of
|
||||
concessions to get even a fairly complex SDL-based game up and running.
|
||||
|
||||
|
||||
## RTFM
|
||||
|
||||
This document is a quick rundown of some high-level details. The
|
||||
documentation at [emscripten.org](https://emscripten.org/) is vast
|
||||
and extremely detailed for a wide variety of topics, and you should at
|
||||
least skim through it at some point.
|
||||
|
||||
|
||||
## Porting your app to Emscripten
|
||||
|
||||
Many many things just need some simple adjustments and they'll compile
|
||||
like any other C/C++ code, as long as SDL was handling the platform-specific
|
||||
work for your program.
|
||||
|
||||
First, you probably need this in at least one of your source files:
|
||||
|
||||
```c
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <emscripten.h>
|
||||
#endif
|
||||
```
|
||||
|
||||
Second: assembly language code has to go. Replace it with C. You can even use
|
||||
[x86 SIMD intrinsic functions in Emscripten](https://emscripten.org/docs/porting/simd.html)!
|
||||
|
||||
Third: Middleware has to go. If you have a third-party library you link
|
||||
against, you either need an Emscripten port of it, or the source code to it
|
||||
to compile yourself, or you need to remove it.
|
||||
|
||||
Fourth: You still start in a function called main(), but you need to get out of
|
||||
it and into a function that gets called repeatedly, and returns quickly,
|
||||
called a mainloop.
|
||||
|
||||
Somewhere in your program, you probably have something that looks like a more
|
||||
complicated version of this:
|
||||
|
||||
```c
|
||||
void main(void)
|
||||
{
|
||||
initialize_the_game();
|
||||
while (game_is_still_running) {
|
||||
check_for_new_input();
|
||||
think_about_stuff();
|
||||
draw_the_next_frame();
|
||||
}
|
||||
deinitialize_the_game();
|
||||
}
|
||||
```
|
||||
|
||||
This will not work on Emscripten, because the main thread needs to be free
|
||||
to do stuff and can't sit in this loop forever. So Emscripten lets you set up
|
||||
a [mainloop](https://emscripten.org/docs/porting/emscripten-runtime-environment.html#browser-main-loop).
|
||||
|
||||
```c
|
||||
static void mainloop(void) /* this will run often, possibly at the monitor's refresh rate */
|
||||
{
|
||||
if (!game_is_still_running) {
|
||||
deinitialize_the_game();
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_cancel_main_loop(); /* this should "kill" the app. */
|
||||
#else
|
||||
exit(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
check_for_new_input();
|
||||
think_about_stuff();
|
||||
draw_the_next_frame();
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
initialize_the_game();
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_set_main_loop(mainloop, 0, 1);
|
||||
#else
|
||||
while (1) { mainloop(); }
|
||||
#endif
|
||||
}
|
||||
```
|
||||
|
||||
Basically, `emscripten_set_main_loop(mainloop, 0, 1);` says "run
|
||||
`mainloop` over and over until I end the program." The function will
|
||||
run, and return, freeing the main thread for other tasks, and then
|
||||
run again when it's time. The `1` parameter does some magic to make
|
||||
your main() function end immediately; this is useful because you
|
||||
don't want any shutdown code that might be sitting below this code
|
||||
to actually run if main() were to continue on, since we're just
|
||||
getting started.
|
||||
|
||||
There's a lot of little details that are beyond the scope of this
|
||||
document, but that's the biggest intial set of hurdles to porting
|
||||
your app to the web.
|
||||
|
||||
|
||||
## Do you need threads?
|
||||
|
||||
If you plan to use threads, they work on all major browsers now. HOWEVER,
|
||||
they bring with them a lot of careful considerations. Rendering _must_
|
||||
be done on the main thread. This is a general guideline for many
|
||||
platforms, but a hard requirement on the web.
|
||||
|
||||
Many other things also must happen on the main thread; often times SDL
|
||||
and Emscripten make efforts to "proxy" work to the main thread that
|
||||
must be there, but you have to be careful (and read more detailed
|
||||
documentation than this for the finer points).
|
||||
|
||||
Even when using threads, your main thread needs to set an Emscripten
|
||||
mainloop that runs quickly and returns, or things will fail to work
|
||||
correctly.
|
||||
|
||||
You should definitely read [Emscripten's pthreads docs](https://emscripten.org/docs/porting/pthreads.html)
|
||||
for all the finer points. Mostly SDL's thread API will work as expected,
|
||||
but is built on pthreads, so it shares the same little incompatibilities
|
||||
that are documented there, such as where you can use a mutex, and when
|
||||
a thread will start running, etc.
|
||||
|
||||
|
||||
IMPORTANT: You have to decide to either build something that uses
|
||||
threads or something that doesn't; you can't have one build
|
||||
that works everywhere. This is an Emscripten (or maybe WebAssembly?
|
||||
Or just web browsers in general?) limitation. If you aren't using
|
||||
threads, it's easier to not enable them at all, at build time.
|
||||
|
||||
If you use threads, you _have to_ run from a web server that has
|
||||
[COOP/COEP headers set correctly](https://web.dev/why-coop-coep/)
|
||||
or your program will fail to start at all.
|
||||
|
||||
If building with threads, `__EMSCRIPTEN_PTHREADS__` will be defined
|
||||
for checking with the C preprocessor, so you can build something
|
||||
different depending on what sort of build you're compiling.
|
||||
|
||||
|
||||
## Audio
|
||||
|
||||
Audio works as expected at the API level, but not exactly like other
|
||||
platforms.
|
||||
|
||||
You'll only see a single default audio device. Audio capture also works;
|
||||
if the browser pops up a prompt to ask for permission to access the
|
||||
microphone, the SDL_OpenAudioDevice call will succeed and start producing
|
||||
silence at a regular interval. Once the user approves the request, real
|
||||
audio data will flow. If the user denies it, the app is not informed and
|
||||
will just continue to receive silence.
|
||||
|
||||
Modern web browsers will not permit web pages to produce sound before the
|
||||
user has interacted with them; this is for several reasons, not the least
|
||||
of which being that no one likes when a random browser tab suddenly starts
|
||||
making noise and the user has to scramble to figure out which and silence
|
||||
it.
|
||||
user has interacted with them (clicked or tapped on them, usually); this is
|
||||
for several reasons, not the least of which being that no one likes when a
|
||||
random browser tab suddenly starts making noise and the user has to scramble
|
||||
to figure out which and silence it.
|
||||
|
||||
To solve this, most browsers will refuse to let a web app use the audio
|
||||
subsystem at all before the user has interacted with (clicked on) the page
|
||||
in a meaningful way. SDL-based apps also have to deal with this problem; if
|
||||
the user hasn't interacted with the page, SDL_OpenAudioDevice will fail.
|
||||
SDL will allow you to open the audio device for playback in this
|
||||
circumstance, and your audio callback will fire, but SDL will throw the audio
|
||||
data away until the user interacts with the page. This helps apps that depend
|
||||
on the audio callback to make progress, and also keeps audio playback in sync
|
||||
once the app is finally allowed to make noise.
|
||||
|
||||
There are two reasonable ways to deal with this: if you are writing some
|
||||
sort of media player thing, where the user expects there to be a volume
|
||||
control when you mouseover the canvas, just default that control to a muted
|
||||
state; if the user clicks on the control to unmute it, on this first click,
|
||||
open the audio device. This allows the media to play at start, the user can
|
||||
reasonably opt-in to listening, and you never get access denied to the audio
|
||||
device.
|
||||
There are two reasonable ways to deal with the silence at the app level:
|
||||
if you are writing some sort of media player thing, where the user expects
|
||||
there to be a volume control when you mouseover the canvas, just default
|
||||
that control to a muted state; if the user clicks on the control to unmute
|
||||
it, on this first click, open the audio device. This allows the media to
|
||||
play at start, and the user can reasonably opt-in to listening.
|
||||
|
||||
Many games do not have this sort of UI, and are more rigid about starting
|
||||
audio along with everything else at the start of the process. For these, your
|
||||
@@ -36,41 +196,179 @@ Please see the discussion at https://github.com/libsdl-org/SDL/issues/6385
|
||||
for some Javascript code to steal for this approach.
|
||||
|
||||
|
||||
## Rendering
|
||||
|
||||
If you use SDL's 2D render API, it will use GLES2 internally, which
|
||||
Emscripten will turn into WebGL calls. You can also use OpenGL ES 2
|
||||
directly by creating a GL context and drawing into it.
|
||||
|
||||
Calling SDL_RenderPresent (or SDL_GL_SwapWindow) will not actually
|
||||
present anything on the screen until your return from your mainloop
|
||||
function.
|
||||
|
||||
|
||||
## Building SDL/emscripten
|
||||
|
||||
SDL currently requires at least Emscripten 2.0.32 to build. Newer versions
|
||||
First: do you _really_ need to build SDL from source?
|
||||
|
||||
If you aren't developing SDL itself, have a desire to mess with its source
|
||||
code, or need something on the bleeding edge, don't build SDL. Just use
|
||||
Emscripten's packaged version!
|
||||
|
||||
Compile and link your app with `-sUSE_SDL=2` and it'll use a build of
|
||||
SDL packaged with Emscripten. This comes from the same source code and
|
||||
fixes the Emscripten project makes to SDL are generally merged into SDL's
|
||||
revision control, so often this is much easier for app developers.
|
||||
|
||||
`-sUSE_SDL=1` will select Emscripten's JavaScript reimplementation of SDL
|
||||
1.2 instead; if you need SDL 1.2, this might be fine, but we generally
|
||||
recommend you don't use SDL 1.2 in modern times.
|
||||
|
||||
|
||||
If you want to build SDL, though...
|
||||
|
||||
SDL currently requires at least Emscripten 3.1.35 to build. Newer versions
|
||||
are likely to work, as well.
|
||||
|
||||
|
||||
Build:
|
||||
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-O2"
|
||||
$ emmake make
|
||||
This works on Linux/Unix and macOS. Please send comments about Windows.
|
||||
|
||||
Make sure you've [installed emsdk](https://emscripten.org/docs/getting_started/downloads.html)
|
||||
first, and run `source emsdk_env.sh` at the command line so it finds the
|
||||
tools.
|
||||
|
||||
(These configure options might be overkill, but this has worked for me.)
|
||||
|
||||
```bash
|
||||
cd SDL
|
||||
mkdir build
|
||||
cd build
|
||||
emconfigure ../configure --host=wasm32-unknown-emscripten --disable-pthreads --disable-assembly --disable-cpuinfo CFLAGS="-sUSE_SDL=0 -O3"
|
||||
emmake make -j4
|
||||
```
|
||||
|
||||
If you want to build with thread support, something like this works:
|
||||
|
||||
```bash
|
||||
emconfigure ../configure --host=wasm32-unknown-emscripten --enable-pthreads --disable-assembly --disable-cpuinfo CFLAGS="-sUSE_SDL=0 -O3 -pthread" LDFLAGS="-pthread"
|
||||
```
|
||||
|
||||
Or with cmake:
|
||||
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ emcmake cmake ..
|
||||
$ emmake make
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
emcmake cmake ..
|
||||
emmake make -j4
|
||||
```
|
||||
|
||||
To build one of the tests:
|
||||
|
||||
$ cd test/
|
||||
$ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html
|
||||
```bash
|
||||
cd test/
|
||||
emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html
|
||||
```
|
||||
|
||||
Uses GLES2 renderer or software
|
||||
## Building your app
|
||||
|
||||
Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere):
|
||||
You need to compile with `emcc` instead of `gcc` or `clang` or whatever, but
|
||||
mostly it uses the same command line arguments as Clang.
|
||||
|
||||
SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/):
|
||||
Link against the SDL/build/.libs/libSDL2.a file you generated by building SDL,
|
||||
link with `-sUSE_SDL=2` to use Emscripten's prepackaged SDL2 build.
|
||||
|
||||
Usually you would produce a binary like this:
|
||||
|
||||
```bash
|
||||
gcc -o mygame mygame.c # or whatever
|
||||
```
|
||||
|
||||
But for Emscripten, you want to output something else:
|
||||
|
||||
```bash
|
||||
emcc -o index.html mygame.c
|
||||
```
|
||||
|
||||
This will produce several files...support Javascript and WebAssembly (.wasm)
|
||||
files. The `-o index.html` will produce a simple HTML page that loads and
|
||||
runs your app. You will (probably) eventually want to replace or customize
|
||||
that file and do `-o index.js` instead to just build the code pieces.
|
||||
|
||||
If you're working on a program of any serious size, you'll likely need to
|
||||
link with `-sALLOW_MEMORY_GROWTH=1 -sMAXIMUM_MEMORY=1gb` to get access
|
||||
to more memory. If using pthreads, you'll need the `-sMAXIMUM_MEMORY=1gb`
|
||||
or the app will fail to start on iOS browsers, but this might be a bug that
|
||||
goes away in the future.
|
||||
|
||||
|
||||
## Data files
|
||||
|
||||
Your game probably has data files. Here's how to access them.
|
||||
|
||||
Filesystem access works like a Unix filesystem; you have a single directory
|
||||
tree, possibly interpolated from several mounted locations, no drive letters,
|
||||
'/' for a path separator. You can access them with standard file APIs like
|
||||
open() or fopen() or SDL_RWops. You can read or write from the filesystem.
|
||||
|
||||
By default, you probably have a "MEMFS" filesystem (all files are stored in
|
||||
memory, but access to them is immediate and doesn't need to block). There are
|
||||
other options, like "IDBFS" (files are stored in a local database, so they
|
||||
don't need to be in RAM all the time and they can persist between runs of the
|
||||
program, but access is not synchronous). You can mix and match these file
|
||||
systems, mounting a MEMFS filesystem at one place and idbfs elsewhere, etc,
|
||||
but that's beyond the scope of this document. Please refer to Emscripten's
|
||||
[page on the topic](https://emscripten.org/docs/porting/files/file_systems_overview.html)
|
||||
for more info.
|
||||
|
||||
The _easiest_ (but not the best) way to get at your data files is to embed
|
||||
them in the app itself. Emscripten's linker has support for automating this.
|
||||
|
||||
```bash
|
||||
emcc -o index.html loopwave.c --embed-file=../test/sample.wav@/sounds/sample.wav
|
||||
```
|
||||
|
||||
This will pack ../test/sample.wav in your app, and make it available at
|
||||
"/sounds/sample.wav" at runtime. Emscripten makes sure this data is available
|
||||
before your main() function runs, and since it's in MEMFS, you can just
|
||||
read it like you do on other platforms. `--embed-file` can also accept a
|
||||
directory to pack an entire tree, and you can specify the argument multiple
|
||||
times to pack unrelated things into the final installation.
|
||||
|
||||
Note that this is absolutely the best approach if you have a few small
|
||||
files to include and shouldn't worry about the issue further. However, if you
|
||||
have hundreds of megabytes and/or thousands of files, this is not so great,
|
||||
since the user will download it all every time they load your page, and it
|
||||
all has to live in memory at runtime.
|
||||
|
||||
[Emscripten's documentation on the matter](https://emscripten.org/docs/porting/files/packaging_files.html)
|
||||
gives other options and details, and is worth a read.
|
||||
|
||||
|
||||
## Debugging
|
||||
|
||||
Debugging web apps is a mixed bag. You should compile and link with
|
||||
`-gsource-map`, which embeds a ton of source-level debugging information into
|
||||
the build, and make sure _the app source code is available on the web server_,
|
||||
which is often a scary proposition for various reasons.
|
||||
|
||||
When you debug from the browser's tools and hit a breakpoint, you can step
|
||||
through the actual C/C++ source code, though, which can be nice.
|
||||
|
||||
If you try debugging in Firefox and it doesn't work well for no apparent
|
||||
reason, try Chrome, and vice-versa. These tools are still relatively new,
|
||||
and improving all the time.
|
||||
|
||||
SDL_Log() (or even plain old printf) will write to the Javascript console,
|
||||
and honestly I find printf-style debugging to be easier than setting up a build
|
||||
for proper debugging, so use whatever tools work best for you.
|
||||
|
||||
|
||||
## Questions?
|
||||
|
||||
Please give us feedback on this document at [the SDL bug tracker](https://github.com/libsdl-org/SDL/issues).
|
||||
If something is wrong or unclear, we want to know!
|
||||
|
||||
$ EMCONFIGURE_JS=1 emconfigure ../configure
|
||||
build as usual...
|
||||
|
||||
SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx):
|
||||
|
||||
$ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx
|
||||
build as usual...
|
||||
|
||||
@@ -3,7 +3,7 @@ GDK
|
||||
|
||||
This port allows SDL applications to run via Microsoft's Game Development Kit (GDK).
|
||||
|
||||
Windows (GDK) and Xbox One/Xbox Series (GDKX) are supported. Although most of the Xbox code is included in the public SDL source code, NDA access is required for a small number of source files. If you have access to GDKX, these required Xbox files are posted on the GDK forums [here](https://forums.xboxlive.com/questions/130003/).
|
||||
Windows (GDK) and Xbox One/Xbox Series (GDKX) are both supported and all the required code is included in this public SDL release. However, only licensed Xbox developers have access to the GDKX libraries which will allow you to build the Xbox targets.
|
||||
|
||||
|
||||
Requirements
|
||||
@@ -11,6 +11,7 @@ Requirements
|
||||
|
||||
* Microsoft Visual Studio 2022 (in theory, it should also work in 2017 or 2019, but this has not been tested)
|
||||
* Microsoft GDK June 2022 or newer (public release [here](https://github.com/microsoft/GDK/releases/tag/June_2022))
|
||||
* For Xbox, you will need the corresponding GDKX version (licensed developers only)
|
||||
* To publish a package or successfully authenticate a user, you will need to create an app id/configure services in Partner Center. However, for local testing purposes (without authenticating on Xbox Live), the identifiers used by the GDK test programs in the included solution will work.
|
||||
|
||||
|
||||
@@ -29,6 +30,12 @@ The Windows GDK port supports the full set of Win32 APIs, renderers, controllers
|
||||
* Global task queue callbacks are dispatched during `SDL_PumpEvents` (which is also called internally if using `SDL_PollEvent`).
|
||||
* You can get the handle of the global task queue through `SDL_GDKGetTaskQueue`, if needed. When done with the queue, be sure to use `XTaskQueueCloseHandle` to decrement the reference count (otherwise it will cause a resource leak).
|
||||
|
||||
* Single-player games have some additional features available:
|
||||
* Call `SDL_GDKGetDefaultUser` to get the default XUserHandle pointer.
|
||||
* `SDL_GetPrefPath` still works, but only for single-player titles.
|
||||
|
||||
These functions mostly wrap around async APIs, and thus should be treated as synchronous alternatives. Also note that the single-player functions return on any OS errors, so be sure to validate the return values!
|
||||
|
||||
* What doesn't work:
|
||||
* Compilation with anything other than through the included Visual C++ solution file
|
||||
|
||||
@@ -139,6 +146,20 @@ To create the package:
|
||||
6. Once the package is installed, you can run it from the start menu.
|
||||
7. As with when running from Visual Studio, if you need to test any Xbox Live functionality you must switch to the correct sandbox.
|
||||
|
||||
Xbox GDKX Setup
|
||||
---------------------
|
||||
In general, the same process in the Windows GDK instructions work. There are just a few additional notes:
|
||||
* For Xbox One consoles, use the Gaming.Xbox.XboxOne.x64 target
|
||||
* For Xbox Series consoles, use the Gaming.Xbox.Scarlett.x64 target
|
||||
* The Xbox One target sets the `__XBOXONE__` define and the Xbox Series target sets the `__XBOXSERIES__` define
|
||||
* You don't need to link against the Xbox.Services Thunks lib nor include that dll in your package (it doesn't exist for Xbox)
|
||||
* The shader blobs for Xbox are created in a pre-build step for the Xbox targets, rather than included in the source (due to NDA and version compatability reasons)
|
||||
* To create a package, use:
|
||||
`makepkg pack /f PackageLayout.xml /lt /d . /pd Package`
|
||||
* To install the package, use:
|
||||
`xbapp install [PACKAGE].xvc`
|
||||
* For some reason, if you make changes that require SDL2.dll to build, and you are running through the debugger (instead of a package), you have to rebuild your .exe target for the debugger to recognize the dll has changed and needs to be transferred to the console again
|
||||
* While there are successful releases of Xbox titles using this port, it is not as extensively tested as other targets
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
@@ -273,7 +273,7 @@ e.g.
|
||||
{
|
||||
... initialize game ...
|
||||
|
||||
#if __IPHONEOS__
|
||||
#ifdef __IPHONEOS__
|
||||
// Initialize the Game Center for scoring and matchmaking
|
||||
InitGameCenter();
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ Simple DirectMedia Layer 2 for OS/2 & eComStation
|
||||
SDL port for OS/2, authored by Andrey Vasilkin <digi@os2.snc.ru>, 2016
|
||||
|
||||
|
||||
OpenGL and audio capture not supported by this port.
|
||||
OpenGL not supported by this port.
|
||||
|
||||
Additional optional environment variables:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -55,6 +55,8 @@ assert can have unique static variables associated with it.
|
||||
#define SDL_TriggerBreakpoint() __builtin_debugtrap()
|
||||
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||
#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" )
|
||||
#elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
|
||||
#elif defined(__APPLE__) && defined(__arm__)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -209,7 +209,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
|
||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
|
||||
#ifdef __thumb__
|
||||
/* The mcr instruction isn't available in thumb mode, use real functions */
|
||||
#define SDL_MEMORY_BARRIER_USES_FUNCTION
|
||||
@@ -240,7 +240,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
|
||||
/* "REP NOP" is PAUSE, coded for tools that don't know it by that name. */
|
||||
#if (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
|
||||
#define SDL_CPUPauseInstruction() __asm__ __volatile__("pause\n") /* Some assemblers can't do REP NOP, so go with PAUSE. */
|
||||
#elif (defined(__arm__) && __ARM_ARCH >= 7) || defined(__aarch64__)
|
||||
#elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7) || defined(__aarch64__)
|
||||
#define SDL_CPUPauseInstruction() __asm__ __volatile__("yield" ::: "memory")
|
||||
#elif (defined(__powerpc__) || defined(__powerpc64__))
|
||||
#define SDL_CPUPauseInstruction() __asm__ __volatile__("or 27,27,27");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -65,8 +65,8 @@ typedef enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
|
||||
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
|
||||
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
|
||||
} SDL_BlendOperation;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
/* Comment this if you want to build without any C library requirements */
|
||||
#cmakedefine HAVE_LIBC 1
|
||||
#if HAVE_LIBC
|
||||
#ifdef HAVE_LIBC
|
||||
|
||||
/* Useful headers */
|
||||
#cmakedefine STDC_HEADERS 1
|
||||
@@ -190,6 +190,8 @@
|
||||
#cmakedefine HAVE_FOPEN64 1
|
||||
#cmakedefine HAVE_FSEEKO 1
|
||||
#cmakedefine HAVE_FSEEKO64 1
|
||||
#cmakedefine HAVE_MEMFD_CREATE 1
|
||||
#cmakedefine HAVE_POSIX_FALLOCATE 1
|
||||
#cmakedefine HAVE_SIGACTION 1
|
||||
#cmakedefine HAVE_SA_SIGACTION 1
|
||||
#cmakedefine HAVE_SETJMP 1
|
||||
@@ -200,6 +202,7 @@
|
||||
#cmakedefine HAVE_GETPAGESIZE 1
|
||||
#cmakedefine HAVE_MPROTECT 1
|
||||
#cmakedefine HAVE_ICONV 1
|
||||
#cmakedefine SDL_USE_LIBICONV 1
|
||||
#cmakedefine HAVE_PTHREAD_SETNAME_NP 1
|
||||
#cmakedefine HAVE_PTHREAD_SET_NAME_NP 1
|
||||
#cmakedefine HAVE_SEM_TIMEDWAIT 1
|
||||
@@ -240,7 +243,7 @@
|
||||
|
||||
#cmakedefine HAVE_LIBUDEV_H 1
|
||||
#cmakedefine HAVE_LIBSAMPLERATE_H 1
|
||||
#cmakedefine HAVE_LIBDECOR_H 1
|
||||
#cmakedefine HAVE_LIBDECOR_H 1
|
||||
|
||||
#cmakedefine HAVE_D3D_H @HAVE_D3D_H@
|
||||
#cmakedefine HAVE_D3D11_H @HAVE_D3D11_H@
|
||||
@@ -259,8 +262,7 @@
|
||||
#cmakedefine HAVE_ROAPI_H @HAVE_ROAPI_H@
|
||||
#cmakedefine HAVE_SHELLSCALINGAPI_H @HAVE_SHELLSCALINGAPI_H@
|
||||
|
||||
#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@
|
||||
#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
|
||||
#cmakedefine USE_POSIX_SPAWN @USE_POSIX_SPAWN@
|
||||
|
||||
/* SDL internal assertion support */
|
||||
#if @SDL_DEFAULT_ASSERT_LEVEL_CONFIGURED@
|
||||
@@ -525,7 +527,7 @@
|
||||
#cmakedefine SDL_ARM_NEON_BLITTERS @SDL_ARM_NEON_BLITTERS@
|
||||
|
||||
/* Whether SDL_DYNAMIC_API needs dlopen */
|
||||
#cmakedefine DYNAPI_NEEDS_DLOPEN @DYNAPI_NEEDS_DLOPEN@
|
||||
#cmakedefine DYNAPI_NEEDS_DLOPEN @DYNAPI_NEEDS_DLOPEN@
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
#cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/* Comment this if you want to build without any C library requirements */
|
||||
#undef HAVE_LIBC
|
||||
#if HAVE_LIBC
|
||||
#ifdef HAVE_LIBC
|
||||
|
||||
/* Useful headers */
|
||||
#undef STDC_HEADERS
|
||||
@@ -204,12 +204,15 @@
|
||||
#undef HAVE_GETPAGESIZE
|
||||
#undef HAVE_MPROTECT
|
||||
#undef HAVE_ICONV
|
||||
#undef SDL_USE_LIBICONV
|
||||
#undef HAVE_PTHREAD_SETNAME_NP
|
||||
#undef HAVE_PTHREAD_SET_NAME_NP
|
||||
#undef HAVE_SEM_TIMEDWAIT
|
||||
#undef HAVE_GETAUXVAL
|
||||
#undef HAVE_ELF_AUX_INFO
|
||||
#undef HAVE_POLL
|
||||
#undef HAVE_MEMFD_CREATE
|
||||
#undef HAVE_POSIX_FALLOCATE
|
||||
#undef HAVE__EXIT
|
||||
|
||||
#else
|
||||
@@ -241,8 +244,6 @@
|
||||
#undef HAVE_DXGI_H
|
||||
#undef HAVE_WINDOWS_GAMING_INPUT_H
|
||||
#undef HAVE_XINPUT_H
|
||||
#undef HAVE_XINPUT_GAMEPAD_EX
|
||||
#undef HAVE_XINPUT_STATE_EX
|
||||
|
||||
#undef HAVE_MMDEVICEAPI_H
|
||||
#undef HAVE_AUDIOCLIENT_H
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -47,7 +47,7 @@
|
||||
/* dynamically loaded libusb-1.0 dll: */
|
||||
#define SDL_LIBUSB_DYNAMIC "usb100.dll"
|
||||
#endif
|
||||
/*#undef SDL_JOYSTICK_VIRTUAL */
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
|
||||
/* Enable OpenGL support */
|
||||
/* #undef SDL_VIDEO_OPENGL */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 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
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user